mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Remove NO_* and WITH_* across codebase, except in setup.py (#8555)
* remove legacy options from CMakeLists * codemod WITH_ to USE_ for WITH_CUDA, WITH_CUDNN, WITH_DISTRIBUTED, WITH_DISTRIBUTED_MW, WITH_GLOO_IBVERBS, WITH_NCCL, WITH_ROCM, WITH_NUMPY * cover SYSTEM_NCCL, MKLDNN, NNPACK, C10D, NINJA * removed NO_* variables and hotpatch them only in setup.py * fix lint
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
#include "torch/csrc/utils/numpy_stub.h"
|
||||
|
||||
#ifndef WITH_NUMPY
|
||||
#ifndef USE_NUMPY
|
||||
namespace torch { namespace utils {
|
||||
PyObject* tensor_to_numpy(const at::Tensor& tensor) {
|
||||
throw std::runtime_error("PyTorch was compiled without NumPy support");
|
||||
@ -176,4 +176,4 @@ ScalarType numpy_dtype_to_aten(int dtype) {
|
||||
|
||||
}} // namespace torch::utils
|
||||
|
||||
#endif // WITH_NUMPY
|
||||
#endif // USE_NUMPY
|
||||
|
Reference in New Issue
Block a user