Repository navigation
[CuTeDSL] Give integer TensorSSA true division a Float32 result - #3872
Open
ruiling-smartbear wants to merge 1 commit into
Open
ruiling-smartbear wants to merge 1 commit into
ruiling-smartbear wants to merge 1 commit into
Conversation
fengxie
approved these changes
Nov 18, 2026
The f32 vector from integer / was labeled with the integer type, so storing it gave wrong values or a type error. Use Float32, as scalar Int32 / Int32 does.
ruiling-smartbear
force-pushed
the
cutedsl-tensorssa-int-truediv
branch
from
November 24, 2026 03:54
3a2604f to
862c796
Compare
This branch has not been deployed
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.
Fixes #3871.
For integer
TensorSSAvalues,/produces an f32 vector, but_apply_opkeeps the integer element type on the result. Storing it gives wrong values or a type error, and.to(Float32)fails to build IR.This sets the result type to
Float32for integer true division, the same as the scalar path inbase_dsl/typing.pydoes forInt32 / Int32.Test
test/python/CuTeDSL/test_tensor_ssa_truediv.pydividesInt32,Int8andUint8tensors by a tensor, a tensor by a Python int, and a Python int by a tensor, stores the results into aFloat32tensor (directly and through.to(Float32)) and compares with torch. On an A10G with nvidia-cutlass-dsl 4.8.1 all three types fail without the change and pass with it. The other tests intest/python/CuTeDSLgive the same results with and without the change.