Home / Class/ is_reduced_floating_point_v Class — pytorch Architecture

is_reduced_floating_point_v Class — pytorch Architecture

Architecture documentation for the is_reduced_floating_point_v class in UpSample.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/UpSample.h lines 478–486

template <typename scalar_in, typename scalar_out,
          typename std::enable_if_t<!is_reduced_floating_point_v<scalar_out> || !std::is_same_v<scalar_in, float>, int> = 0>
void inline apply_grad_input(scalar_in* buffer_ptr, scalar_out* gin, int64_t size) {
  TORCH_CHECK((is_reduced_floating_point_v<scalar_out>),
              "Upsample backward only support BFloat16 and Half in the lower precision data types on CPU.")
  TORCH_CHECK((std::is_same_v<scalar_in, float>),
              "Upsample backward should use float as acc buffer for BFloat16 and Half grad input on CPU.")
  return;
}

Analyze Your Own Codebase

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

Try Supermodel Free