to_vec_uint8_helper Class — pytorch Architecture
Architecture documentation for the to_vec_uint8_helper class in vec256_zarch.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/cpu/vec/vec256/zarch/vec256_zarch.h lines 1284–1308
template <
typename U = T,
std::enable_if_t<std::is_same_v<U, int32_t>, int> = 0>
Vectorized<uint8_t> to_vec_uint8_helper() const {
// helper function for float to uint8_t conversion
uint8_t values[8] = {
static_cast<uint8_t>(_vec0[0]),
static_cast<uint8_t>(_vec0[1]),
static_cast<uint8_t>(_vec0[2]),
static_cast<uint8_t>(_vec0[3]),
static_cast<uint8_t>(_vec1[0]),
static_cast<uint8_t>(_vec1[1]),
static_cast<uint8_t>(_vec1[2]),
static_cast<uint8_t>(_vec1[3]),
};
return Vectorized<uint8_t>{
values[0], values[1], values[2], values[3], values[4], values[5],
values[6], values[7], 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0,
};
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free