This repository was archived by the owner on Apr 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Add kernels package/command to generated flake output
#251
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: "Test kernel flake commands" | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| types: [opened, synchronize, reopened] # trigger on PRs | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build kernel | ||
| runs-on: | ||
| group: aws-g6-12xlarge-plus | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: cachix/install-nix-action@v27 | ||
| with: | ||
| nix_path: nixpkgs=channel:nixos-unstable | ||
| - uses: cachix/cachix-action@v14 | ||
| with: | ||
| name: huggingface | ||
| #authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
| env: | ||
| USER: github_runner | ||
| - name: Test nix run .#kernels | ||
| run: ( cd examples/relu ; nix run .#kernels -- lock ../../tests/run-kernels ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| rustPlatform, | ||
| }: | ||
|
|
||
| let | ||
| version = | ||
| (builtins.fromTOML (builtins.readFile ../../../kernel-abi-check/kernel-abi-check/Cargo.toml)) | ||
| .package.version; | ||
| in | ||
| buildPythonPackage { | ||
| pname = "kernel-abi-check"; | ||
| inherit version; | ||
| format = "pyproject"; | ||
|
|
||
| src = | ||
| let | ||
| sourceFiles = | ||
| file: | ||
| file.name == "Cargo.toml" | ||
| || file.name == "Cargo.lock" | ||
| || file.name == "manylinux-policy.json" | ||
| || file.hasExt "pyi" | ||
| || file.name == "pyproject.toml" | ||
| || file.hasExt "rs" | ||
| || file.name == "stable_abi.toml"; | ||
| in | ||
| lib.fileset.toSource { | ||
| root = ../../../kernel-abi-check; | ||
| fileset = lib.fileset.fileFilter sourceFiles ../../../kernel-abi-check; | ||
| }; | ||
|
|
||
| cargoDeps = rustPlatform.importCargoLock { | ||
| lockFile = ../../../kernel-abi-check/bindings/python/Cargo.lock; | ||
| }; | ||
|
|
||
| sourceRoot = "source/bindings/python"; | ||
|
|
||
| build-system = [ | ||
| rustPlatform.cargoSetupHook | ||
| rustPlatform.maturinBuildHook | ||
| ]; | ||
|
|
||
| meta = with lib; { | ||
| description = "Check ABI compliance of Hugging Face Hub kernels"; | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [tool.kernels.dependencies] | ||
| "kernels-test/versions" = ">=0.1.0,<0.2.0" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need to add this derivation here since we have it in
pkgs/kernel-abi-check/default.nixUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkgs/kernel-abi-check/default.nixis Rust version (command-line utility), this is the Python module.