Skip to content
Agentmart
Submit a tool

ascend-npu-profile-operator

Get and analyze Ascend NPU operator performance data.

Skill by Piagari

IndexedApache-2.0
Write a review

Chalk Labs

Need help deploying ascend-npu-profile-operator?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/piagari-ascend-npu-profile-operator

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Get and analyze Ascend NPU operator performance data. Use for profiling Ascend operators, identifying hot operators and timing bottlenecks, summarizing performance evidence, comparing profiling results across runs, or inspecting profiler artifacts such as msprof outputs, op_statistic/op_summary CSV files, and Ascend profiler .bin data.

Use cases: spreadsheets, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ascend-npu-profile-operator

What's inside

Skill name
ascend-npu-profile-operator
Description
Get and analyze Ascend NPU operator performance data. Use for profiling Ascend operators, identifying hot operators and timing bottlenecks, summarizing performance evidence, comparing profiling results across runs, or inspecting profiler artifacts such as msprof outputs, op_statistic/op_summary CSV files, and Ascend profiler .bin data.
License
Apache-2.0
Instructions
161 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • files: referenced but missing: references/profile-bench.md

Files (9)

  • SKILL.md
  • binary-format-spec.md · references/
  • profiler-csv-spec.md · references/
  • models.py · scripts/
  • msprof_parser.py · scripts/
  • parse_bin.py · scripts/
  • parser_base.py · scripts/
  • reporter.py · scripts/
  • torch_npu_profiler_parser.py · scripts/

SKILL.md (first lines)

# Ascend NPU Operator Profiler

Profile Ascend NPU operators and summarize the resulting timing data.

## Default workflow

### Profiling + summary (profile-bench)

1. Profile benchmark harnesses through the `ascend-npu-run-eval` skill's `profile-bench` helper.
   - For the exact wrapper invocation, read that skill's `references/profile-bench.md`.
   - The standard argument shape is:

   ```text
   profile-bench --bench-file bench_matmul.py --operator-file matmul.py
   ```

2. The helper runs the profiler, copies back the generated local `PROF_*` directory, and prints a summary inline.

3. Review the inline summary in the conversation. Call out:
   - which operator was analyzed
   - whether that operator was explicit or inferred
   - total, average, min, and max time
   - runtime ratio and top hotspots

### Re-reporting without re-profiling (profile-report)

When the profiling data already exists (e.g. from a previous `profile-bench` run), use `profile-report` to generate a new summary without re-running the benchmark:

```text
profile-report --profile-dir PROF_000001_.../ --target-op matmul_kernel
```

For round-analysis workflows that need structured signals, use JSON mode:

```text
profile-report --profile-dir PROF_000001_.../ --target-op matmul_kernel --format json
```

This is useful when you want to:
- Inspect the same `PROF_*` data with different `--target-op` values
- Re-summarize historical profiling data
- Emit structured JSON for downstream workflows without re-profiling

## Working rules

- Prefer the `ascend-npu-run-eval` skill's `profile-bench` helper for benchmark profiling, especially when the workflow is remote-aware.
- profile one selected `--case-id <id>` case for both `torch-npu-profiler` and `msprof`; benchmark profiling must not receive `--bench` or `--num-bench`.
- If the benchmark file declares exactly one case, the helper may auto-select it; otherwise provide `--case-id`.
- If the benchmark metadata says `# bench-mode: msprof`, the selected case still requires resolvable `# kernels:` metadata in the benchmark header.
- When the outer task is remote-aware, pass the same `--remote` and `--remote-workdir` settings through `profile-bench` so profiling runs on the remote machine while the resulting `PROF_*` directory is copied back locally.
- Keep direct `msprof <command>` only as a local fallback when there is no generated benchmark harness or when the user explicitly wants a manual invocation.
- Treat `op_summary_*.csv` as potentially large. Do not dump it into the conversation or read it naively line-by-line into memory if a streaming pass is enough.
- Prefer the bundled summary script over ad hoc shell parsing so the report stays consistent.
- Prefer the bundled summary script in JSON mode when the downstream task is `ascend-npu-analyze-round-performance` or any profiler-first layered analysis workflow.
- If the user names the operator, pass it through `--target-op`.
- If the user does not name the operator, let the script infer the hottest operator from `op_statistic` and state that this is an inference.
- Always show the final Markdown summary in the conversation instead of only mentioning generated files.

## Bench mode contract

- `torch-npu-profiler`
  - Use:
    ```text
    profile-bench --bench-file bench_<operator>.py --operator-file <operator>.py --case-id <id>
    ```
  - Runtime command shape inside the helper:
    ```bash
    python3 bench_runtime.py profile-one --bench-file bench_<operator>.py --operator-file <operator>.py --case-id <id>
    ```
  - Do not pass `--bench` or `--num-bench`.
  - The helper profiles one selected `--case-id <id>` case with `torch_npu.profiler`.

- `msprof`
  - Use:
    ```text
    profile-bench --bench-file bench_<operator>.py --operator-file <operator>.py --case-id <id>
    ```
  - Runtime command shape inside the helper:
    ```bash
    msprof python3 bench_runtime.py run-one --bench-file bench_<operator>.py --operator-file <operator>.py --case-id <id>
    ```
  - The helper profiles the requested `--case-id <id>` case and may auto-select only when the benchmark declares exactly one case.
  - This mode requires benchmark metadata with `# kernels: <resolved_kernel_names>`.

## Validation checks

- Accept any of these input shapes for CSV summarization: a `PROF_*` directory, a `mindstudio_profiler_output/` directory, or a parent directory that contains one of them.
- Before summarizing CSV output, confirm `mindstudio_profiler_output/` exists and contains at least one `op_statistic_*.csv`.
- When `op_summary_*.csv` exists, use it as a cross-check for the target operator but keep the main summary anchored on `op_statistic`.
- Before running binary parsing, confirm the `.bin` file exists and contains `ZZ{` markers.

## Failure handling

- If no profile directory can be resolved, re-run the profiling command and check the working directory.
- If `mindstudio_profiler_output/` or `op_statistic_*.csv` is missing, stop and report that the profiler output is incomplete.
- If the requested operator is not present in `op_statistic`, list the available operators and ask the user to confirm the target.
- If `op_summary` uses unrecognized columns, fall back to `op_statistic` and mention that the `op_summary` aggregation was unavailable.
- If `.bin` parsing finds no `ZZ{` markers, treat the file as unsupported profiler data instead of guessing.

## Bundled resources

- `scripts/reporter.py`
  Unified profile reporter used by the `profile-report` subcommand. Loads profiles from either mode, runs classification (operator type, bound analysis), and renders Markdown or JSON output.

- `scripts/models.py`
  Typed data model for parsed profile data (`OperatorStats`, `KernelInvocation`, `PipelineStage`, `ParsedProfile`). Shared by `reporter.py` and all parsers.

- `scripts/parser_base.py`
  Shared parsing utilities: mode auto-detection, `op_statistic` CSV parser, `api_statistic` CSV parser. Used by both mode-specific parsers.

- `scripts/msprof_parser.py`
  Parses `PROF_*/mindstudio_profiler_output/` artifacts: `op_statistic`, `op_summary`, `task_time`, `api_statistic`, `msprof` JSON.

- `scripts/torch_npu_profiler_parser.py`
  Parses `ASCEND_PROFILER_OUTPUT/` artifacts: `op_statistic`, `kernel_details`, `operator_details`, `step_trace_time`, `api_statistic`, `trace_view`.

- `scripts/parse_bin.py`
  Keep this for raw profiler binary inspection when the user provides files such as `visualize_data.bin`.
  It also owns the structured deep-signal parsing that the summary script can reuse.

From Piagari/helix, Apache-2.0.

More from Piagari/helix

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 13, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Piagari

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get ascend-npu-profile-operator running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying ascend-npu-profile-operator?

CallGet help
Cite this page

ascend-npu-profile-operator skill. Agent Mart. https://agentmart.dev/skills/piagari-ascend-npu-profile-operator (last updated 2026-10-24)