Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microck/at-dispatch-v2
Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code.
Passed 21 of 22 test cases with the skill, and 5 of 22 without it.
and 20 more in the full report
16 fixed5 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 16 test cases the skill fixed. Same model, same prompt, with and without the skill.
Convert this basic ATen dispatch macro to the v2 alternative: `AT_DISPATCH_FLOATING_TYPES(dtype, "basic_float_op", [&]() { float_kernel<scalar_t>(); });`. Output the new macro code.
| Checked | Without skill | With skill |
|---|---|---|
| Uses AT_EXPAND(AT_FLOATING_TYPES) | Missed | Passed |
| Contains no trailing types after the expansion macro | Passed | Passed |
The instructions your model reads when the skill loads.
This skill helps convert PyTorch's legacy AT_DISPATCH macros to the new AT_DISPATCH_V2 format, as defined in aten/src/ATen/Dispatch_v2.h.
Use this skill when:
aten/src/ATen/native/ that use dispatch macrosOld format:
AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, dtype, "kernel_name", [&]() {
// lambda body
});
New format:
AT_DISPATCH_V2(dtype, "kernel_name", AT_WRAP([&]() {
// lambda body
}), AT_EXPAND(AT_ALL_TYPES), kBFloat16, kHalf, kBool);
scalar_type and name come first, then lambda, then typesAT_WRAP(lambda) to handle internal commasAT_EXPAND(AT_ALL_TYPES) instead of implicit expansion#include <ATen/Dispatch_v2.h> near other Dispatch includestest cases passed, vs 5 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.