Skip to content

gen-flake-outputs: add ci-test package#281

Open
danieldk wants to merge 4 commits intomainfrom
flake-ci-test
Open

gen-flake-outputs: add ci-test package#281
danieldk wants to merge 4 commits intomainfrom
flake-ci-test

Conversation

@danieldk
Copy link
Member

@danieldk danieldk commented Feb 13, 2026

Running this output will run the kernel's tests. CI tests must be marked with kernels_ci. This avoids running all tests, which may be too expensive for CI.

Example run: https://github.com/huggingface/kernels-community/actions/runs/21980763830/job/63503495972?pr=364

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Running this output will run the kernel's tests. CI tests must
be marked with `kernels_ci`. This avoids running all tests, which may be
too expensive for CI.
`rec` can lead to annoying issues due to shadowing, as was happening
here with the `kernels` output.
MekkCyber
MekkCyber previously approved these changes Feb 13, 2026
Copy link
Collaborator

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I like the marker idea

sayakpaul
sayakpaul previously approved these changes Feb 13, 2026
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Do we want to propagate this marker to the tests we maintain in kernels-community?


## Kernel tests

Kernel tests are stored in the `tests` directory. Since running all
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add guidance on what kind of tests would be ideal for this? Like we would want tests that run fast yet provide some confidence?

$ nix run .#ci-test
```

On non-NixOS systems, make sure that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, currently, it seems limited to CUDA-only tests?

Copy link
Member Author

@danieldk danieldk Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also works on non-CUDA, I should update the doc to mention this. Basically it is like this:

  • If the kernels supports one of CUDA/ROCm/XPU/Metal, the test for the supported backend will be run.
  • If the kernels supports multiple backends, CUDA is the default on Linux and Metal on macOS.
  • You can always run the tests for any variant with nix run .#ciTests.<variant>, for instance: nix run .#ciTests.torch210-cxx11-cpu-x86_64-linux

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaining. Should we include this more explicitly in the docs then?

Co-authored-by: Mohamed Mekkouri <93391238+MekkCyber@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants