Skip to content

Commit c06a86c

Browse files
testcupyleofang
andauthored
Add numpy version check in examples/thread_block_cluster.py (#1172)
* Add numpy version check in examples/thread_block_cluster.py * Add numpy version check in examples/thread_block_cluster.py --------- Co-authored-by: Leo Fang <[email protected]>
1 parent f3cb5a2 commit c06a86c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cuda_core/examples/thread_block_cluster.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
launch,
2323
)
2424

25+
if np.lib.NumpyVersion(np.__version__) < "2.2.5":
26+
print("This example requires NumPy 2.2.5 or later", file=sys.stderr)
27+
sys.exit(0)
28+
2529
# prepare include
2630
cuda_path = os.environ.get("CUDA_PATH", os.environ.get("CUDA_HOME"))
2731
if cuda_path is None:

0 commit comments

Comments
 (0)