is_reduced_floating_point_v Class — pytorch Architecture
Architecture documentation for the is_reduced_floating_point_v class in SumKernel.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/cpu/SumKernel.cpp lines 89–106
template <typename vec_t, typename vacc_t>
struct InnerSumCastLoadPolicy <vec_t, vacc_t,
std::enable_if_t<(!is_reduced_floating_point_v<vechold_type<vec_t>>) &&
!std::is_same_v<vec_t, vacc_t>>> {
using scalar_t = vechold_type<vec_t>;
using acc_t = vechold_type<vacc_t>;
static constexpr int64_t memsize() {
return LoadPolicy<vec_t>::memsize();
}
static vacc_t load(const char * C10_RESTRICT data, int64_t stride, int64_t index) {
auto ptr = reinterpret_cast<const scalar_t*>(data + stride * index);
return load_reduce_vec<acc_t>(ptr, [](acc_t a, scalar_t b) {
return a + b;
}, acc_t(0));
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free