#if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION) #pragma once // @generated by torchgen/gen.py from NativeAotStubs.h // DispatchStubs for AOT-compiled DSL kernels embedded into ATen ops, one per // (op, dispatch key) declared by a torch/_native/ops//aot.py module. The // generated structured wrappers consult the stub between op.meta() and op.impl(): // the outputs are already allocated, so an AOT kernel fills them and returns true, // or returns false to fall through to the stock impl. The stub signature is the // op's structured impl signature, and the path is gated on // at::globalContext().allowNativeAot(). // // No kernel is registered here. The AOT kernels are built separately from the same // declarations by tools/native_aot, linked into libtorch_cuda, and registered with // set__dispatch_ptr() from static initializers. // TensorBase.h, not Tensor.h: a declaration is all this header needs, and Tensor.h // drags in the generated TensorBody.h, rebuilding every includer on any // native_functions.yaml change. #include #include namespace at::native { using topk_aot_fn = bool (*)(const at::Tensor & self, int64_t k, int64_t dim, bool largest, bool sorted, const at::Tensor & values, const at::Tensor & indices); DECLARE_DISPATCH(topk_aot_fn, topk_aot_stub) } // namespace at::native #else #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined." #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)