Skip to content

fix(vecscope): preserve hazards with unknown memory footprints - #1703

Open
chenshengxin2026 wants to merge 1 commit into
hw-native-sys:masterfrom
chenshengxin2026:fix/vecscope-unknown-dependences
Open

chenshengxin2026 wants to merge 1 commit into
hw-native-sys:masterfrom
chenshengxin2026:fix/vecscope-unknown-dependences

Conversation

@chenshengxin2026

Copy link
Copy Markdown
Collaborator

Reduction point stores followed by gather or unaligned loads can currently run without a required UB memory barrier: an incomplete dependence model records Unknown and skips placement. Preserve those potential hazards unless independence is proven, including carrying-loop hazards for deep nests, external offsets and unmodelled footprints.

The change retains exact no-alias exclusions and the existing barrier-family, placement and redundancy machinery. Conservative fallback may add barriers where the current model cannot prove independence. It does not change scalar-only ordering or GM synchronization.

Fixes #1702. Fixes #1679.

Validation:

  • Built the current master compiler and Python package with the patch.
  • All 25 vecscope memory-barrier and issue1593 lit tests pass, including new reduction-to-gather, store-to-unaligned-load and external-offset/deep-loop regressions.
  • Actual Ascend950 device validation through the shared-machine task queue: RMS backward at 3 token sizes, stable TopK at 4 shapes, Sinkhorn forward at 3 token/iteration configurations, and one-iteration Sinkhorn backward. These runs use the native compiler fix without injected barriers. Multi-iteration Sinkhorn backward is separately blocked by a TileLang conditional-loop lowering restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants