/usr/local/lib64/python3.6/site-packages/torch/include/ATen/native
NameSizeModeActions
cpu/-0755rm
cuda/-0755rm
quantized/-0755rm
Activation.h30690644editdlrm
AdaptivePooling.h11650644editdlrm
BatchLinearAlgebra.h82460644editdlrm
batch_norm.h12850644editdlrm
BinaryOps.h49160644editdlrm
BucketizationUtils.h42480644editdlrm
ComplexHelper.h37970644editdlrm
CompositeRandomAccessor.h8880644editdlrm
CompositeRandomAccessorCommon.h67130644editdlrm
ConvUtils.h53500644editdlrm
Copy.h3560644editdlrm
CPUBlas.h41990644editdlrm
CPUFallback.h24040644editdlrm
Cross.h2620644editdlrm
DilatedConvolutionUtils.h64160644editdlrm
DispatchStub.h76720644editdlrm
Distance.h7320644editdlrm
Distributions.h216540644editdlrm
DistributionTemplates.h186230644editdlrm
EmbeddingBag.h13200644editdlrm
Fill.h3840644editdlrm
ForeachUtils.h59620644editdlrm
FunctionOfAMatrixUtils.h4360644editdlrm
GridSampler.h105250644editdlrm
group_norm.h8960644editdlrm
Histogram.h4920644editdlrm
im2col.h28380644editdlrm
im2col_shape_check.h61810644editdlrm
IndexingUtils.h53730644editdlrm
layer_norm.h28920644editdlrm
Lerp.h5530644editdlrm
LinearAlgebra.h6030644editdlrm
LinearAlgebraUtils.h252360644editdlrm
LossMulti.h21970644editdlrm
Math.h913560644editdlrm
MathBitFallThroughLists.h40860644editdlrm
MathBitsFallback.h73260644editdlrm
MaxPooling.h12340644editdlrm
Normalization.h3020644editdlrm
PointwiseOps.h7490644editdlrm
Pool.h109220644editdlrm
Pow.h16940644editdlrm
ReduceAllOps.h3780644editdlrm
ReduceOps.h17450644editdlrm
ReduceOpsUtils.h122450644editdlrm
Repeat.h12860644editdlrm
Resize.h65010644editdlrm
ResizeCommon.h13210644editdlrm
RNN.h24670644editdlrm
ScatterGatherChecks.h36410644editdlrm
SegmentReduce.h6850644editdlrm
SharedReduceOps.h157850644editdlrm
SobolEngineOpsUtils.h17230644editdlrm
Sorting.h5360644editdlrm
SortingUtils.h57220644editdlrm
SpectralOpsUtils.h31460644editdlrm
StridedRandomAccessor.h68470644editdlrm
TensorAdvancedIndexing.h30720644editdlrm
TensorCompare.h13330644editdlrm
TensorDimApply.h18320644editdlrm
TensorFactories.h33820644editdlrm
TensorIterator.h460644editdlrm
TensorIteratorDynamicCasting.h20250644editdlrm
TensorShape.h10490644editdlrm
TensorTransformations.h9380644editdlrm
TriangularOpsUtils.h20000644editdlrm
TypeProperties.h4960644editdlrm
UnaryOps.h44640644editdlrm
Unfold2d.h5510644editdlrm
Unfold3d.h8520644editdlrm
UnfoldBackward.h53980644editdlrm
UpSample.h135990644editdlrm
vol2col.h36420644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/native/SpectralOpsUtils.h (3146B)
#pragma once #include #include #include #include namespace at { namespace native { // Normalization types used in _fft_with_size enum class fft_norm_mode { none, // No normalization by_root_n, // Divide by sqrt(signal_size) by_n, // Divide by signal_size }; // NOTE [ Fourier Transform Conjugate Symmetry ] // // Real-to-complex Fourier transform satisfies the conjugate symmetry. That is, // assuming X is the transformed K-dimensionsal signal, we have // // X[i_1, ..., i_K] = X[j_i, ..., j_K]*, // // where j_k = (N_k - i_k) mod N_k, N_k being the signal size at dim k, // * is the conjugate operator. // // Therefore, in such cases, FFT libraries return only roughly half of the // values to avoid redundancy: // // X[:, :, ..., :floor(N / 2) + 1] // // This is also the assumption in cuFFT and MKL. In ATen SpectralOps, such // halved signal will also be returned by default (flag onesided=True). // The following infer_ft_real_to_complex_onesided_size function calculates the // onesided size from the twosided size. // // Note that this loses some information about the size of signal at last // dimension. E.g., both 11 and 10 maps to 6. Hence, the following // infer_ft_complex_to_real_onesided_size function takes in optional parameter // to infer the twosided size from given onesided size. // // cuFFT doc: http://docs.nvidia.com/cuda/cufft/index.html#multi-dimensional // MKL doc: https://software.intel.com/en-us/mkl-developer-reference-c-dfti-complex-storage-dfti-real-storage-dfti-conjugate-even-storage#CONJUGATE_EVEN_STORAGE inline int64_t infer_ft_real_to_complex_onesided_size(int64_t real_size) { return (real_size / 2) + 1; } inline int64_t infer_ft_complex_to_real_onesided_size(int64_t complex_size, int64_t expected_size=-1) { int64_t base = (complex_size - 1) * 2; if (expected_size < 0) { return base + 1; } else if (base == expected_size) { return base; } else if (base + 1 == expected_size) { return base + 1; } else { std::ostringstream ss; ss << "expected real signal size " << expected_size << " is incompatible " << "with onesided complex frequency size " << complex_size; AT_ERROR(ss.str()); } } using fft_fill_with_conjugate_symmetry_fn = void (*)(ScalarType dtype, IntArrayRef mirror_dims, IntArrayRef half_sizes, IntArrayRef in_strides, const void* in_data, IntArrayRef out_strides, void* out_data); DECLARE_DISPATCH(fft_fill_with_conjugate_symmetry_fn, fft_fill_with_conjugate_symmetry_stub); // In real-to-complex transform, cuFFT and MKL only fill half of the values // due to conjugate symmetry. This function fills in the other half of the full // fft by using the Hermitian symmetry in the signal. // self should be the shape of the full signal and dims.back() should be the // one-sided dimension. // See NOTE [ Fourier Transform Conjugate Symmetry ] TORCH_API void _fft_fill_with_conjugate_symmetry_(const Tensor& self, IntArrayRef dims); }} // at::native