mindspore-ai / mindspore-ai/hyper-parallel

[Bug]: Importing non-Omni high-performance modules requires optional Omni ops

Open
#618 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
53
Forks
63
Avg merge
23h 45m
Merged PRs (30d)
63

Description

Checklist
  • I have searched the existing issues.
  • I have read the relevant documentation.
  • I have created a minimal reproduction case and verified the fix.
🐛 Describe the bug

hyper_parallel.components.modules.__init__ eagerly imports every high-performance module.
Some modules, such as DSA/MHC, use the optional omni_training_custom_ops package. As a
result, importing an unrelated module such as RMSNorm can fail in an environment without
Omni custom ops, even though RMSNorm itself only uses torch_npu.npu_rms_norm.

Minimal reproduction in an environment without omni_training_custom_ops:

from hyper_parallel.components.modules import RMSNorm

The package import should not load DSA/MHC or require Omni for this usage.

Expected behavior

Public high-performance modules should be resolved lazily. Importing and using modules that
do not depend on Omni, including Qwen3-MoE's default RMSNorm, GQAAttention, and
GroupedExperts replacements, should work without installing omni_training_custom_ops.
The dependency should be checked only when an Omni-backed function or module is selected.

Additional context

The functional package already resolves public functions lazily. The modules package needs
the same import boundary. A fresh-process validation that blocks omni_training_custom_ops
passes for top-level imports, functional/modules imports, Qwen3-MoE registration and RMSNorm
replacement after the fix.

Environment info
  • Python 3.11
  • PyTorch/torch_npu environment: veomni_cys
  • Transformers 5.5.3 for the Qwen3-VL/Qwen3-MoE validation
  • Ascend NPU, 8-card DP/FSDP validation

schema_version: 1
source: gitcode
gitcode_repo: mindspore/hyper-parallel
gitcode_issue: 369
source_url: https://gitcode.com/mindspore/hyper-parallel/issues/369

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with hyper_parallel.components.modules.init and compare its imports with the functional package's lazy resolution. Reproduce the RMSNorm import in an environment that blocks omni_training_custom_ops, then verify that non-Omni modules and the listed Qwen3-MoE replacements import successfully while Omni-backed selections still check their dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.