iter Class — pytorch Architecture
Architecture documentation for the iter class in TensorIteratorDynamicCasting.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/TensorIteratorDynamicCasting.h lines 36–50
template <typename func_t>
struct needs_dynamic_casting<func_t, 0> {
static bool check(TensorIteratorBase& iter) {
using traits = function_traits<func_t>;
using cpp_type = typename traits::result_type;
// we could assert output numbers are correct here, but checks
// (including arity) are currently pushed outside of this struct.
if constexpr (std::is_void_v<cpp_type>) {
return false;
} else {
return iter.dtype(0) != c10::CppTypeToScalarType<cpp_type>::value;
}
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free