• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define TORCH_ASSERT_NO_OPERATORS
2 #include <ATen/native/UnaryOps.h>
3 #include <ATen/cuda/CUDAGeneratorImpl.h>
4 #include <ATen/native/cuda/DistributionTemplates.h>
5 
6 namespace at::native {
7 
normal_kernel(const TensorBase & self,double mean,double std,std::optional<Generator> gen)8 void normal_kernel(const TensorBase &self, double mean, double std, std::optional<Generator> gen) {
9   auto generator = get_generator_or_default<CUDAGeneratorImpl>(gen, cuda::detail::getDefaultCUDAGenerator());
10   at::native::templates::cuda::normal_kernel(self, mean, std, generator);
11 }
12 
13 REGISTER_DISPATCH(normal_stub, &normal_kernel);
14 
15 } // namespace at::native
16