Home / Class/ vec_max_nan Class — pytorch Architecture

vec_max_nan Class — pytorch Architecture

Architecture documentation for the vec_max_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 149–159

template <>
C10_ALWAYS_INLINE vfloat32
vec_max_nan<vfloat32>(const vfloat32& a, const vfloat32& b) {
  // NOTE: about 10% slower than vec_max, but consistent with std::min and SSE
  // regarding NaN
  vfloat32 ret;
  __asm__("xvcmpgtsp %x0,%x2,%x1\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