convert Class — pytorch Architecture
Architecture documentation for the convert class in vec256_zarch.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/cpu/vec/vec256/zarch/vec256_zarch.h lines 1613–1629
template <>
inline void convert(const int32_t* src, float* dst, int64_t n) {
// int32_t and float have same size
int64_t i;
for (i = 0; i <= (n - Vectorized<float>::size());
i += Vectorized<float>::size()) {
const int32_t* src_a = src + i;
float* dst_a = dst + i;
auto input_vec = Vectorized<int32_t>::loadu(src_a);
auto output_vec = zvec_convert_to_float(input_vec);
output_vec.store(dst_a);
}
for (; i < n; i++) {
dst[i] = static_cast<float>(src[i]);
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free