Skip to content

Commit a206f8b

Browse files
committed
bench: add cupy to array constructor kernel launch benchmarks
1 parent 3ebbe29 commit a206f8b

File tree

3 files changed

+233
-2
lines changed

3 files changed

+233
-2
lines changed

numba_cuda/numba/cuda/tests/benchmarks/test_kernel_launch.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
),
2424
id="torch",
2525
),
26+
param(
27+
lambda: pytest.importorskip("cupy").empty(128, dtype=np.float32),
28+
id="cupy",
29+
),
2630
],
2731
)
2832
def test_one_arg(benchmark, array_func):
@@ -58,6 +62,13 @@ def bench(func, arr):
5862
],
5963
id="torch",
6064
),
65+
param(
66+
lambda: [
67+
pytest.importorskip("cupy").empty(128, dtype=np.float32)
68+
for _ in range(len(string.ascii_lowercase))
69+
],
70+
id="cupy",
71+
),
6172
],
6273
)
6374
def test_many_args(benchmark, array_func):

pixi.lock

Lines changed: 220 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ cuda = "12"
161161
[tool.pixi.feature.cu13.system-requirements]
162162
cuda = "13"
163163

164-
[tool.pixi.build-dependencies]
164+
[tool.pixi.dependencies]
165165
cuda-compiler = "*"
166166
make = "*"
167167
cxx-compiler = "*"
168168

169169
[tool.pixi.feature.bench.dependencies]
170170
pytorch = "2.*"
171+
cupy = "*"
171172

172173
[tool.pixi.environments]
173174
cu12 = { features = ["cu12", "test", "bench"], solve-group = "cu12" }

0 commit comments

Comments
 (0)