Repository navigation
finegrained-kernels: accept MX scale bytes without native UE8M0 - #1238
Open
IlyasMoutawwakil wants to merge 7 commits into
Open
IlyasMoutawwakil wants to merge 7 commits into
IlyasMoutawwakil wants to merge 7 commits into
Conversation
|
This PR changes source code for the following kernel(s): If you have the kernel-bot build permissions, then trigger |
|
|
||
|
|
||
| import os | ||
| from typing import List |
Member
Author
There was a problem hiding this comment.
torch op registration on older torch versions didn't accept annotating with list
3 of 4 tasks
IlyasMoutawwakil
added this pull request to stack #1244
October 18, 2026 07:58
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Accept existing
uint8MX scale bytes when PyTorch lackstorch.float8_e8m0fnu. Guard optional dtype access in format detection and forward/backward paths, while retaining the native dtype's zero-copy byte view.Native GitHub stack #1244: #1238 (this PR) → #1239 (quantized embeddings). Review and merge bottom to top.
Correct shared scale decoding for UE8M0 byte 0 (
2^-127) and byte 255 (NaN). Usetyping.Listonly at custom-op schema boundaries that older PyTorch requires.Validation: the missing-dtype regression uses
monkeypatch; a compact Triton regression checks eight exponent bytes, including both boundaries, with a cold cache. Both passed. Ruff and diff checks passed. The missing-dtype test simulates that condition on the installed PyTorch.Related issue
Requested by a maintainer for huggingface/transformers#49658.
Checklist