From 1cf26756a1e49bc66ff6f24610cdbe4d68d0d3d0 Mon Sep 17 00:00:00 2001 From: Tarry Singh Date: Wed, 16 Jul 2025 10:01:41 +0000 Subject: [PATCH] workspace: run buildifier, drop rules_uv, refactor tools/hf dependencies --- MODULE.bazel | 1 - MODULE.bazel.lock | 114 --------------------------------- ffi/BUILD.bazel | 1 + runtimes/common/packages.bzl | 2 - runtimes/cpu/BUILD.bazel | 5 +- runtimes/cuda/BUILD.bazel | 4 +- runtimes/cuda/cuda.bzl | 2 +- runtimes/cuda/cuda.zig | 9 +-- runtimes/rocm/BUILD.bazel | 4 +- runtimes/tpu/BUILD.bazel | 1 + tools/BUILD.bazel | 21 +----- tools/hf/BUILD.bazel | 2 +- tools/hf/pyproject.toml | 4 -- tools/hf/requirements.in | 1 + tools/hf/requirements.lock.txt | 26 ++++---- upb/BUILD.bazel | 3 +- zml/tools/BUILD.bazel | 3 +- 17 files changed, 32 insertions(+), 171 deletions(-) delete mode 100644 tools/hf/pyproject.toml create mode 100644 tools/hf/requirements.in diff --git a/MODULE.bazel b/MODULE.bazel index 0923038..7f34bc9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -18,7 +18,6 @@ bazel_dep(name = "rules_oci", version = "2.2.6") bazel_dep(name = "rules_proto", version = "7.1.0") bazel_dep(name = "rules_python", version = "1.5.3") bazel_dep(name = "rules_rust", version = "0.63.0") -bazel_dep(name = "rules_uv", version = "0.87.0") bazel_dep(name = "rules_zig", version = "20250821.0-be53625") bazel_dep(name = "toolchains_llvm_bootstrapped", version = "0.2.4") bazel_dep(name = "with_cfg.bzl", version = "0.11.0") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 4f754c0..5fa256d 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -53,7 +53,6 @@ "https://bazel-registry.zml.ai/modules/bazel_skylib/1.7.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/bazel_skylib/1.7.1/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/bazel_skylib/1.8.1/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/buildifier_prebuilt/6.4.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/buildifier_prebuilt/8.2.0.2/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/buildozer/7.1.2/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/google_benchmark/1.8.2/MODULE.bazel": "not found", @@ -80,8 +79,6 @@ "https://bazel-registry.zml.ai/modules/platforms/0.0.9/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/platforms/1.0.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/protobuf/21.7/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/protobuf/23.1/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/protobuf/24.4/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/protobuf/27.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/protobuf/27.1/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/protobuf/29.0-rc2/MODULE.bazel": "not found", @@ -119,7 +116,6 @@ "https://bazel-registry.zml.ai/modules/rules_java/6.3.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_java/6.4.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_java/6.5.2/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/rules_java/7.1.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_java/7.10.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_java/7.12.2/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_java/7.2.0/MODULE.bazel": "not found", @@ -143,7 +139,6 @@ "https://bazel-registry.zml.ai/modules/rules_license/0.0.3/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_license/0.0.7/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_license/1.0.0/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/rules_multitool/0.11.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_oci/2.2.6/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_pkg/0.7.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_pkg/1.0.1/MODULE.bazel": "not found", @@ -160,7 +155,6 @@ "https://bazel-registry.zml.ai/modules/rules_python/0.29.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_python/0.31.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_python/0.33.2/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/rules_python/0.34.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_python/0.4.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_python/0.40.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_python/1.4.1/MODULE.bazel": "not found", @@ -171,7 +165,6 @@ "https://bazel-registry.zml.ai/modules/rules_shell/0.4.1/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_swift/1.16.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/rules_swift/2.1.1/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/rules_uv/0.87.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/stardoc/0.5.1/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/stardoc/0.5.3/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/stardoc/0.5.4/MODULE.bazel": "not found", @@ -184,7 +177,6 @@ "https://bazel-registry.zml.ai/modules/tar.bzl/0.2.1/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/toolchains_llvm_bootstrapped/0.2.4/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "not found", - "https://bazel-registry.zml.ai/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/with_cfg.bzl/0.11.0/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/with_cfg.bzl/0.9.2/MODULE.bazel": "not found", "https://bazel-registry.zml.ai/modules/yq.bzl/0.1.1/MODULE.bazel": "not found", @@ -251,7 +243,6 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6", "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/source.json": "7ebaefba0b03efe59cac88ed5bbc67bcf59a3eff33af937345ede2a38b2d368a", - "https://bcr.bazel.build/modules/buildifier_prebuilt/6.4.0/MODULE.bazel": "37389c6b5a40c59410b4226d3bb54b08637f393d66e2fa57925c6fcf68e64bf4", "https://bcr.bazel.build/modules/buildifier_prebuilt/8.2.0.2/MODULE.bazel": "a9b689711d5b69f9db741649b218c119b9fdf82924ba390415037e09798edd03", "https://bcr.bazel.build/modules/buildifier_prebuilt/8.2.0.2/source.json": "51eb0a4b38aaaeab7fa64361576d616c4d8bfd0f17a0a10184aeab7084d79f8e", "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", @@ -288,8 +279,6 @@ "https://bcr.bazel.build/modules/platforms/1.0.0/MODULE.bazel": "f05feb42b48f1b3c225e4ccf351f367be0371411a803198ec34a389fb22aa580", "https://bcr.bazel.build/modules/platforms/1.0.0/source.json": "f4ff1fd412e0246fd38c82328eb209130ead81d62dcd5a9e40910f867f733d96", "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", - "https://bcr.bazel.build/modules/protobuf/23.1/MODULE.bazel": "88b393b3eb4101d18129e5db51847cd40a5517a53e81216144a8c32dfeeca52a", - "https://bcr.bazel.build/modules/protobuf/24.4/MODULE.bazel": "7bc7ce5f2abf36b3b7b7c8218d3acdebb9426aeb35c2257c96445756f970eb12", "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", "https://bcr.bazel.build/modules/protobuf/27.1/MODULE.bazel": "703a7b614728bb06647f965264967a8ef1c39e09e8f167b3ca0bb1fd80449c0d", "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", @@ -334,7 +323,6 @@ "https://bcr.bazel.build/modules/rules_java/6.3.0/MODULE.bazel": "a97c7678c19f236a956ad260d59c86e10a463badb7eb2eda787490f4c969b963", "https://bcr.bazel.build/modules/rules_java/6.4.0/MODULE.bazel": "e986a9fe25aeaa84ac17ca093ef13a4637f6107375f64667a15999f77db6c8f6", "https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31", - "https://bcr.bazel.build/modules/rules_java/7.1.0/MODULE.bazel": "30d9135a2b6561c761bd67bd4990da591e6bdc128790ce3e7afd6a3558b2fb64", "https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a", "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", @@ -362,8 +350,6 @@ "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", - "https://bcr.bazel.build/modules/rules_multitool/0.11.0/MODULE.bazel": "8d9dda78d2398e136300d3ef4fbcc89ede7c32c158d8c016fa7d032df41c4aaf", - "https://bcr.bazel.build/modules/rules_multitool/0.11.0/source.json": "0b86574a1eaff37c33aafaff095ea16d6ac846beb94ffc74c4fcf626f8f80681", "https://bcr.bazel.build/modules/rules_oci/2.2.6/MODULE.bazel": "2ba6ddd679269e00aeffe9ca04faa2d0ca4129650982c9246d0d459fe2da47d9", "https://bcr.bazel.build/modules/rules_oci/2.2.6/source.json": "94e7decb8f95d9465b0bbea71c65064cd16083be1350c7468f131818641dc4a5", "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", @@ -383,7 +369,6 @@ "https://bcr.bazel.build/modules/rules_python/0.29.0/MODULE.bazel": "2ac8cd70524b4b9ec49a0b8284c79e4cd86199296f82f6e0d5da3f783d660c82", "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58", "https://bcr.bazel.build/modules/rules_python/0.33.2/MODULE.bazel": "3e036c4ad8d804a4dad897d333d8dce200d943df4827cb849840055be8d2e937", - "https://bcr.bazel.build/modules/rules_python/0.34.0/MODULE.bazel": "1d623d026e075b78c9fde483a889cda7996f5da4f36dffb24c246ab30f06513a", "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", "https://bcr.bazel.build/modules/rules_python/0.40.0/MODULE.bazel": "9d1a3cd88ed7d8e39583d9ffe56ae8a244f67783ae89b60caafc9f5cf318ada7", "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6", @@ -398,8 +383,6 @@ "https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca", "https://bcr.bazel.build/modules/rules_swift/2.1.1/MODULE.bazel": "494900a80f944fc7aa61500c2073d9729dff0b764f0e89b824eb746959bc1046", "https://bcr.bazel.build/modules/rules_swift/2.1.1/source.json": "40fc69dfaac64deddbb75bd99cdac55f4427d9ca0afbe408576a65428427a186", - "https://bcr.bazel.build/modules/rules_uv/0.87.0/MODULE.bazel": "1f50b350458384f5c327ce04d943361435c772a80834536fc0eeebe92f3a7b95", - "https://bcr.bazel.build/modules/rules_uv/0.87.0/source.json": "2d75593d5c1126f6b7a014d14fb0771a24b7bd2e1de700f3e5e522ff0554b95c", "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", "https://bcr.bazel.build/modules/stardoc/0.5.4/MODULE.bazel": "6569966df04610b8520957cb8e97cf2e9faac2c0309657c537ab51c16c18a2a4", @@ -416,7 +399,6 @@ "https://bcr.bazel.build/modules/toolchains_llvm_bootstrapped/0.2.4/MODULE.bazel": "859f02226bc313a622f56b816582fb55d5aaced4a1ecde7397dd4a9ebd24321e", "https://bcr.bazel.build/modules/toolchains_llvm_bootstrapped/0.2.4/source.json": "43c5fd6b585cbf0b642157b6843a25425d541fabe638acb7bc908846c4bda8ca", "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", - "https://bcr.bazel.build/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "c0df5e35ad55e264160417fd0875932ee3c9dda63d9fccace35ac62f45e1b6f9", "https://bcr.bazel.build/modules/with_cfg.bzl/0.11.0/MODULE.bazel": "bcb1dba64b74542648a93d6313e160b2670f22395581edd8c4ffadb811618ef7", "https://bcr.bazel.build/modules/with_cfg.bzl/0.11.0/source.json": "19102ff7f611a7a821e11d866868ad541abb4f5757e37e1c40adb6834ebf6205", "https://bcr.bazel.build/modules/with_cfg.bzl/0.9.2/MODULE.bazel": "8008021cb802e87e22b3e2b6f403c0529d4b865703fdcd40e2f36c23a651291c", @@ -816,102 +798,6 @@ ] } }, - "@@rules_multitool+//multitool:extension.bzl%multitool": { - "general": { - "bzlTransitiveDigest": "CxG1tSKAppSqmYJtpLgGpxrOvrd/xewKD0M2kCNfvOo=", - "usagesDigest": "kKFKsjNo1vbiSGlyYYHdSAj1Z8xtmvq8JBs56ZEpNS4=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "multitool.linux_arm64": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_env_specific_tools", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ], - "os": "linux", - "cpu": "arm64" - } - }, - "multitool.linux_x86_64": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_env_specific_tools", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ], - "os": "linux", - "cpu": "x86_64" - } - }, - "multitool.macos_arm64": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_env_specific_tools", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ], - "os": "macos", - "cpu": "arm64" - } - }, - "multitool.macos_x86_64": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_env_specific_tools", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ], - "os": "macos", - "cpu": "x86_64" - } - }, - "multitool.windows_arm64": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_env_specific_tools", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ], - "os": "windows", - "cpu": "arm64" - } - }, - "multitool.windows_x86_64": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_env_specific_tools", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ], - "os": "windows", - "cpu": "x86_64" - } - }, - "multitool": { - "repoRuleId": "@@rules_multitool+//multitool/private:multitool.bzl%_multitool_hub", - "attributes": { - "lockfiles": [ - "@@rules_uv+//uv/private:uv.lock.json" - ] - } - } - }, - "recordedRepoMappingEntries": [ - [ - "bazel_features+", - "bazel_features_globals", - "bazel_features++version_extension+bazel_features_globals" - ], - [ - "bazel_features+", - "bazel_features_version", - "bazel_features++version_extension+bazel_features_version" - ], - [ - "rules_multitool+", - "bazel_features", - "bazel_features+" - ] - ] - } - }, "@@rules_oci+//oci:extensions.bzl%oci": { "general": { "bzlTransitiveDigest": "4LJBCkExDO/zET3DzuMS4pDRRr4V0gc6YgFMhM6wIjI=", diff --git a/ffi/BUILD.bazel b/ffi/BUILD.bazel index ed5f95b..1bf8ca7 100644 --- a/ffi/BUILD.bazel +++ b/ffi/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_zig//zig:defs.bzl", "zig_library") cc_library( diff --git a/runtimes/common/packages.bzl b/runtimes/common/packages.bzl index abb2ab1..633f98b 100644 --- a/runtimes/common/packages.bzl +++ b/runtimes/common/packages.bzl @@ -1,5 +1,3 @@ -load("//bazel:http_deb_archive.bzl", "http_deb_archive") - _BUILD_FILE_DEFAULT_VISIBILITY = """\ package(default_visibility = ["//visibility:public"]) """ diff --git a/runtimes/cpu/BUILD.bazel b/runtimes/cpu/BUILD.bazel index fe803c2..40760fd 100644 --- a/runtimes/cpu/BUILD.bazel +++ b/runtimes/cpu/BUILD.bazel @@ -1,4 +1,5 @@ load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_zig//zig:defs.bzl", "zig_library") config_setting( @@ -23,19 +24,19 @@ cc_library( copy_to_directory( name = "sandbox", - out = "sandbox/lib", srcs = select({ ":darwin_arm64": ["@libpjrt_cpu_darwin_arm64//:libpjrt_cpu"], ":darwin_amd64": ["@libpjrt_cpu_darwin_amd64//:libpjrt_cpu"], "@platforms//os:linux": ["@libpjrt_cpu_linux_amd64//:libpjrt_cpu"], }), + out = "sandbox/lib", include_external_repositories = ["**"], ) cc_library( name = "libpjrt_cpu", - defines = ["ZML_RUNTIME_CPU"], data = [":sandbox"], + defines = ["ZML_RUNTIME_CPU"], ) zig_library( diff --git a/runtimes/cuda/BUILD.bazel b/runtimes/cuda/BUILD.bazel index 38904d4..96cc587 100644 --- a/runtimes/cuda/BUILD.bazel +++ b/runtimes/cuda/BUILD.bazel @@ -3,13 +3,13 @@ load("@rules_zig//zig:defs.bzl", "zig_library", "zig_shared_library") zig_shared_library( name = "zmlxcuda", - main = "zmlxcuda.zig", # Use Clang's compiler-rt, but disable stack checking # to avoid requiring on the _zig_probe_stack symbol. copts = ["-fno-stack-check"], + main = "zmlxcuda.zig", shared_lib_name = "libzmlxcuda.so.0", - deps = ["//stdx"], visibility = ["@libpjrt_cuda//:__subpackages__"], + deps = ["//stdx"], ) cc_library( diff --git a/runtimes/cuda/cuda.bzl b/runtimes/cuda/cuda.bzl index 3380694..9920103 100644 --- a/runtimes/cuda/cuda.bzl +++ b/runtimes/cuda/cuda.bzl @@ -130,7 +130,7 @@ def _read_redist_json(mctx, url, sha256): def _cuda_impl(mctx): loaded_packages = packages.read(mctx, [ - "@zml//runtimes/cuda:packages.lock.json", + "@zml//runtimes/cuda:packages.lock.json", ]) CUDA_REDIST = _read_redist_json( mctx, diff --git a/runtimes/cuda/cuda.zig b/runtimes/cuda/cuda.zig index a7fc166..c07c0e9 100644 --- a/runtimes/cuda/cuda.zig +++ b/runtimes/cuda/cuda.zig @@ -1,5 +1,5 @@ -const builtin = @import("builtin"); const std = @import("std"); +const builtin = @import("builtin"); const asynk = @import("async"); const bazel_builtin = @import("bazel_builtin"); @@ -22,12 +22,7 @@ fn hasNvidiaDevice() bool { } fn hasCudaPathInLDPath() bool { - const ldLibraryPath = c.getenv("LD_LIBRARY_PATH"); - - if (ldLibraryPath == null) { - return false; - } - + const ldLibraryPath = std.c.getenv("LD_LIBRARY_PATH") orelse return false; return std.ascii.indexOfIgnoreCase(std.mem.span(ldLibraryPath), nvidiaLibsPath) != null; } diff --git a/runtimes/rocm/BUILD.bazel b/runtimes/rocm/BUILD.bazel index f94e806..7355dc9 100644 --- a/runtimes/rocm/BUILD.bazel +++ b/runtimes/rocm/BUILD.bazel @@ -3,13 +3,13 @@ load("@rules_zig//zig:defs.bzl", "zig_library", "zig_shared_library") zig_shared_library( name = "zmlxrocm", - main = "zmlxrocm.zig", # Use Clang's compiler-rt, but disable stack checking # to avoid requiring on the _zig_probe_stack symbol. copts = ["-fno-stack-check"], + main = "zmlxrocm.zig", shared_lib_name = "libzmlxrocm.so.0", - deps = ["//stdx"], visibility = ["@libpjrt_rocm//:__subpackages__"], + deps = ["//stdx"], ) alias( diff --git a/runtimes/tpu/BUILD.bazel b/runtimes/tpu/BUILD.bazel index 94ae63c..8939fef 100644 --- a/runtimes/tpu/BUILD.bazel +++ b/runtimes/tpu/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_zig//zig:defs.bzl", "zig_library") cc_library( diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index b27a966..af65de3 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -1,7 +1,5 @@ load("@rules_python//python:py_library.bzl", "py_library") load("@rules_python//python/entry_points:py_console_script_binary.bzl", "py_console_script_binary") -load("@rules_python//python/uv:lock.bzl", uv_lock = "lock") -load("@rules_uv//uv:pip.bzl", "pip_compile") py_library( name = "zml_utils", @@ -11,24 +9,7 @@ py_library( py_console_script_binary( name = "hf", - script = "hf", pkg = "@huggingface_hub//huggingface_hub:pkg", + script = "hf", visibility = ["//visibility:public"], ) - -pip_compile( - name = "hf_update_requirements", - args = [ - "--generate-hashes", - "--emit-index-url", - "--emit-find-links", - "--no-strip-extras", - "--index-strategy=unsafe-best-match", - "--upgrade", - ], - requirements_in = "hf_requirements.in", - requirements_txt = "hf_requirements.lock.txt", - tags = [ - "manual", - ], -) diff --git a/tools/hf/BUILD.bazel b/tools/hf/BUILD.bazel index 154f165..21a5315 100644 --- a/tools/hf/BUILD.bazel +++ b/tools/hf/BUILD.bazel @@ -9,7 +9,7 @@ py_console_script_binary( uv_lock( name = "requirements", - srcs = ["pyproject.toml"], + srcs = ["requirements.in"], out = "requirements.lock.txt", args = ["--upgrade"], tags = ["manual"], diff --git a/tools/hf/pyproject.toml b/tools/hf/pyproject.toml deleted file mode 100644 index d65bcf2..0000000 --- a/tools/hf/pyproject.toml +++ /dev/null @@ -1,4 +0,0 @@ -[project] -name = "hf" -version = "0.1.0" -dependencies = ["huggingface_hub"] diff --git a/tools/hf/requirements.in b/tools/hf/requirements.in new file mode 100644 index 0000000..6b964cc --- /dev/null +++ b/tools/hf/requirements.in @@ -0,0 +1 @@ +huggingface_hub diff --git a/tools/hf/requirements.lock.txt b/tools/hf/requirements.lock.txt index f428867..3657ce1 100644 --- a/tools/hf/requirements.lock.txt +++ b/tools/hf/requirements.lock.txt @@ -93,20 +93,20 @@ fsspec==2025.7.0 \ --hash=sha256:786120687ffa54b8283d942929540d8bc5ccfa820deb555a2b5d0ed2b737bf58 \ --hash=sha256:8b012e39f63c7d5f10474de957f3ab793b47b45ae7d39f2fb735f8bbe25c0e21 # via huggingface-hub -hf-xet==1.1.7 \ - --hash=sha256:18b61bbae92d56ae731b92087c44efcac216071182c603fc535f8e29ec4b09b8 \ - --hash=sha256:20cec8db4561338824a3b5f8c19774055b04a8df7fff0cb1ff2cb1a0c1607b80 \ - --hash=sha256:2e356da7d284479ae0f1dea3cf5a2f74fdf925d6dca84ac4341930d892c7cb34 \ - --hash=sha256:60dae4b44d520819e54e216a2505685248ec0adbdb2dd4848b17aa85a0375cde \ - --hash=sha256:6efaaf1a5a9fc3a501d3e71e88a6bfebc69ee3a716d0e713a931c8b8d920038f \ - --hash=sha256:713f2bff61b252f8523739969f247aa354ad8e6d869b8281e174e2ea1bb8d604 \ - --hash=sha256:751571540f9c1fbad9afcf222a5fb96daf2384bf821317b8bfb0c59d86078513 \ - --hash=sha256:b109f4c11e01c057fc82004c9e51e6cdfe2cb230637644ade40c599739067b2e +hf-xet==1.1.8 \ + --hash=sha256:09e86514c3c4284ed8a57d6b0f3d089f9836a0af0a1ceb3c9dd664f1f3eaefef \ + --hash=sha256:25b9d43333bbef39aeae1616789ec329c21401a7fe30969d538791076227b591 \ + --hash=sha256:3d5f82e533fc51c7daad0f9b655d9c7811b5308e5890236828bd1dd3ed8fea74 \ + --hash=sha256:4171f31d87b13da4af1ed86c98cf763292e4720c088b4957cf9d564f92904ca9 \ + --hash=sha256:4a9b99ab721d385b83f4fc8ee4e0366b0b59dce03b5888a86029cc0ca634efbf \ + --hash=sha256:62a0043e441753bbc446dcb5a3fe40a4d03f5fb9f13589ef1df9ab19252beb53 \ + --hash=sha256:8e2dba5896bca3ab61d0bef4f01a1647004de59640701b37e37eaa57087bbd9d \ + --hash=sha256:bfe5700bc729be3d33d4e9a9b5cc17a951bf8c7ada7ba0c9198a6ab2053b7453 # via huggingface-hub huggingface-hub==0.34.4 \ --hash=sha256:9b365d781739c93ff90c359844221beef048403f1bc1f1c123c191257c3c890a \ --hash=sha256:a4228daa6fb001be3f4f4bdaf9a0db00e1739235702848df00885c9b5742c85c - # via hf (tools/hf/pyproject.toml) + # via -r tools/hf/requirements.in idna==3.10 \ --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 @@ -170,9 +170,9 @@ pyyaml==6.0.2 \ --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \ --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4 # via huggingface-hub -requests==2.32.4 \ - --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c \ - --hash=sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422 +requests==2.32.5 \ + --hash=sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6 \ + --hash=sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf # via huggingface-hub tqdm==4.67.1 \ --hash=sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2 \ diff --git a/upb/BUILD.bazel b/upb/BUILD.bazel index 316cad3..ebf973f 100644 --- a/upb/BUILD.bazel +++ b/upb/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_zig//zig:defs.bzl", "zig_library") cc_library( @@ -11,6 +12,6 @@ cc_library( zig_library( name = "upb", main = "upb.zig", - deps = [":upb_c"], visibility = ["//visibility:public"], + deps = [":upb_c"], ) diff --git a/zml/tools/BUILD.bazel b/zml/tools/BUILD.bazel index 7579fb9..ff8c1b0 100644 --- a/zml/tools/BUILD.bazel +++ b/zml/tools/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_zig//zig:defs.bzl", "zig_library") cc_library( @@ -25,5 +26,5 @@ zig_library( cc_static_library( name = "macos_static_tools", - deps = ["macos_c"] + deps = ["macos_c"], )