log_normal_kernel Class — pytorch Architecture
Architecture documentation for the log_normal_kernel class in DistributionTemplates.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/cpu/DistributionTemplates.h lines 308–317
template<typename RNG>
void log_normal_kernel(TensorIteratorBase& iter, double mean, double std, RNG generator) {
AT_DISPATCH_FLOATING_TYPES_AND2(at::ScalarType::Half, at::ScalarType::BFloat16, iter.dtype(), "log_normal_cpu", [&]() {
std::lock_guard<std::mutex> lock(generator->mutex_);
at::lognormal_distribution<double> logNormal(mean, std);
cpu_serial_kernel(iter, [&logNormal, generator]() -> scalar_t {
return static_cast<scalar_t>(logNormal(generator));
});
});
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free