Where are the definitions of those __device__ 'std::pow' like functions?

As I’m tracking down the source code in aten/src/ATen/native/cuda/PowKernel.cu file, as you see there is a lot of host and device functions that would call some std::pow() and also global ‘::pow()’ functions. But I’m not sure where are those functions defined? I mean in <cmath> there is std::pow on the host side, if I remember that correctly. But where are the device side definition? I think it must be overloaded somewhere, right?
So there must be device side explicitly defined and specialized std::pow(). Is it defined inside pytorch or from the compilers? Could you tell where that could be?
Here is the code from PowKernel.cu file:

#ifdef _MSC_VER

// Functions for pow

// pow for at::Half

static inline __host__ __device__ at::Half pow_(at::Half base, at::Half exp) {

  return static_cast<at::Half>(std::pow(static_cast<float>(base), static_cast<float>(exp)));


template <typename Base_type, typename Exp_type>

static inline __host__ __device__ Base_type pow_(Base_type base, Exp_type exp) {

  return ::pow(base, exp);


Question: where can I find the std::pow() function and ::pow() 's definitions?

On Linux this is in include/crt/math_functions.hpp, but there the code snippet actually uses ::pow, which comes from the CUDA Math API.
As far as I understand, much of the trickery is needed to support half datatypes on Windows due to templating limitations (as the comment suggests) in the compiler.

Best regards