op-task-extractor

Community

Extract PyTorch operators into KernelBench tasks.

AuthorJust-it
Version1.0.0
Installs0

System Documentation

What problem does it solve?

从用户的 PyTorch/Python 代码中提取可优化的算子实现,构建为 KernelBench 标准格式的单文件 task_desc.py,使其成为一个自包含的可执行单元。支持从独立的文件中提取 shape/dtype 信息。

Core Features & Use Cases

  • 从现有 PyTorch 代码自动提取算子实现及其依赖,生成与 KernelBench 兼容的 task_desc.py。
  • 将依赖内联并包装为自包含的 Model.forward(),并提供 get_inputs() 与 get_init_inputs()。
  • 支持通过额外的形状/数据类型信息源来推断输入/输出签名,确保可重复性。
  • 提供内置的验证流程,包含静态与运行时检查,确保生成的任务正确无误。

Quick Start

提供 PyTorch 源代码路径,以及可选的 shape/dtype 信息源,然后运行该 Skill 生成 KernelBench 的 task_desc.py。

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: op-task-extractor
Download link: https://github.com/Just-it/AscendOpGenAgent/archive/main.zip#op-task-extractor

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.