Home / Class/ powsum_kernel_cpu_impl Class — pytorch Architecture

powsum_kernel_cpu_impl Class — pytorch Architecture

Architecture documentation for the powsum_kernel_cpu_impl class in ReduceOpsKernel.cpp from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/cpu/ReduceOpsKernel.cpp lines 472–480

template <typename scalar_t, typename out_t=typename scalar_value_type<scalar_t>::type>
void powsum_kernel_cpu_impl(TensorIterator& iter, const double& val) {
  using acc_t = at::opmath_type<typename scalar_value_type<scalar_t>::type>;
  if (val == 2.0) {
    binary_kernel_reduce(iter, NormTwoOps<scalar_t, acc_t, out_t, false>(), acc_t(0));
  } else {
    binary_kernel_reduce(iter, NormOps<scalar_t, acc_t, out_t, false>{acc_t(val)}, acc_t(0));
  }
}

Analyze Your Own Codebase

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

Try Supermodel Free