Skip to content

Commit 5e93f38

Browse files
FrankLeeeeeflybird11111
authored andcommitted
[extension] fixed exception catch (hpcaitech#5342)
1 parent c238bf5 commit 5e93f38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/cpp_extension.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def cxx_flags(self) -> List[str]:
126126
def load(self):
127127
try:
128128
op_kernel = self.import_op()
129-
except ImportError:
129+
except (ImportError, ModuleNotFoundError):
130130
# if import error occurs, it means that the kernel is not pre-built
131131
# so we build it jit
132132
op_kernel = self.build_jit()

0 commit comments

Comments
 (0)