deinterleave2 Class — pytorch Architecture
Architecture documentation for the deinterleave2 class in vec256_common_vsx.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/cpu/vec/vec256/vsx/vec256_common_vsx.h lines 177–195
template <>
std::pair<Vectorized<double>, Vectorized<double>> inline deinterleave2<double>(
const Vectorized<double>& a,
const Vectorized<double>& b) {
// inputs:
// a = {a0, b0, a1, b1}
// b = {a2, b2, a3, b3}
vfloat64 aa01 = vec_xxpermdi(a.vec0(), a.vec1(), 0);
vfloat64 aa23 = vec_xxpermdi(b.vec0(), b.vec1(), 0);
vfloat64 bb_01 = vec_xxpermdi(a.vec0(), a.vec1(), 3);
vfloat64 bb_23 = vec_xxpermdi(b.vec0(), b.vec1(), 3);
// swap lanes:
// return {a0, a1, a2, a3}
// {b0, b1, b2, b3}
return std::make_pair(
Vectorized<double>{aa01, aa23}, Vectorized<double>{bb_01, bb_23});
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free