Skip to content

Commit

Permalink
Improve hermeticity for clang (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhan authored Sep 6, 2023
1 parent e772553 commit a7bce91
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
run: |
echo "build --config=clang" > $HOME/.bazelrc
echo "build:clang --@rules_cuda//cuda:archs=sm_80" >> $HOME/.bazelrc
echo "build:clang --spawn_strategy=local" >> $HOME/.bazelrc
- run: bazelisk build @rules_cuda_examples//basic:all
- run: bazelisk build @rules_cuda_examples//rdc:all
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
echo "build --config=clang" > $HOME/.bazelrc
echo "build:clang --cxxopt=--cuda-gpu-arch=sm_80 >> $HOME/.bazelrc"
- run: cd examples && bazelisk build --verbose_failures --spawn_strategy=local --cuda_archs='compute_80,sm_80' @rules_cuda_examples//nccl:perf_binaries
- run: cd examples && bazelisk build --verbose_failures --cuda_archs='compute_80,sm_80' @rules_cuda_examples//nccl:perf_binaries

- run: bazelisk shutdown

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
echo "build --config=clang" > $HOME/.bazelrc
echo "build:clang --cxxopt=--cuda-gpu-arch=sm_80 >> $HOME/.bazelrc"
- run: cd examples && bazelisk build --verbose_failures --spawn_strategy=local --cuda_archs='compute_80,sm_80' @rules_cuda_examples//nccl:perf_binaries
- run: cd examples && bazelisk build --verbose_failures --cuda_archs='compute_80,sm_80' @rules_cuda_examples//nccl:perf_binaries

- run: bazelisk shutdown

Expand Down
5 changes: 2 additions & 3 deletions cuda/private/actions/dlink.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,15 @@ def _wrapper_device_link(
compile_common = cuda_helper.create_common_info(
# this is useless
cuda_archs_info = common.cuda_archs_info,
headers = [fatbin_h],
headers = [fatbin_h, register_h],
defines = [
# Silence warning about including internal header.
"__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__",
# Macros that need to be defined starting with CUDA 10.
"__NV_EXTRA_INITIALIZATION=",
"__NV_EXTRA_FINALIZATION=",
],
# TODO: avoid the hardcode path
includes = common.includes + ["external/local_cuda/cuda/include"],
includes = common.includes,
system_includes = common.system_includes,
quote_includes = common.quote_includes,
# suppress cuda mode as c++ mode
Expand Down
3 changes: 2 additions & 1 deletion cuda/runtime/BUILD.local_cuda
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ package(
filegroup(
name = "compiler_deps",
srcs = [
"cuda/version.txt",
":_cuda_header_files",
] + glob([
"cuda/version.txt",
"cuda/version.json",
"cuda/bin/**",
"cuda/lib64/**",
"cuda/nvvm/**",
Expand Down
1 change: 1 addition & 0 deletions cuda/templates/BUILD.local_toolchain_clang
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cuda_toolchain_config(
cuda_toolchain(
name = "clang-local",
compiler_executable = "%{clang_path}",
compiler_files = "@local_cuda//:compiler_deps",
toolchain_config = ":clang-local-config",
)

Expand Down

0 comments on commit a7bce91

Please sign in to comment.