Skip to content

Rename workspace #9

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

Merged
merged 1 commit into from
May 30, 2025
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
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build --cxxopt=-std=c++17
build --repo_env USE_HERMETIC_CC_TOOLCHAIN=1

build:clang_local --noincompatible_enable_cc_toolchain_resolution
build:clang_local --@rules_ml_toolchains//cc_toolchain/config:enable_hermetic_cc=False
build:clang_local --@rules_ml_toolchain//cc_toolchain/config:enable_hermetic_cc=False
build:clang_local --repo_env USE_HERMETIC_CC_TOOLCHAIN=0

# Disable clang extention that rejects type definitions within offsetof.
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================

workspace(
name = "rules_ml_toolchains",
name = "rules_ml_toolchain",
)

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
Expand Down Expand Up @@ -169,14 +169,14 @@ register_toolchains("//cc_toolchain/...")
##############################################################
# NCCL configuration
#load(
# "@rules_ml_toolchains//nccl/hermetic:nccl_redist_init_repository.bzl",
# "@rules_ml_toolchain//nccl/hermetic:nccl_redist_init_repository.bzl",
# "nccl_redist_init_repository",
#)

#nccl_redist_init_repository()

#load(
# "@rules_ml_toolchains//nccl/hermetic:nccl_configure.bzl",
# "@rules_ml_toolchain//nccl/hermetic:nccl_configure.bzl",
# "nccl_configure",
#)

Expand Down
2 changes: 1 addition & 1 deletion cc_toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ CUDA_TOOLS = if_cuda_hermetic_clang(
cc_toolchain_import(
name = "imports_lx64_lx64_cuda",
deps = [
"@rules_ml_toolchains//cc_toolchain/cuda/clang:inject_cuda_runtime_wrapper",
"@rules_ml_toolchain//cc_toolchain/cuda/clang:inject_cuda_runtime_wrapper",
"@sysroot_linux_x86_64//:includes_c",
"@llvm_linux_x86_64//:includes",
"@sysroot_linux_x86_64//:includes_system",
Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/config/cuda.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# ==============================================================================

load(
"@rules_ml_toolchains//cc_toolchain:cuda.bzl",
"@rules_ml_toolchain//cc_toolchain:cuda.bzl",
"cuda_package",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
2 changes: 1 addition & 1 deletion cc_toolchain/config/llvm_linux_x86_64.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
2 changes: 1 addition & 1 deletion cc_toolchain/config/llvm_macos_aarch64.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/config/sysroot_macos_aarch64.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain:sysroot.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain:sysroot.bzl",
"sysroot_package",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/config/sysroot_ubuntu18_aarch64.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain:sysroot.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain:sysroot.bzl",
"sysroot_package",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/config/sysroot_ubuntu18_x86_64.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain:sysroot.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain:sysroot.bzl",
"sysroot_package",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/config/sysroot_ubuntu18_x86_64_gcc9.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain:sysroot.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain:sysroot.bzl",
"sysroot_package",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/config/sysroot_ubuntu20_x86_64.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain:sysroot.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain:sysroot.bzl",
"sysroot_package",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
2 changes: 1 addition & 1 deletion cc_toolchain/cuda/clang/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================

load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"cc_toolchain_import",
)

Expand Down
2 changes: 1 addition & 1 deletion cc_toolchain/cuda/features/cuda_nvcc_feature.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ load(
_feature = "feature",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"CcToolchainImportInfo",
)
# TODO: Check below lines
Expand Down
4 changes: 2 additions & 2 deletions cc_toolchain/sysroots/macos_arm64/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ To set up the SDK for macOS:

4. Copy `MacOSX.sdk.tar.xz` to the computer with current project.
Let's imagine that you copy or download SDK to `~/Downloads` directory and the project path is
`~/Projects/rules_ml_toolchains`.
`~/Projects/rules_ml_toolchain`.
5. Extract MacOSX.sdk to the project directory `sysroots/macos_arm64` directory with help of next command:

`tar xf ~/Downloads/MacOSX.sdk.tar.xz -C ~/Projects/rules_ml_toolchains/sysroots/macos_arm64/`
`tar xf ~/Downloads/MacOSX.sdk.tar.xz -C ~/Projects/rules_ml_toolchain/sysroots/macos_arm64/`

That's it, you project is ready for cross-platform builds where target is macOS ARM64.
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cublas.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cudart.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cudnn.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cudnn9.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cufft.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cupti.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
licenses(["restricted"]) # NVIDIA proprietary license
load("@local_config_cuda//cuda:build_defs.bzl", "if_version_equal_or_greater_than")
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_curand.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cusolver.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_cusparse.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
4 changes: 2 additions & 2 deletions third_party/gpus/cuda/hermetic/cuda_nvcc.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
licenses(["restricted"]) # NVIDIA proprietary license

load(
"@rules_ml_toolchains//cc_toolchain/cuda/features:cuda_nvcc_feature.bzl",
"@rules_ml_toolchain//cc_toolchain/cuda/features:cuda_nvcc_feature.bzl",
"cuda_nvcc_feature",
)

Expand Down Expand Up @@ -71,7 +71,7 @@ cuda_nvcc_feature(
enabled = True,
bin = ":bin/nvcc",
version = "%{version_of_cuda}",
visibility = ["@rules_ml_toolchains//cc_toolchain:__pkg__"],
visibility = ["@rules_ml_toolchain//cc_toolchain:__pkg__"],
)

cc_library(
Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_nvjitlink.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/gpus/cuda/hermetic/cuda_nvrtc.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/nccl/archive.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ cc_library(
visibility = ["//visibility:public"],
deps = [
"@local_config_cuda//cuda:cuda_headers",
"@rules_ml_toolchains//third_party/xla/tsl/cuda:nccl_stub",
"@rules_ml_toolchain//third_party/xla/tsl/cuda:nccl_stub",
],
)

Expand Down
4 changes: 2 additions & 2 deletions third_party/nccl/build_defs.bzl.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ def cuda_rdc_library(name, hdrs = None, copts = None, linkstatic = True, defines
out = dlink_cc,
gpu_archs = cuda_gpu_architectures(),
nvlink_args = select({
"@rules_ml_toolchains//third_party/xla/tsl:linux_x86_64": ["--cpu-arch=X86_64"],
"@rules_ml_toolchains//third_party/xla/tsl:linux_ppc64le": ["--cpu-arch=PPC64LE"],
"@rules_ml_toolchain//third_party/xla/tsl:linux_x86_64": ["--cpu-arch=X86_64"],
"@rules_ml_toolchain//third_party/xla/tsl:linux_ppc64le": ["--cpu-arch=PPC64LE"],
"//conditions:default": [],
}),
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/nccl/hermetic/cuda_nccl.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses(["restricted"]) # NVIDIA proprietary license
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
4 changes: 2 additions & 2 deletions third_party/nccl/nccl_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ remote_nccl_configure = repository_rule(
attrs = {
"environ": attr.string_dict(),
"_find_cuda_config": attr.label(
default = Label("@rules_ml_toolchains//third_party/gpus:find_cuda_config.py"),
default = Label("@rules_ml_toolchain//third_party/gpus:find_cuda_config.py"),
),
},
)
Expand All @@ -213,7 +213,7 @@ nccl_configure = repository_rule(
environ = _ENVIRONS,
attrs = {
"_find_cuda_config": attr.label(
default = Label("@rules_ml_toolchains//third_party/gpus:find_cuda_config.py"),
default = Label("@rules_ml_toolchain//third_party/gpus:find_cuda_config.py"),
),
},
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/nccl/system.BUILD.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load(
"@rules_ml_toolchains//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"@rules_ml_toolchain//third_party/xla/tsl/platform/default:cuda_build_defs.bzl",
"cuda_rpath_flags",
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/remote_config/remote_platform_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _remote_platform_configure_impl(repository_ctx):

repository_ctx.template(
"BUILD",
Label("@rules_ml_toolchains//third_party/remote_config:BUILD.tpl"),
Label("@rules_ml_toolchain//third_party/remote_config:BUILD.tpl"),
{
"%{platform}": platform,
"%{exec_properties}": serialized_exec_properties,
Expand Down
2 changes: 1 addition & 1 deletion third_party/rules_cc_toolchain/features/features.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ load(
_feature = "feature",
)
load(
"@rules_ml_toolchains//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"@rules_ml_toolchain//third_party/rules_cc_toolchain/features:cc_toolchain_import.bzl",
"CcToolchainImportInfo",
)

Expand Down