Skip to content

Commit 55e96f7

Browse files
updated reduction example, following changes in what tune_kernel returns
1 parent cb4db94 commit 55e96f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/cuda/reduction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def tune():
2626
args = [sum_x, x, n]
2727

2828
#tune the first kernel
29-
first_kernel = tune_kernel("sum_floats", kernel_string, problem_size,
29+
first_kernel, _ = tune_kernel("sum_floats", kernel_string, problem_size,
3030
args, tune_params, grid_div_x=[], verbose=True)
3131

3232
#tune the second kernel for different input sizes
@@ -41,7 +41,7 @@ def tune():
4141
#change the input size to nblocks
4242
args = [sum_x, x, numpy.int32(nblocks)]
4343
#tune the second kernel with n=nblocks
44-
result = tune_kernel("sum_floats", kernel_string, problem_size,
44+
result, _ = tune_kernel("sum_floats", kernel_string, problem_size,
4545
args, tune_params, grid_div_x=[], verbose=True)
4646
with open("reduce-kernel2-" + str(nblocks) + ".json", 'w') as fp:
4747
json.dump(result, fp)

0 commit comments

Comments
 (0)