mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17481 Usually, feature macros are either defined or undefined and checked accordingly. C10_MOBILE was a weird special case that was always defined but either defined to 1 or to 0. This caused a lot of confusion for me when trying to disable something from mobile build and it also disabled it from the server build (because I was using ifdef). Also, I found a place in the existing code base that made that wrong assumption and used the macro wrongly, see https://fburl.com/y4icohts Reviewed By: dzhulgakov Differential Revision: D14214825 fbshipit-source-id: f3a155b6d43d334e8839e2b2e3c40ed2c773eab6
15 lines
364 B
C++
15 lines
364 B
C++
#include "caffe2/operators/conv_transpose_op_mobile.h"
|
|
#include "caffe2/operators/conv_transpose_op_mobile_impl.h"
|
|
|
|
namespace caffe2 {
|
|
|
|
#ifdef C10_MOBILE
|
|
// mobile-only implementation (tiled + vectorized + multithreaded)
|
|
REGISTER_CPU_OPERATOR_WITH_ENGINE(
|
|
ConvTranspose,
|
|
MOBILE,
|
|
ConvTransposeMobileOp<float, CPUContext>);
|
|
#endif
|
|
|
|
} // namespace caffe2
|