--- pretty_name: AscendGYM language: - en - zh license: other license_name: ascendgym-component-licenses license_link: LICENSE size_categories: - n<1K tags: - benchmark - code - kernel-optimization - ascend - npu configs: - config_name: batch1 default: true data_files: - split: test path: metadata/batch1.jsonl - config_name: preserved_golden data_files: - split: test path: metadata/preserved_golden.jsonl --- # AscendGYM — Kernel Optimization Benchmark on Ascend AscendGYM evaluates the ability of models and coding-agent harnesses to optimize operators for Ascend hardware. This release provides task definitions, operator baseline snapshots, frozen correctness tests, golden tensors, and the evaluation client code, preserving the upstream directory layout. The benchmark targets kernel optimization in real-world training and inference workloads. The benchmark package includes the files needed for local task preparation. Compilation, correctness testing, and performance profiling require access to an Ascend execution environment. For the complete workflow, see [the original project instructions](README_PROJECT.md). - Upstream project: [SLAI-AITP/AscendGYM](https://github.com/SLAI-AITP/AscendGYM) - Source revision: [`51b0b55bc313d7cdeb4a4bbd53b071258dce07f4`](https://github.com/SLAI-AITP/AscendGYM/tree/51b0b55bc313d7cdeb4a4bbd53b071258dce07f4) - Active Batch 1 tasks: **17** - Additional preserved-golden tasks: **3** (outside the official Batch 1 evaluation) - Frozen tensor files: **384** across both subsets - [Paper on arXiv](https://arxiv.org/abs/2611.17621) - [Technical report](docs/AscendGYM_TechReport.pdf) - [Leaderboard](https://slai-aitp.github.io/AscendGYM/) ## Benchmark tasks ### Official evaluation: Batch 1 The default `batch1` subset contains **17 evaluation tasks**. They are grouped below by their source component; each operator links to its task guide. All tasks include frozen correctness tests. | Source component | Operators | |---|---| | **ops-nn** (4 tasks) | [add_rms_norm](datasets/tasks/batch1/add_rms_norm/README.md), [clipped_swiglu](datasets/tasks/batch1/clipped_swiglu/README.md), [rms_norm](datasets/tasks/batch1/rms_norm/README.md), [swi_glu](datasets/tasks/batch1/swi_glu/README.md) | | **ops-transformer** (10 tasks) | [interleave_rope](datasets/tasks/batch1/interleave_rope/README.md), [lightning_indexer](datasets/tasks/batch1/lightning_indexer/README.md), [mla_prolog](datasets/tasks/batch1/mla_prolog/README.md), [moe_fused_topk](datasets/tasks/batch1/moe_fused_topk/README.md), [moe_gating_top_k](datasets/tasks/batch1/moe_gating_top_k/README.md), [moe_token_unpermute](datasets/tasks/batch1/moe_token_unpermute/README.md), [qkv_rms_norm_rope_cache](datasets/tasks/batch1/qkv_rms_norm_rope_cache/README.md), [recurrent_gated_delta_rule](datasets/tasks/batch1/recurrent_gated_delta_rule/README.md), [rope_with_sin_cos_cache](datasets/tasks/batch1/rope_with_sin_cos_cache/README.md), [sparse_flash_attention](datasets/tasks/batch1/sparse_flash_attention/README.md) | | **vLLM-Ascend** (3 tasks) | [fused_gdn_gating](datasets/tasks/batch1/fused_gdn_gating/README.md), [hc_post](datasets/tasks/batch1/hc_post/README.md), [hc_pre_sinkhorn](datasets/tasks/batch1/hc_pre_sinkhorn/README.md) |
Additional reference materials: 3 tasks outside the official benchmark The `preserved_golden` subset retains the following ops-transformer sources and golden references. These tasks are separate from the official Batch 1 evaluation. - [chunk_gated_delta_rule](datasets/tasks/preserved-golden/transformer__chunk_gated_delta_rule/README.md) - [gather_pa_kv_cache](datasets/tasks/preserved-golden/transformer__gather_pa_kv_cache/README.md) - [kv_rms_norm_rope_cache](datasets/tasks/preserved-golden/transformer__kv_rms_norm_rope_cache/README.md)
### Task indexes and files The Dataset Viewer and `load_dataset()` expose **task metadata**, one row per task. They do not load tensors, execute tests, or run the benchmark. Both subsets use the `test` split; no training split is provided. The underlying indexes are [Batch 1](metadata/batch1.jsonl) and [reference materials](metadata/preserved_golden.jsonl). Each index row includes the task ID, operator, batch, active status, backend, paths to the task specification and tests, case manifests, editable source prefixes, tensor count, baseline component license, and source revision. Paths are relative to the full downloaded repository root. License fields describe the baseline component; file-level notices continue to apply. The `golden_tensor_files` field counts packaged `.pt` files, not test cases. Tasks without packaged `.pt` files still include frozen tests. ```text README.md # This Dataset Card README_PROJECT.md # Original upstream project instructions metadata/ # Viewer indexes and release provenance datasets/ registry.json tasks/ # Task specifications and task documentation ops_src/ # Operator baselines, tests and frozen tensors LICENSES/ # Third-party licenses and notices SOURCE_MANIFEST.json # Upstream file sizes and SHA-256 hashes bridge/ # Task preparation and evaluation entry points eval/ # Native and bare harness materials environment/ # Reference stack and pinned upstream dependencies docs/ # Technical report, guides, and documentation assets examples/ LICENSE # Component license summary and full license texts LICENSE-APACHE-2.0 # Unmodified original project license text LICENSES.md # Component scope and third-party notice links CHECKSUMS.sha256 # Release file integrity list ``` ## Load the task index Set `HF_REPO_ID` to the actual Dataset repository ID hosting this release: ```bash export HF_REPO_ID='SLAI-AITP/AscendGYM' python -m pip install datasets huggingface_hub ``` ```python import os from datasets import load_dataset tasks = load_dataset(os.environ["HF_REPO_ID"], "batch1", split="test") preserved = load_dataset(os.environ["HF_REPO_ID"], "preserved_golden", split="test") print(tasks[0]["task_id"], tasks[0]["source_dir"]) ``` For reproducible use, pass `revision=` with the Hugging Face commit of this release. The GitHub source commit above is provenance and is not a Hugging Face revision identifier. ## Download the complete benchmark ```python import os from huggingface_hub import snapshot_download snapshot_download( repo_id=os.environ["HF_REPO_ID"], repo_type="dataset", local_dir="./AscendGYM", ) ``` Check the downloaded file hashes **before generating local task packages**, then prepare the tasks: ```bash cd AscendGYM sha256sum --check CHECKSUMS.sha256 source datasets/activate.sh python3 bridge/op_manager.py scan python3 bridge/op_manager.py build --all ``` The scan and build commands prepare local files; they do not compile kernels, contact a model, or establish NPU correctness or performance. Evaluation client dependencies and the complete run procedure are in [README_PROJECT.md](README_PROJECT.md). ## Execution requirements The client requires Python 3.10+ and can run separately from the execution host. Actual compilation and profiling require a compatible Ascend NPU host, driver, CANN stack, operator dependencies, and a reachable execution service. Uploading or loading this dataset does not provision those resources. See the [container guide](docs/SANDBOX_IMAGE.md), [self-hosted environment guide](docs/SELF_HOSTED_ENVIRONMENT.md), [execution protocol](docs/EXECUTION_BACKEND.md), [reference stack](environment/reference-stack.json), and [pinned build dependencies](environment/public-dependencies.json). The reference stack is a record of selected checks, not a guarantee that every operator works on every Ascend installation. ## Provenance, integrity and limitations `metadata/release.json` records the GitHub source commit and release overlays. The original `datasets/SOURCE_MANIFEST.json` is preserved unchanged. Export verification checked **1282** source files against that manifest. `CHECKSUMS.sha256` additionally covers the complete release payload, including the task indexes and this card. Golden tensors and frozen tests are correctness references. They are not model weights, model training data, or historical benchmark scores. Keep them unchanged when optimizing candidate operator code; allowed edits are listed in each task. Results depend on the hardware, software stack, model endpoint, harness and evaluation budget. Local release validation does not claim new NPU evaluation results. No train/test independence beyond the supplied benchmark design is claimed. ## Licenses Project-authored code, task definitions, tests, configurations, and documentation without another license declaration are licensed under [Apache License 2.0](LICENSE-APACHE-2.0), as stated by the upstream project. This file preserves the original project license text without modification. Included third-party materials retain their own licenses and copyright notices: - **ops-nn and ops-transformer:** the CANN Open Software License Agreement Version 2.0, including its stated Huawei AI Processor purpose restrictions, and the applicable third-party notices. - **vLLM-Ascend:** Apache License 2.0 and the existing third-party notices. - **Frozen inputs and golden tensors:** the scope described in the original [dataset provenance and licensing statement](datasets/README.md). Third-party or derived materials remain subject to their original terms. The project Apache license does not replace these component-specific terms. See [the component license overview](LICENSES.md) and [the full license texts](LICENSE) for details. ## Citation and updates When referring to this snapshot, cite the [upstream source revision](https://github.com/SLAI-AITP/AscendGYM/tree/51b0b55bc313d7cdeb4a4bbd53b071258dce07f4) and record the Hugging Face revision used for download. Refer to the upstream technical report for its author-provided citation details. Report benchmark issues through the [upstream issue tracker](https://github.com/SLAI-AITP/AscendGYM/issues).