Home / Class/ max_propagate_nan Class — pytorch Architecture

max_propagate_nan Class — pytorch Architecture

Architecture documentation for the max_propagate_nan class in SharedReduceOps.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/SharedReduceOps.h lines 25–35

template <typename scalar_t>
inline C10_DEVICE scalar_t max_propagate_nan(scalar_t a, scalar_t b) {
#if defined(__HIPCC__)
  // TODO: remove this special case for HIP when issue is fixed:
  //       https://github.com/ROCm/hip/issues/2209
  scalar_t max = at::_isnan(a) ? a : (at::_isnan(b) ? b : std::max(a, b));
#else
  scalar_t max = at::_isnan(b) ? b : std::max(a, b);
#endif
  return max;
}

Analyze Your Own Codebase

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

Try Supermodel Free