Skip to content

Commit 1019685

Browse files
committed
Minor simplifications of helper script.
1 parent b054e9e commit 1019685

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

toolshed/build_static_bitcode_input.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@
1818
import sys
1919
import textwrap
2020

21-
try:
22-
import llvmlite.binding
23-
except Exception:
24-
sys.exit("HINT: pip install llvmlite")
25-
21+
import llvmlite.binding # HINT: pip install llvmlite
2622
from cuda.bindings import nvvm
2723

2824

2925
def get_minimal_nvvmir_txt_template():
3026
cuda_bindings_tests_dir = os.path.normpath("cuda_bindings/tests")
31-
if not os.path.isdir(cuda_bindings_tests_dir):
32-
raise RuntimeError("Please run this helper script from the cuda-python top-level directory.")
27+
assert os.path.isdir(cuda_bindings_tests_dir), (
28+
"Please run this helper script from the cuda-python top-level directory."
29+
)
3330
sys.path.insert(0, os.path.abspath(cuda_bindings_tests_dir))
3431
import test_nvvm
3532

0 commit comments

Comments
 (0)