Skip to content

Commit c8b9198

Browse files
committed
handeling loop unroll for HIP
1 parent 6c44bda commit c8b9198

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel_tuner/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ def prepare_kernel_string(kernel_name, kernel_string, params, grid, threads, blo
618618
v = str(v)
619619
v = v.replace("\n", "\\\n")
620620

621-
if "loop_unroll_factor" in k and lang == "CUDA":
622-
# this handles the special case that in CUDA
621+
if "loop_unroll_factor" in k and lang in ("CUDA", "HIP"):
622+
# this handles the special case that in CUDA/HIP
623623
# pragma unroll loop_unroll_factor, loop_unroll_factor should be a constant integer expression
624624
# in OpenCL this isn't the case and we can just insert "#define loop_unroll_factor N"
625625
# using 0 to disable specifying a loop unrolling factor for this loop

0 commit comments

Comments
 (0)