Closed Kaixhin closed 6 years ago
I guess you're not planning on having autogradpp work on non-CUDA platforms? If you later on include a file from PyTorch that has CUDA code enabled by this macro, your library will not compile on CPU (which it does right now)
The right way to do this is:
#include <ATen/Config.h> #if AT_CUDA_ENABLED() #define WITH_CUDA #endif
I guess you're not planning on having autogradpp work on non-CUDA platforms? If you later on include a file from PyTorch that has CUDA code enabled by this macro, your library will not compile on CPU (which it does right now)