Repository navigation
Qgy - #1054
Open
qinguoyong wants to merge 22 commits into
Open
Qgy#1054qinguoyong wants to merge 22 commits into
qinguoyong wants to merge 22 commits into
Conversation
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.
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
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.
Summary
Motivation
Closes #
Type of Change
feat— new feature / new operator / new platformfix— bug fixperf— performance improvement (no behavioral change)refactor— code restructuring without behavior changetest— adding or fixing tests onlydocs— documentation onlybuild/ci— build system or CI configurationchore— tooling, formatting, or other non-code changes!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Test Results on Supported Platforms
Full `pytest` output (optional)
Benchmark / Performance Impact
Notes for Reviewers