File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
numba_cuda/numba/cuda/cudadrv Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3448,8 +3448,16 @@ def inspect_obj_content(objpath: str):
34483448 """
34493449 code_types :set [str ] = set ()
34503450
3451- out = subprocess .run (["cuobjdump" , objpath ], capture_output = True )
3452- objtable = out .stdout .decode ()
3451+ try :
3452+ out = subprocess .run (["cuobjdump" , objpath ], check = True ,
3453+ capture_output = True )
3454+ except FileNotFoundError as e :
3455+ msg = ("cuobjdump has not been found. You may need "
3456+ "to install the CUDA toolkit and ensure that "
3457+ "it is available on your PATH.\n " )
3458+ raise RuntimeError (msg ) from e
3459+
3460+ objtable = out .stdout .decode ('utf-8' )
34533461 entry_pattern = r"Fatbin (.*) code"
34543462 for line in objtable .split ("\n " ):
34553463 if match := re .match (entry_pattern , line ):
You can’t perform that action at this time.
0 commit comments