Skip to content

Qgy - #1054

Open
qinguoyong wants to merge 22 commits into
InfiniTensor:masterfrom
szl1369117765:qgy
Open

Qgy#1054
qinguoyong wants to merge 22 commits into
InfiniTensor:masterfrom
szl1369117765:qgy

Conversation

@qinguoyong

Copy link
Copy Markdown

Summary

Motivation

Closes #

Type of Change

  • feat — new feature / new operator / new platform
  • fix — bug fix
  • perf — performance improvement (no behavioral change)
  • refactor — code restructuring without behavior change
  • test — adding or fixing tests only
  • docs — documentation only
  • build / ci — build system or CI configuration
  • chore — tooling, formatting, or other non-code changes
  • Breaking change (requires a ! in the Conventional Commits prefix or a BREAKING CHANGE: footer)

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

paste smoke test output here

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA
Iluvatar
MetaX
Cambricon
Moore
Ascend
Full `pytest` output (optional)
paste here

Benchmark / Performance Impact

Notes for Reviewers

songzhl and others added 18 commits November 16, 2026 11:28
Add dedicated Hygon providers with optimized decode and short-sequence
paths while retaining FP32 scan state and generic layout fallbacks.

Validation: clang-format and gfx936 provider instantiation compilation.
feat: add optimized Hygon Mamba conv and scan kernels
feat: add optimized VideoNSA operators
Add wave64 Top-6 routing, fixed-width per-channel quantization and
SDOT4 single-row INT8 GEMV paths with generic fallbacks. Add HYGON
per-tensor quantization and dequantization with strided and graph support.
Preserve the new repository rounding, scale and normalization rules.

Validate on gfx936: routing 168, channel quantization 84, GEMV 72,
per-tensor quantization 270 and dequantization 378 numerical checks;
130 graph replays, 9 invalid-input and 12 public API checks.
Full model integration and final performance acceptance remain pending.
@qinguoyong
qinguoyong requested a review from a team November 24, 2026 16:19
Populate scalar Mul shape and strides so the Torch backend writes every
element. Validate CPU Cast storage spans and aliases before writes,
including cached calls, and use each operand's rank for strided indexing.

Add standalone CPU/Hygon public API regressions. Verified 24 CPU scalar,
48 combined CPU/Hygon scalar, and 9 CPU Cast checks. The actual LM W8A8
layer passes 16 eager cases and 48 graph replays after the scalar fix.
Performance acceptance remains pending.
Use packed integer dot products and one wave per output channel on Hygon.
Reduce quantization barriers with wave reductions. Preserve the SDK's
rounding, scale floor, epilogue order and workspace layout, with the
scalar fallback retained for tail or misaligned weight rows.

Add public SDK regressions for FP32/BF16 routed/shared experts, changing
graphs, invalid routes, grid-stride loops and the safe INT32 dot limit.
Each of two complete runs passed 164 strict checks and 112 graph replays.
Eight scenarios in five rounds per run improved throughput by at least
23.22% against the repository's retained scalar expert kernels. A prior
negative round is retained in the verification record; external SGLang
indicator-10 acceptance and full-model/TP8 validation remain incomplete.
Reuse the existing Hygon GEMM provider for eligible two-dimensional
BF16/FP16 matrices. Preserve the generic implementation for small,
batched, strided or overlapping cases, and initialize the BLAS handle
before graph capture. Check address overlap at execution to respect
metadata-based operator caching and rebound storage.

Add layout, degenerate leading-dimension, changing-input graph and
storage-rebinding regressions using the existing numerical tolerances.
Keep HIP FP32 reference matmuls in IEEE mode to avoid PyTorch 2.10 TF32
state conflicts; other backends retain their existing precision setting.
Server validation passed 132 Hygon and 57 CPU pytest cases, two batches
of 150 public API checks plus 450 graph replays, and 60 native device
graphs with 180 changing-input checks. Twelve accelerated scenarios
exceeded +12% against the retained scalar implementation in five rounds
of both batches. External reference and full indicator-9 acceptance
remain incomplete; this is not an end-to-end performance claim.
Extend the existing BLAS dispatch from 16 to 8 matrix rows, retaining
single-row and unsupported-layout fallbacks and execution-time alias checks.
Cover the new boundary with row/column/strided storage, changing-input graph
replay and rebound-storage regression cases at the existing tolerances.

Server validation: 177 Hygon Matmul, 72 CPU Matmul and 72 Hygon Linear
tests passed. Two batches of five rounds passed all 12 added accelerated
scenarios versus the prior published implementation; the lowest measured
throughput improvement was 172.29%. 84 native device graphs passed 252
changing-input checks. Full metric-9 and model acceptance remain incomplete.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants