Skip to content

Commit

Permalink
Revert "allow cuda mismatch exceptions to be triggered"
Browse files Browse the repository at this point in the history
This reverts commit 4f7dd72.
  • Loading branch information
loadams committed Nov 6, 2023
1 parent de96e18 commit bbbf04a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,11 @@ 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():
#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
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 bbbf04a

Please sign in to comment.