Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MoFHeka committed Jan 2, 2025
1 parent b12c76a commit 4ca23b5
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
26 changes: 26 additions & 0 deletions modules/rules_nccl/0.0.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
A rule for import nccl library
"""

module(
name = "rules_nccl",
version = "0.0.1",
compatibility_level = 1,
)

nccl = use_extension("@rules_nccl//nccl:extensions.bzl", "nccl_dependencie")
nccl.nccl_dependencie(
name = "local_nccl",
nccl_path = "",
)
use_repo(nccl, "local_nccl")

bazel_dep(name = "rules_cuda", version = "0.2.1", dev_dependency = True)
cuda = use_extension("@rules_cuda//cuda:extensions.bzl", "toolchain", dev_dependency = True)
cuda.local_toolchain(
name = "local_cuda",
)
use_repo(cuda, "local_cuda")

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
30 changes: 30 additions & 0 deletions modules/rules_nccl/0.0.1/patches/module_dot_bazel_version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
===================================================================
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,26 @@
+"""
+A rule for import nccl library
+"""
+
+module(
+ name = "rules_nccl",
+ version = "0.0.1",
+ compatibility_level = 1,
+)
+
+nccl = use_extension("@rules_nccl//nccl:extensions.bzl", "nccl_dependencie")
+nccl.nccl_dependencie(
+ name = "local_nccl",
+ nccl_path = "",
+)
+use_repo(nccl, "local_nccl")
+
+bazel_dep(name = "rules_cuda", version = "0.2.1", dev_dependency = True)
+cuda = use_extension("@rules_cuda//cuda:extensions.bzl", "toolchain", dev_dependency = True)
+cuda.local_toolchain(
+ name = "local_cuda",
+)
+use_repo(cuda, "local_cuda")
+
+bazel_dep(name = "bazel_skylib", version = "1.7.1")
+bazel_dep(name = "platforms", version = "0.0.10")
9 changes: 9 additions & 0 deletions modules/rules_nccl/0.0.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
matrix:
bazel:
- 6.x
- 7.x
tasks:
verify_targets_linux:
name: Verify build targets
bazel: ${{ bazel }}
platform: ubuntu2004
9 changes: 9 additions & 0 deletions modules/rules_nccl/0.0.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-nzTIZtpeuhoutBPGZwnrCUHy14u/axhncuc7KY3m0p8=",
"strip_prefix": "rules_nccl-v0.0.1",
"url": "https://github.com/MoFHeka/rules_nccl/releases/download/v0.0.1/rules_nccl-v0.0.1.tar.gz",
"patches": {
"module_dot_bazel_version.patch": "sha256-HlTpK60E1mhz7CbaYH+IK3NnlmOOTzThrvs+D3JWdTM="
},
"patch_strip": 1
}
17 changes: 17 additions & 0 deletions modules/rules_nccl/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"homepage": "https://github.com/MoFHeka/rules_nccl",
"maintainers": [
{
"email": "[email protected]",
"github": "MoFHeka",
"name": "Jia He"
}
],
"repository": [
"github:MoFHeka/rules_nccl"
],
"versions": [
"0.0.1"
],
"yanked_versions": {}
}

0 comments on commit 4ca23b5

Please sign in to comment.