makeFromFunctor Class — pytorch Architecture
Architecture documentation for the makeFromFunctor class in BoxedKernel_impl.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/boxing/BoxedKernel_impl.h lines 83–97
template <class KernelFunctor>
inline BoxedKernel BoxedKernel::makeFromFunctor(
std::unique_ptr<KernelFunctor> kernelFunctor) {
static_assert(
std::is_base_of_v<OperatorKernel, KernelFunctor>,
"Tried to call BoxedKernel::makeFromFunctor<KernelFunctor>, but the functor doesn't inherit from c10::OperatorKernel. Please have the functor inherit from it.");
return BoxedKernel(
std::move(kernelFunctor),
[](OperatorKernel* kernel,
const OperatorHandle& op,
DispatchKeySet ks,
Stack* stack) {
(*static_cast<KernelFunctor*>(kernel))(op, ks, stack);
});
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free