boxed_kernel_func Class — pytorch Architecture
Architecture documentation for the boxed_kernel_func class in boxing.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/boxing/impl/boxing.h lines 273–295
template <class... OtherArgs>
struct BoxedKernelWrapper<
at::Tensor&(at::Tensor&, OtherArgs...),
std::enable_if_t<can_box_all<OtherArgs...>::value, void>> {
static at::Tensor& call(
const BoxedKernel& boxed_kernel_func,
const OperatorHandle& opHandle,
DispatchKeySet dispatchKeySet,
at::Tensor& outArg,
OtherArgs... otherArgs) {
torch::jit::Stack stack = boxArgs<at::Tensor&, OtherArgs...>(
outArg, std::forward<OtherArgs>(otherArgs)...);
boxed_kernel_func.callBoxed(opHandle, dispatchKeySet, &stack);
TORCH_INTERNAL_ASSERT_DEBUG_ONLY(
stack.size() == 1,
"Boxed kernel was expected to return a single value on the stack, ",
"but instead returned ",
stack.size(),
" values.");
return outArg;
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free