diff --git a/op_builder/builder.py b/op_builder/builder.py index 461281d4a569..f0ca90880d33 100644 --- a/op_builder/builder.py +++ b/op_builder/builder.py @@ -839,7 +839,9 @@ def cxx_args(self): CPU_ARCH = self.cpu_arch() SIMD_WIDTH = self.simd_width() - CUDA_ENABLE = self.is_cuda_enable() + CUDA_ENABLE = ( + "-D__DISABLE_CUDA__" if self.is_rocm_pytorch() else self.is_cuda_enable() + ) args += [ CPU_ARCH, '-fopenmp',