Skip to content

[Fix] Honor 1D strides in Ascend activations and follow module aliases in test selection - #1374

Merged
zhiyuan1i merged 1 commit into
fla-org:mainfrom
sunyi0505:fix_acc
Oct 12, 2026
Merged

zhiyuan1i merged 1 commit into
fla-org:mainfrom
sunyi0505:fix_acc

Conversation

@sunyi0505

Copy link
Copy Markdown
Contributor

Summary

  • For _is_inner_contiguous in Ascend vector activation, all 1D tensors were previously treated as internally contiguous. Views like x[::3] have stride(-1) != 1, while the kernel uses dense column-wise indexing. Therefore, for 1D tensors, we now check is_contiguous() and call contiguous() when non-contiguous.
  • In addition to continuing to track symbols for re-export, find_dependent_tests also reads _MODULE_ALIASES. Imports for single-target aliases (e.g., fla.modules.l2norm → fla.modules.norm.l2norm) are mapped to canonical modules and expanded alongside re-exports; multi-target aliases (e.g., conv) are not expanded.

Test plan

FLA_NPU_XDIST=1 ASCEND_RT_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 pytest -s -v --exitfirst -n 8 --dist load tests/modules/ tests/test_dependency_finder.py
image

Benchmark / NCU

Not involved

Breaking changes

None

Checklist

  • I have read CONTRIBUTING.md and follow its conventions (code style, docstrings, commit prefixes).
  • I have read AGENTS.md and, where my change matches its scope, the relevant skill under .agents/skills.
  • Dependent tests pass locally or in CI, and new behavior is covered by tests where applicable (tick as N/A for changes with no testable code, e.g. docs-only).
  • Kernel changes include same-hardware before/after benchmark numbers, dense + varlen where applicable (tick as N/A when no kernel code changed).
  • This PR is minor/cosmetic-only (typo, formatting, style-only tweaks) — tick only if it is, and justify below.
  • I understand this PR exceeds 500 changed lines and have explained its single purpose and why it should stay together below.

Large PR justification

If you ticked the "minor" box above

@zheliuyu zheliuyu added the ascend-npu Ascend NPU (triton_ascend) related label Oct 12, 2026
@sunyi0505

Copy link
Copy Markdown
Contributor Author

@zhiyuan1i @zheliuyu This pr is ready for review. Could you please review this PR? Thanks!

@zheliuyu

Copy link
Copy Markdown
Collaborator

LGTM.

@zheliuyu
zheliuyu requested a review from zhiyuan1i October 12, 2026 06:55
@zhiyuan1i
zhiyuan1i merged commit 1fe52b5 into fla-org:main Oct 12, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ascend-npu Ascend NPU (triton_ascend) related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants