Skip to content

Commit

Permalink
allow cuda mismatch exceptions to be triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffra committed Nov 4, 2023
1 parent 016b796 commit 4f7dd72
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,12 @@ def jit_load(self, verbose=True):
raise RuntimeError(f"Unable to JIT load the {self.name} op due to ninja not being installed.")

if isinstance(self, CUDAOpBuilder) and not self.is_rocm_pytorch():
try:
assert_no_cuda_mismatch(self.name)
self.build_for_cpu = False
except BaseException:
self.build_for_cpu = True
#TODO(jeff): need to come back and fix cpu-only builds, this came in on #3085 but is hiding real user env issues (eg. torch cuda != sys cuda)
#try:
assert_no_cuda_mismatch(self.name)
self.build_for_cpu = False
#except BaseException:
# self.build_for_cpu = True

self.jit_mode = True
from torch.utils.cpp_extension import load
Expand Down

0 comments on commit 4f7dd72

Please sign in to comment.