Skip to content

Commit

Permalink
Disable loop unrolling in clang
Browse files Browse the repository at this point in the history
Signed-off-by: Szymon Karpiński <[email protected]>
  • Loading branch information
szkarpinski committed Dec 14, 2021
1 parent e972a93 commit 58ea73d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dali/kernels/slice/slice_gpu.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ __device__ void SliceFunc(OutputType *__restrict__ out, const InputType *__restr
}

for (; offset < block_end; offset += blockDim.x * coalesced_values<OutputType>) {
#ifndef __clang__
#pragma unroll
#endif
for (uint64_t i = 0; i < coalesced_values<OutputType>; i++) {
uint64_t idx = offset + i;
if (idx >= block_end) break;
Expand Down

0 comments on commit 58ea73d

Please sign in to comment.