add-uint-support
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
How to use
Zidentyfikuj operator lub kernel, do którego chcesz dodać obsługę typów unsigned integer (uint16, uint32, uint64). Sprawdź, czy plik zawiera makra AT_DISPATCH.
Jeśli plik używa starego AT_DISPATCH (bez V2), najpierw skonwertuj go do AT_DISPATCH_V2, ponieważ skill pracuje z wersją V2 makr.
Zlokalizuj istniejące makro AT_DISPATCH_V2 w kodzie operatora. Zwykle wygląda ono jak: AT_DISPATCH_V2(dtype, "op", AT_WRAP(& { kernel
(); }), AT_EXPAND(AT_ALL_TYPES)). Rozszerz makro o obsługę typów unsigned, dodając AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) jako dodatkowy argument, lub zastąp AT_ALL_TYPES na AT_INTEGRAL_TYPES_V2, jeśli pracujesz z typami całkowitymi.
Weryfikuj, że dodane typy (kUInt16, kUInt32, kUInt64) są obsługiwane przez kernel. Upewnij się, że implementacja kernela nie zawiera założeń specyficznych dla typów ze znakiem.
Przetestuj zmiany, aby potwierdzić, że operator poprawnie obsługuje nowe typy unsigned integer w różnych scenariuszach użycia.