More (optional) load time verification

Open
#715 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

Start by reading the verification logic in src/transformers/integrations/deepgemm.py lines 80-204 and sonicmoe.py lines 49-68, then trace the kernel-loading get-kernel entry point. Define how load-time checks should cover NVCC, CUDA architecture, and optional dependency versions, including whether they are flag-controlled. Done means the supported checks work at load time and the duplicated manual verification can be reduced.

Written by the indexing model from the issue text.

Description

enhancement
Description

Based on our slack conversation

A lot of kernels still need to be verified after loading, leading to a lot of bloated code

It makes the development and usage way more painful and imo kernels could take a part here to allow on load verification for these certain features attributes

  • NVCC
  • (Cuda) Architecture
  • Cute dsl versioning (so any optional dep)
Motivation

Make kernels as dumb to use as we can :D

Proposed approach

Load time verification on get kernel that checks for hw specifics and pinned versions; maybe hidden behind a flag

Alternatives considered

I mean yes, that is exactly what we currently do -> manually check ourselves

Additional context

No response

Dominant language
Python
Stars
783
Forks
143
Avg merge
1d 10h
Merged PRs (30d)
57

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from huggingface/kernels

All issues in huggingface/kernels

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.