Skip to content

Commit

Permalink
Remove from CUDAOpBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
loadams committed Nov 6, 2023
1 parent dec7bcc commit d4e9bd9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,12 @@ def is_compatible(self, verbose=True):
return super().is_compatible(verbose)

def builder(self):
self.build_for_cpu = not torch.cuda.is_available()
try:
if not self.is_rocm_pytorch():
assert_no_cuda_mismatch(self.name)
self.build_for_cpu = False
except BaseException:
self.build_for_cpu = True

if self.build_for_cpu:
from torch.utils.cpp_extension import CppExtension as ExtensionBuilder
Expand Down

0 comments on commit d4e9bd9

Please sign in to comment.