← Explore all agents

BUILD AND RUNTIME DIAGNOSTICS / Affaan Mustafa

PyTorch build error resolver

Traces tensor shapes, devices and gradient paths to diagnose a bounded training or inference crash.

“PyTorch runtime, CUDA, and training error resolution specialist. Fixes tensor shape mismatches, device errors, gradient issues, DataLoader problems, and mixed precision failures with minimal changes. Use when PyTorch training or inference crashes.”

01 / THE REASONING

Why this made the selection.

  • The workflow starts at the failing line, traces shapes through layers, then reruns the failing script and checks autograd.
  • It stops for fundamental architecture changes, hardware/driver incompatibility or memory failure even at batch size one.
  • It diagnoses tensor, device, autograd, DataLoader, and CUDA failures, and the first commands print the installed torch build and whether a CUDA tensor can be created.
  • It stops when the same error lasts three attempts, when the fix would fundamentally change the architecture, when the driver is the cause, or when memory still fails at batch size 1.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • agents/pytorch-build-resolver.md (complete definition)
  • LICENSE (applicable redistribution terms)
  • Host custom-agent documentation; repository installation guidance where applicable

Our findings

  • The workflow starts at the failing line, traces shapes through layers, then reruns the failing script and checks autograd.
  • It stops for fundamental architecture changes, hardware/driver incompatibility or memory failure even at batch size one.
  • Tools include Write, Edit, and Bash. The mission is a minimal runtime fix, then a rerun of the failing script.
  • Diagnostics import torch, query CUDA, list pip packages, and call nvidia-smi, so the prompt reaches the local GPU stack and the package list.
  • Stop rules cover a driver incompatibility and out-of-memory at batch_size=1. Warning filters need approval.

Not established by this review

  • No agent was installed or invoked. Host/model compatibility, task accuracy and runtime behaviour were not tested.
  • The resource was not executed and its tools were not called.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Use the role in your project.

Upstream setup instructions ↗
  1. Read the pinned definition and MIT licence; review the host permissions before use.
  2. Inspect the complete upstream context, place the agent in .claude/agents/ and limit edits/commands to a disposable checkout and the failing target.
  3. Supply the exact traceback, model/data-loader code, tensor shapes/dtypes/devices and the installed PyTorch/CUDA environment.

Before you start

  • Claude Code and a supported model
  • The project-specific PyTorch toolchain, dependencies and a reproducible failure

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://github.com/affaan-m/everything-claude-code/blob/b92f181b3b748d1abbc2afd94af6aa7d8c8fca29/agents/pytorch-build-resolver.md

    Supports: Workflow, inputs and outputs, Declared tools and constraints, Selection and limitations

  2. https://github.com/affaan-m/everything-claude-code/blob/b92f181b3b748d1abbc2afd94af6aa7d8c8fca29/LICENSE

    Supports: Licence and attribution requirements

  3. https://code.claude.com/docs/en/sub-agents.md

    Supports: Host setup and permission defaults

Evidence & Ask