Skip to content

Commit 6b91a26

Browse files
update reduction example
1 parent dadc76c commit 6b91a26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/cuda/reduction.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ __global__ void sum_floats(float *sum_global, floatvector *array, int n) {
5454
sum = sh_mem[ti];
5555
#pragma unroll
5656
for (unsigned int s=16; s>0; s>>=1) {
57-
sum += __shfl_down_sync(0, sum, s);
57+
sum += __shfl_down_sync(0xffffffff, sum, s);
5858
}
5959
}
6060
#else

examples/cuda/reduction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def tune():
1111

1212
tune_params = OrderedDict()
1313
tune_params["block_size_x"] = [2**i for i in range(5,11)]
14-
tune_params["use_shuffle"] = [0, 1]
1514
tune_params["vector"] = [2**i for i in range(3)]
1615
tune_params["num_blocks"] = [2**i for i in range(5,16)]
1716
tune_params["loop_unroll_factor_0"] = [0, 1, 8, 16, 32, 64]
17+
tune_params["use_shuffle"] = [0, 1]
1818

1919
problem_size = "num_blocks"
2020
size = 800000000

0 commit comments

Comments
 (0)