Agent skill

Torch Performance Optimization

by albumentations-team in albumentations-team/albucore

Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions.

MITAuto-check passedAI & LLM Engineering

Install Torch Performance Optimization

skills CLI
$ npx skills add albumentations-team/albucore --skill torch-performance-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install albumentations-team/albucore torch-performance-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/albumentations-team/albucore.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/torch-performance-optimization .claude/skills/torch-performance-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
torch-performance-optimization
GitHub stars
123
Token cost
~895 tokens
SKILL.md length
422 words
Files
2
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions.

  • Works in 6 steps: Establish a correctness baseline and… → Audit unnecessary Python work,… → Profile only to discover candidates.… → …
  • Changing Torch CPU kernels
  • SKILL.md covers Workflow, Albucore Contract and Required Handoff
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Torch Performance Optimization is an agent skill from albumentations-team/albucore. Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions. Use when adding or changing Torch CPU kernels, Tensor/NumPy bridges, Torch backend routing, tensor layouts, allocations, threading, profiling, memory-format candidates, or Torch performance benchmarks.

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in AI & LLM Engineering, covering Performance optimization and Deep learning. It works with NumPy, PyTorch, Python and OpenCV. The repository describes itself as: A high-performance image processing library designed to optimize and extend the Albumentations library with specialized functions for advanced image transformations. Perfect for… The licence is MIT.

When your agent uses it

  • Changing Torch CPU kernels
  • Tensor/NumPy bridges
  • Torch backend routing
  • Memory-format candidates

Example prompts

  • “/torch-performance-optimization”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Establish a correctness baseline and benchmark the existing public path. State container, layout, dtype, shape, parameter, stride, thread…
  2. Audit unnecessary Python work, full-volume passes, conversions, materializations, and output repairs before choosing a Torch operator.
  3. Profile only to discover candidates. Benchmark every viable implementation end to end, including NumPy↔Torch bridges and layout conversion.
  4. Compare NumPy, OpenCV, NumKong, StringZilla, and Torch where they share semantics. Treat fused operators, layout, channels_last_3d, and…
  5. Select a route or threshold only from stable public-path evidence. Preserve rejected candidates in the benchmark report when they clarify…
  6. Add correctness tests for each accepted route and update the benchmark evidence, public contract, and canonical guide when a reusable rule…

What it can do on your machine

Read from SKILL.md and the folder at commit 249d10b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Torch Performance Optimization loads about 895 tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 422 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~895

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from albumentations-team/albucore at commit 249d10b, republished under its MIT licence (© albumentations-team). 422 words, ~895 tokens.

Download SKILL.mdSave it as .claude/skills/torch-performance-optimization/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
torch-performance-optimization
description
Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions. Use when adding or changing Torch CPU kernels, Tensor/NumPy bridges, Torch backend routing, tensor layouts, allocations, threading, profiling, memory-format candidates, or Torch performance benchmarks.

Torch Performance Optimization

Read docs/torch-performance-optimization.md completely before inspecting or editing a Torch path. Also read ../performance-optimization/SKILL.md, its canonical performance guide, and ../albucore-benchmarks/SKILL.md completely.

Workflow

  1. Establish a correctness baseline and benchmark the existing public path. State container, layout, dtype, shape, parameter, stride, thread, and allocation contracts.
  2. Audit unnecessary Python work, full-volume passes, conversions, materializations, and output repairs before choosing a Torch operator.
  3. Profile only to discover candidates. Benchmark every viable implementation end to end, including NumPy↔Torch bridges and layout conversion.
  4. Compare NumPy, OpenCV, NumKong, StringZilla, and Torch where they share semantics. Treat fused operators, layout, channels_last_3d, and in-place reuse as hypotheses with their own correctness and performance matrices.
  5. Select a route or threshold only from stable public-path evidence. Preserve rejected candidates in the benchmark report when they clarify a boundary.
  6. Add correctness tests for each accepted route and update the benchmark evidence, public contract, and canonical guide when a reusable rule or limitation is discovered.

Albucore Contract

  • Torch is a required dependency. Assume it is already imported for benchmarks.
  • Current public Tensor routes are eager CPU paths that do not record autograd inside the primitive and do not use torch.compile. Do not add device routes, graph-preserving primitive fallbacks, compilation, or their benchmark candidates.
  • Tensor layouts are explicit and independent of NumPy layouts. Do not infer NCHW versus CDHW from shape sizes.
  • warp_affine3d and remap3d support rank-4 CDHW volumes and rank-5 NCDHW batches; one affine matrix or remap grid is shared across the batch.
  • For general 3D sampling, the measured CPU path folds N>=4, C=1 batches into the channel axis for both routers. warp_affine3d uses rank-5 sampling for other channel counts. remap3d samples N>=4, C>1 items independently while sharing grid and fill preparation because that beat a single native batch sampler in the full-call benchmark.
  • XY-only linear affine matrices with unchanged depth share one plane grid. Single-channel inputs fold N*D into 2D channels; multi-channel batches merge N and D only when that is a view, otherwise sampling into a preallocated output per volume. Nearest interpolation retains the original 3D sampler.
  • Caller-prevalidated 3D routers leave validation outside the hot path. Do not add it back while optimizing.
  • A Tensor route must preserve the documented container, layout, border, interpolation, rounding, mutation, and aliasing behavior. Its dtype contract must distinguish supported dtype preservation from any explicit fallback conversion.
Show full SKILL.md (33 more words)Show less

Required Handoff

Report the full-path baseline, selected route, removed work, allocation and copy changes, all viable backends and Torch-specific candidates considered, thread and benchmark matrix, correctness/memory evidence, regressions, rejected regions, and remaining follow-ups.

© albumentations-team, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .codex/skills/torch-performance-optimization of albumentations-team/albucore.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 249d10b

Compare with similar skills

Torch Performance Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Torch Performance Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Torch Performance Optimization this skillalbumentations-team/albucore123—~895Automated safety check: PassMIT
The Art of Debuggingstas00/the-art-of-debugging1.7k—~6.1kAutomated safety check: NotesCC-BY-SA-4.0
Magpie Kernel Evaluatoramd/skills395—~2.3kAutomated safety check: PassMIT
Xtbloom Run Python Inferencejinzhezenggroup/computational-chemistry-agent-skills148—~1.3kAutomated safety check: PassLGPL-3.0
ExecuTorch Cortex-M Backendpytorch/executorch5.1k—~872Automated safety check: PassCustom licence
Formattingbrendanhasz/probflow175—~381Automated safety check: PassMIT

Similar skills

  • The Art of Debugging

    stas00/the-art-of-debugging

    Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.

    1.7k GitHub stars~6.1k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Benchmarks LLM inference and drives GPU kernel optimization with Magpie.

    395 GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Xtbloom Run Python Inference

    jinzhezenggroup/computational-chemistry-agent-skills

    Write, review, and run high-level xTBloom Python GFN2-xTB inference with Calculator, Structure, and BatchCalculator, including single systems, repeated geometry updates, heterogeneous ragged…

    148 GitHub stars~1.3k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • ExecuTorch Cortex-M Backend

    pytorch/executorch

    Developer guide for the Cortex-M (CMSIS-NN) backend in ExecuTorch: quantization pipeline, pass manager, tests and adding new ops.

    5.1k GitHub stars~872 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Formatting

    brendanhasz/probflow

    Ensure consistent code formatting using the uv package manager and pre-commit.

    175 GitHub stars~381 tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check passed
  • Neuron Nki Writing

    uw-syfi/vibesys

    Guide for writing and modifying NKI kernels. An agent skill from uw-syfi/vibesys.

    103 GitHub stars~5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from albumentations-team/albucore

  • Albucore Benchmarks

    albumentations-team/albucore

    Running Albucore micro-benchmarks under benchmarks/, synthetic router timings, and comparing PyPI releases with uv --no-project.

    123 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Albucore Conventions

    albumentations-team/albucore

    Albucore image processing conventions - shapes (H,W,C), dtypes (uint8/float32), benchmark-driven backend routing (OpenCV, NumPy, Torch CPU, LUT, NumKong), tests, and lockfile discipline.

    123 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Albucore Public API

    albumentations-team/albucore

    Albucore star-exported API (all), routers vs albucore.functions shims, and dependents such as Albumentations.

    123 GitHub stars~467 tokensUpdated 2 days ago
    Auto-check passed
  • Performance Optimization

    albumentations-team/albucore

    Systematic performance audit for Albucore runtime code. An agent skill from albumentations-team/albucore.

    123 GitHub stars~743 tokensUpdated 2 days ago
    Auto-check passed

Questions about Torch Performance Optimization

What does Torch Performance Optimization do?

Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions. Torch Performance Optimization is an agent skill from albumentations-team/albucore. Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions.

When should I use Torch Performance Optimization?

Torch Performance Optimization fits situations like: changing Torch CPU kernels; tensor/NumPy bridges; torch backend routing; memory-format candidates.

How do I install Torch Performance Optimization in Claude Code?

Run `npx skills add albumentations-team/albucore --skill torch-performance-optimization -a claude-code`. Or copy the skill folder (.codex/skills/torch-performance-optimization in albumentations-team/albucore) into .claude/skills/torch-performance-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Torch Performance Optimization in Codex?

Run `npx skills add albumentations-team/albucore --skill torch-performance-optimization -a codex`. Or copy the skill folder (.codex/skills/torch-performance-optimization in albumentations-team/albucore) into .agents/skills/torch-performance-optimization in your project. Codex loads it when a task matches its description.

Can I use Torch Performance Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add albumentations-team/albucore --skill torch-performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/torch-performance-optimization, .gemini/skills/torch-performance-optimization, .github/skills/torch-performance-optimization and .opencode/skills/torch-performance-optimization in your project.

What does Torch Performance Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Torch Performance Optimization is instructions for the agent only. Our summary lists: Python 3.

Does Torch Performance Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Torch Performance Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Torch Performance Optimization use?

Torch Performance Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Torch Performance Optimization use?

About 895 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Torch Performance Optimization?

Skills that share tags, products or a category with Torch Performance Optimization: The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars), Magpie Kernel Evaluator (amd/skills, 395 stars), Xtbloom Run Python Inference (jinzhezenggroup/computational-chemistry-agent-skills, 148 stars) and ExecuTorch Cortex-M Backend (pytorch/executorch, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Torch Performance Optimization?

albumentations-team (a GitHub organization) maintains it in albumentations-team/albucore, which has 123 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 5, 2026.

Source: albumentations-team/albucore on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.