Skip to content

Commit

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

def builder(self):
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
self.build_for_cpu = not torch.cuda.is_available()

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

0 comments on commit f65a857

Please sign in to comment.