[XPU] Bump xpu-sdnn-objects to v0.3.6.6.1 to fix the int8 dot failure - #1099
Open
hulong02-klx wants to merge 2 commits into
Open
[XPU] Bump xpu-sdnn-objects to v0.3.6.6.1 to fix the int8 dot failure#1099hulong02-klx wants to merge 2 commits into
hulong02-klx wants to merge 2 commits into
Conversation
An i8 -> f32 conversion in the kernel becomes an arith.sitofp inside a linalg.generic, which TritonSDNNLegalize rewrites into an sdnn.dma cvt and DMAInCvtCombiner then folds into the input-side sdnn.dma in, leaving a single converting i8 -> f32 DMA. That transfer is programmed with cfg_type=0, whose third field is the (de)quantisation scale the engine applies whenever it converts between an integer and a floating-point element type. The old objects left that field at 0, so every element was multiplied by 0.0f: an i8 -3 landed in unisram as -0.0f and a tl.dot fed from that buffer returned all zeros. The float -> int direction was already routed to dma_cfg_data_type_quant; the int -> float dequant direction was not. v0.3.6.6.1 is v0.3.6.6.0 with only lib/Conversion/TritonSDNNToLLVM/ TritonSDNNToLLVM.cpp.o rebuilt, plus debug info stripped from every object and archive in the tarball (the previous release shipped 788MB of debug_info in libTritonSharedForXPU.a alone), which takes the download from 152MB to 2.9MB. sha256 d54f7d256a4dc244fbcec1c30fb6d3b2a126417567a600f65f87348b82fadabd Verified on KL3 (xpu3): int8 x int8 -> f32 tl.dot now matches torch.mm, whereas v0.3.6.6.0 mismatches on 99.8% of elements (all-zero output).
|
|
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.
An i8 -> f32 conversion in the kernel becomes an arith.sitofp inside a linalg.generic, which TritonSDNNLegalize rewrites into an sdnn.dma cvt and DMAInCvtCombiner then folds into the input-side sdnn.dma in, leaving a single converting i8 -> f32 DMA. That transfer is programmed with cfg_type=0, whose third field is the (de)quantisation scale the engine applies whenever it converts between an integer and a floating-point element type. The old objects left that field at 0, so every element was multiplied by 0.0f: an i8 -3 landed in unisram as -0.0f and a tl.dot fed from that buffer returned all zeros. The float -> int direction was already routed to dma_cfg_data_type_quant; the int -> float dequant direction was not.
v0.3.6.6.1 is v0.3.6.6.0 with only lib/Conversion/TritonSDNNToLLVM/ TritonSDNNToLLVM.cpp.o rebuilt, plus debug info stripped from every object and archive in the tarball (the previous release shipped 788MB of debug_info in libTritonSharedForXPU.a alone), which takes the download from 152MB to 2.9MB. sha256 d54f7d256a4dc244fbcec1c30fb6d3b2a126417567a600f65f87348b82fadabd
Verified on KL3 (xpu3): int8 x int8 -> f32 tl.dot now matches torch.mm, whereas v0.3.6.6.0 mismatches on 99.8% of elements (all-zero output).