Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
median_us: double
cov: double
samples: list<item: double>
  child 0, item: double
shapes: list<item: int64>
  child 0, item: int64
iters: int64
seeds: list<item: int64>
  child 0, item: int64
kernel: string
cos: double
arch: string
pack: int64
to
{'kernel': Value('string'), 'pack': Value('int64'), 'arch': Value('string'), 'shapes': List(Value('int64')), 'seeds': List(Value('int64')), 'iters': Value('int64'), 'cos': Value('float64')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              median_us: double
              cov: double
              samples: list<item: double>
                child 0, item: double
              shapes: list<item: int64>
                child 0, item: int64
              iters: int64
              seeds: list<item: int64>
                child 0, item: int64
              kernel: string
              cos: double
              arch: string
              pack: int64
              to
              {'kernel': Value('string'), 'pack': Value('int64'), 'arch': Value('string'), 'shapes': List(Value('int64')), 'seeds': List(Value('int64')), 'iters': Value('int64'), 'cos': Value('float64')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

AVO Release 30 — 可复测的 GPU 内核优化产物

本数据集收录 AVO(assembly-level kernel optimization agent)在 AMD MI308X(gfx942)上完成的 26 个算子的优化产物。Level 1 与 Level 2 均有覆盖。

与一般的优化实验记录不同,这里的每个算子都自带一套 pair harness:把当初真实发生的那次 GPU dispatch 完整抓了下来(内核二进制、kernarg、全部内存区域),任何人拿到之后可以在自己的 gfx942 卡上原样回放,独立复核正确性与加速比,不需要原始框架、模型或数据。

快速开始

cd level1/<算子名>/harness
make -j8
python run_harness.py

输出 result.json,包含正确性判定与加速比。

每个算子的目录结构

level{1,2}/<算子名>/
├── harness/                    # 可独立复测的 pair harness
│   ├── capture/                #   真实 dispatch 的完整快照
│   ├── ref.co                  #   基准内核(= capture/kernel.hsaco,字节相同)
│   ├── opt.co                  #   优化后内核
│   ├── harness_manifest.json   #   所有输入的 sha256
│   ├── result.json             #   我们这边跑出的结果
│   ├── run_harness.py / Makefile / CMakeLists.txt
│   └── vendor/                 #   编译所需第三方头文件
└── avo_kernel_<ts>/            # AVO 原始优化过程记录(溯源用)
    └── kernel/ 或 baseline_co/
        ├── director_validation.json
        ├── avo_state/attempts.jsonl
        └── ...

index.json 是全量索引,每个算子一条,含 harness 与 Director 两套结果。

两个口径,以 harness 为准

数据集里同时存在两个加速比,它们不可直接比较

Harness Director
基准二进制 真实被 dispatch 的内核(capture/kernel.hsaco AVO 自己重编的基准
负载 真实抓到的那次 dispatch AVO 侧构造的形状
方法 同 capture 内 ABBA 交错,speedup = sqrt(fwd/rev) AVO 自有成对采样
26 个算子几何平均 1.3637x 1.5101x

复测请以 harness 为准。 它是这个数据集里唯一可被第三方独立复现的口径;Director 的数字保留在 director_validation.json 里仅作溯源参考。

harness 每次测量同时给出 slot_bias = sqrt(fwd·rev),用于检测两个测量槽位的系统性偏差。 本批 26 个算子的 slot_bias 落在 0.9914 ~ 1.0089,说明槽位对称、比值可信。

只报比值,不报绝对时间。 同卡邻居的功耗争用与 capture 虚拟地址的分配差异会让绝对微秒数 出现数十个百分点的漂移,只有同一次 ABBA 内部的比值是稳定的。result.json 里的 *_us 字段仅供调试,不应跨机器比较。

正确性判据

判据 算子数 含义
逐字节 21 优化后内核写出的每一个输出字节与基准完全相同
容差 5 仅对声明的字节范围放宽,范围之外仍要求逐字节相同

采用容差的算子,其 harness/capture/validation_policy.json 明确写出了放宽的范围、判据与阈值。 其中 4 个用余弦相似度 ≥ 0.9999;37_FrobeniusNorm_ 的输出是单个 float32 标量,余弦对一元向量 恒为 1、没有意义,因此改用相对误差上界 rtol=1e-6(约 8 个 float32 eps,实测 4.33e-07)。

容差判据的已知局限: 余弦相似度对"换算法"是不敏感的。例如把一个超越函数替换成多项式 近似,可能在保持 cos ≥ 0.9999 的同时引入单侧系统性误差。若你的场景对数值精度敏感, 请自行检查 opt.co 的反汇编,不要只依赖本数据集的通过标记。

关于被排除的算子

原始实验集合共 30 个算子,本数据集发布其中 26 个。另外 4 个未通过 harness 正确性判据,未达发布标准。 这些算子的实验记录仍保留在上游仓库 puyuan-yang/asm_co_bench_extjinglwan/avo_exp 中。

本数据集为增量发布,后续通过复核的算子会按相同目录约定追加。

环境

  • GPU:AMD MI308X,gfx942
  • ROCm / HIP 运行时,编译需要 hipcccmake
  • harness 不依赖 PyTorch、Triton 或任何上游框架
Downloads last month
13