Skip to content

Improved error message for unavailable variant#504

Open
theely wants to merge 2 commits intohuggingface:mainfrom
theely:main
Open

Improved error message for unavailable variant#504
theely wants to merge 2 commits intohuggingface:mainfrom
theely:main

Conversation

@theely
Copy link
Copy Markdown

@theely theely commented Apr 24, 2026

If a kernel is not available, the raised exception now also includes the name of the required variant.
This change should help users to identify what variant they need for their system.

Copy link
Copy Markdown
Member

@danieldk danieldk left a comment

Choose a reason for hiding this comment

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

Thanks for contributing to kernels!

Enumeration of variants is always going to be incomplete, see: #422 E.g., in the PR

        missing_variant.filename = f"torch{torch_version.major}{torch_version.minor}-{'cxx11' if torch_cxx11_abi else 'cxx98'}-cu{selected_backend.version.major}{selected_backend.version.minor}-{cpu}-{os}"

Misses: tvm-ffi, the variant without the ABI tag (which is also supported), backwards CUDA compatibility (e.g. if the system has CUDA 12.8, CUDA 12.1 to 12.7 are also supported), etc. In this case it would also report the a variant for cu if the backend is ROCm, XPU, NPU, CPU, Metal, etc.

We discussed this a while back and came to the conclusion that we are instead going to add support for 'explaining', where for every available variant it's possible to get/list the reason why it is not selected.

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.

2 participants