[NPU] avoid HiFT linear interpolation device fault - #1937
Open
TKevin0v0 wants to merge 1 commit into
Open
Conversation
TKevin0v0
force-pushed
the
fix/npu-hift-linear-interpolate
branch
from
August 24, 2026 10:37
053acb7 to
be8579e
Compare
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.
[NPU] avoid HiFT linear interpolation device fault
Motivation
CosyVoice3 HiFT inference fails on Ascend NPU with a
507015AI Vectorexception. Device slog identifies the first failing kernel as
UpsampleLinear1d_*_high_performance_2withVEC instruction error: the ub address out of bounds.The failing call is the SineGen2 phase downsampling used by 24 kHz
CosyVoice3:
Making the input contiguous does not avoid the device fault.
Modifications
F.interpolate(..., mode="linear")path for CPU,CUDA, and other devices.
align_corners=Falsesource coordinates usingindex_selectand interpolation weights.fallback.
6720 -> 14downsampling andthe reverse
14 -> 6720scale.Correctness and runtime validation
6720 -> 14: max absolute difference vs. CPU reference =0.14 -> 6720: max absolute difference =1.19e-7.(1, 6720) float32./v1/audio/speechreturns HTTP 200 and a valid PCM16 mono24 kHz WAV.
2 passed.git diff --check: passed.Scope
This is a model-side workaround for an Ascend built-in operator fault. It does
not claim to patch the internal CANN kernel implementation.
Related: sgl-project/sglang-omni#1652