Home / Class/ min_propagate_nan Class — pytorch Architecture

min_propagate_nan Class — pytorch Architecture

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

Entity Profile

Source Code

aten/src/ATen/native/SharedReduceOps.h lines 36–46

template <typename scalar_t>
inline C10_DEVICE scalar_t min_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 min = at::_isnan(a) ? a : (at::_isnan(b) ? b : std::min(a, b));
#else
  scalar_t min = at::_isnan(b) ? b : std::min(a, b);
#endif
  return min;
}

Analyze Your Own Codebase

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

Try Supermodel Free