pytorch/c10
Sebastian Messmer 6706e9af19 Make C10_MOBILE consistent with how feature macros are usually used (#17481)
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
2019-02-27 17:57:51 -08:00
..
core Followup to #17049: change more instances of RuntimeError to IndexError 2019-02-25 15:34:22 -08:00
cuda Fix static linkage cases and NO_DISTRIBUTED=1 + CUDA (#16705) (#17337) 2019-02-21 16:12:02 -08:00
hip Revert "remove use of tmp_install" (#15847) 2019-01-08 16:30:19 -08:00
macros Make C10_MOBILE consistent with how feature macros are usually used (#17481) 2019-02-27 17:57:51 -08:00
test Apply modernize-use-override (2nd iteration) 2019-02-14 16:52:57 -08:00
util Make C10_MOBILE consistent with how feature macros are usually used (#17481) 2019-02-27 17:57:51 -08:00
CMakeLists.txt Generate PDB files for better debugging on Windows (#16008) 2019-01-16 23:34:32 -08:00