mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Because MacOS is not iOS Pull Request resolved: https://github.com/pytorch/pytorch/pull/37283 Test Plan: CI Differential Revision: D21244398 Pulled By: malfet fbshipit-source-id: b822e216e83887e2f2961b5c5384eaf749629f61
21 lines
677 B
C
21 lines
677 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
|
|
#endif // ANDROID / IOS
|
|
|
|
#endif // CAFFE2_UTILS_THREADPOOL_COMMON_H_
|