AscendGYM / README.md
SLAI-AITP's picture
Link the AscendGYM paper in the dataset card
f3f9c5c verified
|
Raw History Blame Contribute Delete
10.3 kB
metadata
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.

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.

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.

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 and reference materials.

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.

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:

export HF_REPO_ID='SLAI-AITP/AscendGYM'
python -m pip install datasets huggingface_hub
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

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:

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.

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, self-hosted environment guide, execution protocol, reference stack, and pinned build dependencies. 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, 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. 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 and the full license texts for details.

Citation and updates

When referring to this snapshot, cite the upstream source revision 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.