is_horizontal Class — pytorch Architecture
Architecture documentation for the is_horizontal class in UpSampleKernel.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/cpu/UpSampleKernel.cpp lines 1496–1514
template <typename scalar_t, bool is_horizontal>
void cpu_upsample_generic_aa(at::TensorIterator& iter, unsigned int weights_precision) {
auto loop = [&](char** data, const int64_t* strides, int64_t n) {
if constexpr (is_horizontal) {
// Strides are : X 0 | 8 8 8 0 8 (Channels first)
// Strides are : X X | 0 0 0 0 0 (Channels last)
basic_loop_aa_horizontal<scalar_t>(data, strides, n, weights_precision);
} else {
// Strides are : X Y | 0 0 0 0 0 (Channels first)
// Strides are : X X | 0 0 0 0 0 (Channels last)
// upsampling data between contiguous dimensions (aka vertical resampling)
basic_loop_aa_vertical<scalar_t>(data, strides, n, weights_precision);
}
};
iter.for_each(loop);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free