Skip to content

Commit

Permalink
Build the runtime support for reductions on NVIDIA GPUs only for `CHP…
Browse files Browse the repository at this point in the history
…L_GPU_ARCH` (chapel-lang#24006)

Resolves chapel-lang#23893
Resolves Cray/chapel-private#5712

This PR aligns `nvidia` reduction support to `amd`:
https://github.com/chapel-lang/chapel/pull/23950/files#diff-eb05ab5f4c9820ed534cd67b2f2f83426c7fd52e90c86b5afcbb29dc7992296dR24
where we build the reduction support source only for `CHPL_GPU_ARCH`.
This improves the build time of the reduction support by about 4x on my
workstation (1 vs 4 minutes).

Related: chapel-lang#23960

[Reviewed by @jabraham17]

Test:
- [x] nvidia
  • Loading branch information
e-kayrakli authored Dec 4, 2023
2 parents 68b3b7a + 5ddef3e commit f31e0b6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions runtime/src/gpu/nvidia/Makefile.share
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ GPU_OBJS = $(addprefix $(GPU_OBJDIR)/,$(addsuffix .o,$(basename $(GPU_SRCS))))
# a comma-separated list.
RUNTIME_CXXFLAGS += -x cuda -Wno-unknown-cuda-version \
-Xclang -fcuda-allow-variadic-functions \
--offload-arch=sm_60 \
--offload-arch=sm_61 \
--offload-arch=sm_70 \
--offload-arch=sm_75
--offload-arch=$(CHPL_MAKE_GPU_ARCH)

$(RUNTIME_OBJ_DIR)/gpu-nvidia-reduce.o: gpu-nvidia-reduce.cc \
$(RUNTIME_OBJ_DIR_STAMP)
Expand Down

0 comments on commit f31e0b6

Please sign in to comment.