Skip to content

Commit

Permalink
Add Hermetic CUDA rules.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 664903046
  • Loading branch information
rtg0795 authored and tf-text-github-robot committed Aug 20, 2024
1 parent 748c121 commit 6b241f8
Showing 1 changed file with 54 additions and 7 deletions.
61 changes: 54 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ http_archive(

http_archive(
name = "org_tensorflow",
strip_prefix = "tensorflow-9d2929b69fdddc1e8d5de70a706556b15d8ed37b",
sha256 = "a4f965340ea11d49c8897df59a24822c2b367e4cebb5908b7ca8c3b607097af9",
strip_prefix = "tensorflow-1ad7a2160315a64dd2a5cbde380e9478b671d043",
sha256 = "2caf5f221197fa817f41f8b71a14adda3261e2ecd1b45357f5af824530b37267",
urls = [
"https://github.com/tensorflow/tensorflow/archive/9d2929b69fdddc1e8d5de70a706556b15d8ed37b.zip"
"https://github.com/tensorflow/tensorflow/archive/1ad7a2160315a64dd2a5cbde380e9478b671d043.zip"
],
)

Expand All @@ -75,11 +75,11 @@ http_archive(
http_archive(
name = "pybind11",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11/archive/v2.10.0.tar.gz",
"https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11/archive/v2.13.4.tar.gz",
"https://github.com/pybind/pybind11/archive/v2.13.4.tar.gz",
],
sha256 = "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec",
strip_prefix = "pybind11-2.10.0",
sha256 = "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240",
strip_prefix = "pybind11-2.13.4",
build_file = "//third_party/pybind11:BUILD.bzl",
)

Expand Down Expand Up @@ -141,3 +141,50 @@ load("@org_tensorflow//third_party/android:android_configure.bzl", "android_conf
android_configure(name="local_config_android")
load("@local_config_android//:android.bzl", "android_workspace")
android_workspace()

load(
"@local_tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
"cuda_json_init_repository",
)

cuda_json_init_repository()

load(
"@cuda_redist_json//:distributions.bzl",
"CUDA_REDISTRIBUTIONS",
"CUDNN_REDISTRIBUTIONS",
)
load(
"@local_tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
"cuda_redist_init_repositories",
"cudnn_redist_init_repository",
)

cuda_redist_init_repositories(
cuda_redistributions = CUDA_REDISTRIBUTIONS,
)

cudnn_redist_init_repository(
cudnn_redistributions = CUDNN_REDISTRIBUTIONS,
)

load(
"@local_tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
"cuda_configure",
)

cuda_configure(name = "local_config_cuda")

load(
"@local_tsl//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
"nccl_redist_init_repository",
)

nccl_redist_init_repository()

load(
"@local_tsl//third_party/nccl/hermetic:nccl_configure.bzl",
"nccl_configure",
)

nccl_configure(name = "local_config_nccl")

0 comments on commit 6b241f8

Please sign in to comment.