Add uint Support to PyTorch Operators
Updates PyTorch AT_DISPATCH_V2 macros to enable uint16/uint32/uint64 type coverage for operators and kernels.
Dev & CodingAdvanced★ 382⑂ 52AI score 8/10Last updated: Jul 3, 2026
What it does
Locates AT_DISPATCH_V2 macros in PyTorch C++ sources and extends them with barebones unsigned integer types (kUInt16, kUInt32, kUInt64).
- Two documented methods: explicitly add
AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES), or swapAT_INTEGRAL_TYPESforAT_INTEGRAL_TYPES_V2 - Detects legacy
AT_DISPATCH_*macros and routes you through the at-dispatch-v2 skill first - Sweeps every dispatch site in a file (CPU/CUDA, multiple functions) for consistent coverage
- Handles edge cases: float-only operators, files that already have uint, complex types present
Who it's for
- PyTorch core contributors touching ATen/native kernels
- ML infrastructure engineers maintaining an internal PyTorch fork
- C++ developers doing bulk refactors of macro/template dispatch code
Examples
- Open a CUDA reduce min/max kernel and ask "add uint support" — every dispatch site gains
AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) - A file listing
AT_INTEGRAL_TYPES+AT_FLOATING_TYPESgets the tidierAT_INTEGRAL_TYPES_V2substitution - Legacy
AT_DISPATCH_ALL_TYPES_AND2(...)code is first converted to V2, then extended with unsigned types
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/Microck/ordinary-claude-skills/HEAD/skills_all/add-uint-support/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills_all/add-uint-support folder from the GitHub repo Microck/ordinary-claude-skills into my ~/.claude/skills/add-uint-support/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/Microck/ordinary-claude-skills.git && mkdir -p ~/.claude/skills && cp -r ordinary-claude-skills/skills_all/add-uint-support ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal in your working directory.
- Clone the repo:
git clone https://github.com/Microck/ordinary-claude-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r ordinary-claude-skills/skills_all/add-uint-support ~/.claude/skills/ - Also copy the companion
at-dispatch-v2skill so legacy dispatch macros can be converted automatically. - Run Claude Code inside your PyTorch source tree and ask it to "add uint16/32/64 support to this kernel".
- Build and run your own tests afterwards — the skill does not verify functionality.
View source on GitHub ↗License: NOASSERTION