add-uint-support

Update PyTorch AT_DISPATCH macros to support unsigned integer types.

1|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/steleman/pytorch-cuda-2.11.0 --skill add-uint-support-steleman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-uint-support
Source: https://github.com/steleman/pytorch-cuda-2.11.0/tree/main/.claude/skills/add-uint-support
Command: npx skills add https://github.com/steleman/pytorch-cuda-2.11.0 --skill add-uint-support-steleman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros.

Core Features & Use Cases

  • Enables uint16, uint32, and uint64 support in existing dispatch paths for PyTorch operators and kernels.
  • Promotes consistent type coverage across CPU and CUDA implementations when expanding operator capabilities.
  • Useful when users mention unsigned types or when extending dispatch to new unsigned operands.

Quick Start

Upgrade the operator dispatch to include unsigned types (uint16/uint32/uint64) by using AT_INTEGRAL_TYPES_V2 or AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES), and apply changes across all dispatch sites.

Frequently Asked Questions about add-uint-support

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add unsigned integer support to PyTorch operators?

Add unsigned integer support to PyTorch operators by updating AT_DISPATCH macros to include uint16, uint32, and uint64. Use AT_DISPATCH_V2 and expand either AT_INTEGRAL_TYPES_V2 or AT_BAREBONES_UNSIGNED_TYPES across all dispatch sites for consistent type coverage.

What does the AT_DISPATCH macro do for unsigned types in PyTorch kernels?

The AT_DISPATCH macro routes tensor data types to specific kernel implementations. For unsigned types, updating to AT_DISPATCH_V2 with AT_BAREBONES_UNSIGNED_TYPES enables uint16, uint32, and uint64 dispatch paths across CPU and CUDA kernels.

When do I need to update AT_DISPATCH_V2 for unsigned type coverage?

Update AT_DISPATCH_V2 for unsigned type coverage when extending PyTorch operator dispatch to uint16, uint32, or uint64 operands. This ensures the dispatch macros correctly route unsigned integers across all operator and kernel implementations.

Does PyTorch AT_DISPATCH work with uint64 and uint32 types?

PyTorch AT_DISPATCH works with uint64 and uint32 types when you upgrade dispatch sites to AT_DISPATCH_V2. Applying AT_INTEGRAL_TYPES_V2 or AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) ensures these unsigned integers are supported across kernels.

What is the best way to extend PyTorch dispatch to unsigned operands?

The best way to extend PyTorch dispatch to unsigned operands is applying AT_DISPATCH_V2 and updating type lists to AT_INTEGRAL_TYPES_V2 or AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES). This consistently covers uint16, uint32, and uint64 across all dispatch sites.

Why are my unsigned PyTorch operator kernels not dispatching correctly?

Unsigned PyTorch operator kernels fail to dispatch correctly when older AT_DISPATCH macros lack uint16, uint32, or uint64 support. Upgrading all dispatch sites to AT_DISPATCH_V2 with AT_BAREBONES_UNSIGNED_TYPES resolves the type routing inconsistencies.