Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve hermeticity for clang #159

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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