Skip to content

Commit

Permalink
Fix clang not behaving with loop unrolling in CUB (chapel-lang#24577)
Browse files Browse the repository at this point in the history
This should fix all the build failures with nvidia testing

[Reviewed by @vasslitvinov, thanks! ]
  • Loading branch information
ShreyasKhandekar authored Mar 9, 2024
2 parents 6c11a66 + 2c45cc5 commit a6464f5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion runtime/src/gpu/nvidia/gpu-nvidia-cub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,18 @@
#ifdef HAS_GPU_LOCALE

#include <cuda.h>
// Based on https://github.com/NVIDIA/cub/issues/246
// The aggressive loop unrolling doesn't offer many advantages
// So we disable warnings about being unable to unroll
// Without this we see clang errors about [-Wpass-failed=transform-warning]
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpass-failed"
#endif
#include <cub/cub.cuh>

#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#include "chpl-gpu.h"
#include "chpl-gpu-impl.h"
#include "../common/cuda-utils.h"
Expand Down

0 comments on commit a6464f5

Please sign in to comment.