drbh
commited on
Commit
·
359242d
1
Parent(s):
9c4ca75
fix: prefer nix based library inclusion
Browse files- build.toml +0 -14
- flake.lock +39 -5
- flake.nix +43 -8
build.toml
CHANGED
|
@@ -35,18 +35,4 @@ src = [
|
|
| 35 |
"csrc/new_replicate.h",
|
| 36 |
"csrc/new_sort.h",
|
| 37 |
"csrc/new_sort.cu",
|
| 38 |
-
]
|
| 39 |
-
|
| 40 |
-
[test]
|
| 41 |
-
python-git-packages = [
|
| 42 |
-
{ url = "https://github.com/stanford-futuredata/stk.git", rev = "7363137", sha256 = "0m6g5l9nlwaiwybg5j8dhnz159wdpabdnkzapnn3dsifxrsb59vz" },
|
| 43 |
-
{ url = "https://github.com/mosaicml/composer.git", rev = "v0.9.0", sha256 = "ekJ5nE6JwYY6Ld9kIk72R/a3iI943Gd5yvAkBHQs5aI=" },
|
| 44 |
-
# { url = "https://github.com/tgale96/grouped_gemm.git", rev = "v0.3.0", sha256 = "sha256-fS6MuDj6yQ00CSzFrmAmM20/ccvtLJ1MFjfeqdwuPl8=" }
|
| 45 |
-
]
|
| 46 |
-
python-packages = [
|
| 47 |
-
"tqdm",
|
| 48 |
-
"py-cpuinfo",
|
| 49 |
-
"importlib-metadata",
|
| 50 |
-
"torchmetrics",
|
| 51 |
-
# "yahp"
|
| 52 |
]
|
|
|
|
| 35 |
"csrc/new_replicate.h",
|
| 36 |
"csrc/new_sort.h",
|
| 37 |
"csrc/new_sort.cu",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
]
|
flake.lock
CHANGED
|
@@ -1,5 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"nodes": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"flake-compat": {
|
| 4 |
"locked": {
|
| 5 |
"lastModified": 1747046372,
|
|
@@ -97,16 +113,16 @@
|
|
| 97 |
]
|
| 98 |
},
|
| 99 |
"locked": {
|
| 100 |
-
"lastModified":
|
| 101 |
-
"narHash": "sha256
|
| 102 |
"owner": "huggingface",
|
| 103 |
"repo": "kernel-builder",
|
| 104 |
-
"rev": "
|
| 105 |
"type": "github"
|
| 106 |
},
|
| 107 |
"original": {
|
| 108 |
"owner": "huggingface",
|
| 109 |
-
"ref": "support-custom-python-libraries-in-dev-shell",
|
| 110 |
"repo": "kernel-builder",
|
| 111 |
"type": "github"
|
| 112 |
}
|
|
@@ -129,7 +145,25 @@
|
|
| 129 |
},
|
| 130 |
"root": {
|
| 131 |
"inputs": {
|
| 132 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
}
|
| 134 |
},
|
| 135 |
"systems": {
|
|
|
|
| 1 |
{
|
| 2 |
"nodes": {
|
| 3 |
+
"composer": {
|
| 4 |
+
"flake": false,
|
| 5 |
+
"locked": {
|
| 6 |
+
"lastModified": 1749592532,
|
| 7 |
+
"narHash": "sha256-VKfSWtf+Z20nP1cHiBNwFzYCuMGL0xelvd6HMyDnIhc=",
|
| 8 |
+
"owner": "mosaicml",
|
| 9 |
+
"repo": "composer",
|
| 10 |
+
"rev": "0eec49da42e7f617329f035853800211f0a54ca3",
|
| 11 |
+
"type": "github"
|
| 12 |
+
},
|
| 13 |
+
"original": {
|
| 14 |
+
"owner": "mosaicml",
|
| 15 |
+
"repo": "composer",
|
| 16 |
+
"type": "github"
|
| 17 |
+
}
|
| 18 |
+
},
|
| 19 |
"flake-compat": {
|
| 20 |
"locked": {
|
| 21 |
"lastModified": 1747046372,
|
|
|
|
| 113 |
]
|
| 114 |
},
|
| 115 |
"locked": {
|
| 116 |
+
"lastModified": 1749765513,
|
| 117 |
+
"narHash": "sha256-/Tyhxb1v4ks5G7eewZiK9BHSn2606wH/KdCMmdeAw2c=",
|
| 118 |
"owner": "huggingface",
|
| 119 |
"repo": "kernel-builder",
|
| 120 |
+
"rev": "a9c26e450a81296525128e3860c21ab028aa8d07",
|
| 121 |
"type": "github"
|
| 122 |
},
|
| 123 |
"original": {
|
| 124 |
"owner": "huggingface",
|
| 125 |
+
"ref": "support-custom-python-libraries-in-dev-shell-nixland",
|
| 126 |
"repo": "kernel-builder",
|
| 127 |
"type": "github"
|
| 128 |
}
|
|
|
|
| 145 |
},
|
| 146 |
"root": {
|
| 147 |
"inputs": {
|
| 148 |
+
"composer": "composer",
|
| 149 |
+
"kernel-builder": "kernel-builder",
|
| 150 |
+
"stk": "stk"
|
| 151 |
+
}
|
| 152 |
+
},
|
| 153 |
+
"stk": {
|
| 154 |
+
"flake": false,
|
| 155 |
+
"locked": {
|
| 156 |
+
"lastModified": 1724272107,
|
| 157 |
+
"narHash": "sha256-f6eydO4u6jasvepP25a6jacSvoUNyfKW51FxahMtz1Q=",
|
| 158 |
+
"owner": "stanford-futuredata",
|
| 159 |
+
"repo": "stk",
|
| 160 |
+
"rev": "736313768ef697ce13a0594a41b2512a0fbc9884",
|
| 161 |
+
"type": "github"
|
| 162 |
+
},
|
| 163 |
+
"original": {
|
| 164 |
+
"owner": "stanford-futuredata",
|
| 165 |
+
"repo": "stk",
|
| 166 |
+
"type": "github"
|
| 167 |
}
|
| 168 |
},
|
| 169 |
"systems": {
|
flake.nix
CHANGED
|
@@ -1,17 +1,52 @@
|
|
| 1 |
{
|
| 2 |
description = "Flake for megablocks_moe kernel";
|
| 3 |
-
|
| 4 |
inputs = {
|
| 5 |
-
kernel-builder.url = "github:huggingface/kernel-builder/support-custom-python-libraries-in-dev-shell";
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
{
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
kernel-builder.lib.genFlakeOutputs {
|
| 14 |
path = ./.;
|
| 15 |
rev = self.shortRev or self.dirtyShortRev or self.lastModifiedDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
};
|
| 17 |
}
|
|
|
|
| 1 |
{
|
| 2 |
description = "Flake for megablocks_moe kernel";
|
| 3 |
+
|
| 4 |
inputs = {
|
| 5 |
+
kernel-builder.url = "github:huggingface/kernel-builder/support-custom-python-libraries-in-dev-shell-nixland";
|
| 6 |
+
# Add libraries as inputs
|
| 7 |
+
composer = {
|
| 8 |
+
url = "github:mosaicml/composer";
|
| 9 |
+
flake = false;
|
| 10 |
+
};
|
| 11 |
+
stk = {
|
| 12 |
+
url = "github:stanford-futuredata/stk";
|
| 13 |
+
flake = false;
|
| 14 |
+
};
|
| 15 |
|
| 16 |
+
# TODO: update to build with the correct torch version
|
| 17 |
+
# grouped_gemm = {
|
| 18 |
+
# url = "github:tgale96/grouped_gemm";
|
| 19 |
+
# flake = false;
|
| 20 |
+
# };
|
| 21 |
+
};
|
| 22 |
+
|
| 23 |
+
outputs = {
|
| 24 |
+
self,
|
| 25 |
+
kernel-builder,
|
| 26 |
+
composer,
|
| 27 |
+
stk,
|
| 28 |
+
# grouped_gemm,
|
| 29 |
+
}:
|
| 30 |
kernel-builder.lib.genFlakeOutputs {
|
| 31 |
path = ./.;
|
| 32 |
rev = self.shortRev or self.dirtyShortRev or self.lastModifiedDate;
|
| 33 |
+
|
| 34 |
+
# Map custom packages to their sources
|
| 35 |
+
customPythonPackages = {
|
| 36 |
+
composer = composer;
|
| 37 |
+
stk = stk;
|
| 38 |
+
# grouped_gemm = grouped_gemm;
|
| 39 |
+
};
|
| 40 |
+
|
| 41 |
+
pythonTestDeps = [
|
| 42 |
+
"tqdm"
|
| 43 |
+
"py-cpuinfo"
|
| 44 |
+
"importlib-metadata"
|
| 45 |
+
"torchmetrics"
|
| 46 |
+
"composer"
|
| 47 |
+
"stk"
|
| 48 |
+
# "grouped_gemm"
|
| 49 |
+
# "yahp" # may be needed for some testing plugin
|
| 50 |
+
];
|
| 51 |
};
|
| 52 |
}
|