mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15363 Didn't define C10_MOBILE in the numa file move diff: D13380559 move CAFFE2_MOBILE/ANDROID/IOS to c10 ``` codemod -m -d caffe2 --extensions h,hpp,cc,cpp,mm "CAFFE2_MOBILE" "C10_MOBILE" codemod -m -d caffe2 --extensions h,hpp,cc,cpp,mm "CAFFE2_ANDROID" "C10_ANDROID" codemod -m -d caffe2 --extensions h,hpp,cc,cpp,mm "CAFFE2_IOS" "C10_IOS" ``` i-am-not-moving-c2-to-c10 Reviewed By: marcinkwiatkowski Differential Revision: D13490020 fbshipit-source-id: c4f01cacbefc0f16d5de94155c26c92fd5d780e4
23 lines
753 B
C
23 lines
753 B
C
#ifndef CAFFE2_UTILS_THREADPOOL_COMMON_H_
|
|
#define CAFFE2_UTILS_THREADPOOL_COMMON_H_
|
|
|
|
#ifdef __APPLE__
|
|
#include <TargetConditionals.h>
|
|
#endif
|
|
|
|
// caffe2 depends upon NNPACK, which depends upon this threadpool, so
|
|
// unfortunately we can't reference core/common.h here
|
|
|
|
// This is copied from core/common.h's definition of C10_MOBILE
|
|
// Define enabled when building for iOS or Android devices
|
|
#if defined(__ANDROID__)
|
|
#define C10_ANDROID 1
|
|
#elif (defined(__APPLE__) && \
|
|
(TARGET_IPHONE_SIMULATOR || TARGET_OS_SIMULATOR || TARGET_OS_IPHONE))
|
|
#define C10_IOS 1
|
|
#elif (defined(__APPLE__) && TARGET_OS_MAC)
|
|
#define C10_IOS 1
|
|
#else
|
|
#endif // ANDROID / IOS / MACOS
|
|
|
|
#endif // CAFFE2_UTILS_THREADPOOL_COMMON_H_
|