compute_fct Class — pytorch Architecture
Architecture documentation for the compute_fct class in SpectralOps.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/mkl/SpectralOps.cpp lines 236–245
template<typename T>
T compute_fct(int64_t size, int64_t normalization) {
constexpr auto one = static_cast<T>(1);
switch (static_cast<fft_norm_mode>(normalization)) {
case fft_norm_mode::none: return one;
case fft_norm_mode::by_n: return one / static_cast<T>(size);
case fft_norm_mode::by_root_n: return one / std::sqrt(static_cast<T>(size));
}
TORCH_CHECK(false, "Unsupported normalization type", normalization);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free