Home / Class/ createFunctionSchemaFromTraitsSingleReturn Class — pytorch Architecture

createFunctionSchemaFromTraitsSingleReturn Class — pytorch Architecture

Architecture documentation for the createFunctionSchemaFromTraitsSingleReturn class in infer_schema.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/core/op_registration/infer_schema.h lines 129–141

template <typename FunctionTraits>
FunctionSchema createFunctionSchemaFromTraitsSingleReturn(std::string&& name, std::string&& overload_name) {
 using ReturnType = typename FunctionTraits::return_type;
 using ParameterTypes = typename FunctionTraits::parameter_types;

 // arguments and returns are computed into a std::array at compile time and embedded into the binary.
 // The only code executed at runtime here is the one that creates a std::vector
 // of the arguments/returns from the std::array.
 constexpr auto arguments = createArguments<ParameterTypes>::call();
 constexpr auto returns = createSingleReturn<ReturnType>::call();

 return make_function_schema(std::move(name), std::move(overload_name), arguments, returns);
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free