Skip to content

Commit

Permalink
[BUG FIX]:fix get torch.version.cuda error when cuda is None in rocm
Browse files Browse the repository at this point in the history
  • Loading branch information
hj-wei committed Dec 24, 2024
1 parent eea5304 commit b86b380
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b86b380

Please sign in to comment.