Home / Class/ vec_min_nan Class — pytorch Architecture

vec_min_nan Class — pytorch Architecture

Architecture documentation for the vec_min_nan class in vsx_helpers.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/cpu/vec/vec256/vsx/vsx_helpers.h lines 137–147

template <>
C10_ALWAYS_INLINE vfloat32
vec_min_nan<vfloat32>(const vfloat32& a, const vfloat32& b) {
  // NOTE: about 10% slower than vec_min, but consistent with std::min and SSE
  // regarding NaN
  vfloat32 ret;
  __asm__("xvcmpgesp %x0,%x1,%x2\n\txxsel %x0,%x1,%x2,%x0"
          : "=&wa"(ret)
          : "wa"(a), "wa"(b));
  return ret;
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free