Func Class — pytorch Architecture
Architecture documentation for the Func class in BatchRulesHelper.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/functorch/BatchRulesHelper.h lines 72–80
template <typename F, F Func, typename A, typename... T>
struct BasicUnaryBatchRuleHelper<F, Func, c10::guts::typelist::typelist<A, T...>> {
static std::tuple<Tensor, std::optional<int64_t>> apply(
const Tensor& tensor,
std::optional<int64_t> batch_dim,
T... extra_args) {
return std::make_tuple(Func(tensor, std::forward<T>(extra_args)...), batch_dim);
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free