pytorch/test
kshitij12345 ada65fdd67 [complex32] fft support (cuda only) (#74857)
`half` and `complex32` support for `torch.fft.{fft, fft2, fftn, hfft, hfft2, hfftn, ifft, ifft2, ifftn, ihfft, ihfft2, ihfftn, irfft, irfft2, irfftn, rfft, rfft2, rfftn}`

* We only add support for `CUDA` as `cuFFT` supports these precision.
* We still error out on `CPU` and `ROCm` as their respective backends don't support this precision

For `cuFFT` following are the constraints for these precisions
* Minimum GPU architecture is SM_53
* Sizes are restricted to powers of two only
* Strides on the real part of real-to-complex and complex-to-real transforms are not supported
* More than one GPU is not supported
* Transforms spanning more than 4 billion elements are not supported

Ref: https://docs.nvidia.com/cuda/cufft/#half-precision-transforms

TODO:
* [x] Update docs about the restrictions
* [x] Check the correct way to check for `hip` device. (seems like `device.is_cuda()` is true for hip as well) (Thanks @peterbell10 )

Ref  for second point in TODO:e424e7d214/aten/src/ATen/native/SpectralOps.cpp (L31)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74857
Approved by: https://github.com/anjali411, https://github.com/peterbell10
2022-05-12 04:28:55 +00:00
..
ao/sparsity [ao][sparsity] comsability for sparsity and QAT convert 2022-04-11 16:32:08 +00:00
autograd Fix autograd.functional tests to not fail with logging tensor 2022-04-20 20:32:40 +00:00
benchmark_utils Add CPU slow test job (#73748) 2022-03-23 21:17:27 +00:00
bottleneck_test
cpp lshift and rshift stop support floating types (#77146) 2022-05-11 22:29:30 +00:00
cpp_api_parity
cpp_extensions [Reland] Add BUILD_LAZY_CUDA_LINALG option (#73447) 2022-03-01 21:33:07 +00:00
custom_backend [ROCM] Enable custom tests on rocm 2022-04-26 14:22:14 +00:00
custom_operator [ROCM] Enable custom tests on rocm 2022-04-26 14:22:14 +00:00
distributed [FSDP] Do not check fwd order in eval mode 2022-05-11 22:55:01 +00:00
distributions Add mode property to distributions. (#76690) 2022-05-11 18:26:56 +00:00
error_messages
expect [WIP] Make constructor calls in experimental MetaTracer serializable 2022-05-11 00:19:47 +00:00
forward_backward_compatibility Sparse CSR: enable autograd for torch.sparse.addmm and torch.sparse.mm 2022-05-11 18:57:40 +00:00
fx [test_fx_const_fold] Remove dependencies on acc_* (#72810) 2022-02-14 20:46:54 +00:00
jit expand the coverage of conv folding (#75724) 2022-05-11 14:29:16 +00:00
jit_hooks [ROCM] Enable custom tests on rocm 2022-04-26 14:22:14 +00:00
lazy Dynamo+LTC: handle inplace ops (#75359) 2022-04-08 03:14:28 +00:00
mobile Revert "Deprecate torch.lu" 2022-05-09 19:06:44 +00:00
onnx lshift and rshift stop support floating types (#77146) 2022-05-11 22:29:30 +00:00
package [black][codemod] formatting changes from black 22.3.0 2022-05-12 03:04:35 +00:00
quantization [quant][core][gpu][feature] Implemented quantized conv1d cudnn op 2022-05-12 03:25:30 +00:00
scripts
test_img
typing Add typing for torch.return_type 2022-03-29 02:17:21 +00:00
allowlist_for_publicAPI.json Add __all__ for torch.autograd.{anomaly_mode, gradcheck, forward_ad} 2022-05-10 17:36:47 +00:00
create_dummy_torchscript_model.py Add test for FC/BC for torchscript file. 2022-04-13 23:23:13 +00:00
delete.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py Add test for FC/BC for torchscript file. 2022-04-13 23:23:13 +00:00
run_test.py Additional ops for ShardedTensor, ReplicatedTensor and PartialTensor. 2022-05-06 16:28:04 +00:00
simulate_nccl_errors.py
test_ao_sparsity.py [ao][sparsity] make sparsity and PTQ compose (#74845) 2022-04-05 03:35:41 +00:00
test_autocast.py Update operator list for AutocastCPU (#68725) 2022-05-11 17:28:35 +00:00
test_autograd.py Bugfix scatter_reduce backward formulas 2022-05-05 20:22:39 +00:00
test_binary_ufuncs.py lshift and rshift stop support floating types (#77146) 2022-05-11 22:29:30 +00:00
test_bundled_images.py
test_bundled_inputs.py
test_complex.py [testing] Update dispatch macros (#74977) 2022-03-30 14:13:21 -07:00
test_cpp_api_parity.py
test_cpp_extensions_aot.py
test_cpp_extensions_jit.py Remove breakpad dependency 2022-05-03 20:21:55 +00:00
test_cuda_primary_ctx.py remove hasPrimaryContext workaround on ROCm (#71146) 2022-01-25 20:32:12 +00:00
test_cuda.py Add high level control of fp32 matmul precision; disable TF32 for matmuls by default 2022-05-04 20:40:13 +00:00
test_dataloader.py Update Dataloader with default parameter device (#65402) 2022-04-21 01:33:53 +00:00
test_datapipe.py [DataPipe] Revamp serialization logic of DataPipes 2022-05-10 16:16:46 +00:00
test_decomp.py Register prims as operators. 2022-05-11 16:38:14 +00:00
test_deploy.py
test_determination.py
test_dispatch.py Towards supporting quantized structured kernels (#74560) 2022-04-05 04:31:48 +00:00
test_expanded_weights.py expanded weights: instance norm faster rule 2022-04-19 19:40:09 +00:00
test_foreach.py [testing] Update dispatch macros (#74977) 2022-03-30 14:13:21 -07:00
test_function_schema.py
test_functional_autograd_benchmark.py fix python version error (#71021) 2022-01-21 01:05:53 +00:00
test_functional_optim.py [Opt Overlap] Clean up code in _OptimizerHookState (#71620) 2022-01-26 19:33:49 +00:00
test_functionalization.py Revert "[test] try to fix torch.tensor for functionalization" 2022-05-11 18:48:42 +00:00
test_futures.py
test_fx_experimental.py [WIP] Make constructor calls in experimental MetaTracer serializable 2022-05-11 00:19:47 +00:00
test_fx.py Back out "record_function: update to use custom_class API" (#76253) 2022-04-26 17:49:57 -04:00
test_hub.py torch.hub security improvement: add new trust_repo parameter 2022-04-05 09:29:25 +00:00
test_import_stats.py
test_indexing.py Fix deterministic indexing with non-contiguous tensor 2022-04-22 18:46:50 +00:00
test_jit_autocast.py [JIT][Autocast] Don't cast softmax on CPU 2022-05-02 22:47:52 +00:00
test_jit_cuda_fuser.py [NVFuser] Opinfos for extremal values in binary ufuncs 2022-05-10 03:22:20 +00:00
test_jit_disabled.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py [primTorch] flatten, squeeze, unsqueeze... (#77043) 2022-05-09 11:24:55 +00:00
test_jit_fuser.py
test_jit_legacy.py
test_jit_llga_fuser.py [Reland take-2] Add JIT graph fuser for oneDNN Graph API (v0.5) 2022-05-05 16:57:03 +00:00
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py
test_jit.py Add RefineTypes JIT pass for Tuple (#76919) 2022-05-12 00:48:39 +00:00
test_jiterator.py Python Interface for Jiterator 2022-05-06 18:44:28 +00:00
test_kernel_launch_checks.py
test_license.py
test_linalg.py Remove deprecated torch.solve (#70986) 2022-05-10 13:44:07 +00:00
test_logging.py [Codemod][Codemod deprecated unittest asserts] fbcode//caffe2/test (#71708) 2022-03-15 19:28:52 +00:00
test_masked.py Use scatter_reduce to support masked reductions on sparse COO tensors (sum, prod, amin, amax) 2022-05-06 15:40:22 +00:00
test_meta.py Add meta tensor support for some operations using python registration 2022-05-10 17:55:06 +00:00
test_metal.py
test_mkldnn.py Enable fp32/bf16 PRelu forward and backward in MkldnnCPU path (#60427) 2022-05-10 17:29:11 +00:00
test_mobile_optimizer.py Prepare for an update to the XNNPACK submodule (#72642) 2022-02-25 00:39:15 +00:00
test_model_dump.py Prepare for an update to the XNNPACK submodule (#72642) 2022-02-25 00:39:15 +00:00
test_module_init.py fx quant: add quantized Softmax workflow integration (#75106) 2022-04-20 21:54:26 +00:00
test_modules.py only compare attributes for meta tensors (#72508) 2022-02-17 02:33:08 +00:00
test_monitor.py torch/monitor: merge Interval and FixedCount stats (#72009) 2022-01-30 23:21:59 +00:00
test_multiprocessing_spawn.py Make test_multiprocessing_spawn.py compatible with pytest (#50408) 2022-02-10 16:18:46 +00:00
test_multiprocessing.py [ROCm] Skipping few multiprocess test 2022-04-27 17:56:36 +00:00
test_namedtensor.py use torch.testing.assert_equal in TestCase.assertEqual (#67796) 2022-01-27 08:33:55 +00:00
test_namedtuple_return_api.py Remove deprecated torch.solve (#70986) 2022-05-10 13:44:07 +00:00
test_native_functions.py
test_native_mha.py [PyTorch] Add native fast path for transformer encoder inference (#76333) 2022-04-26 12:58:03 -04:00
test_nestedtensor.py Adding output_size to to_padded_tensor (#76640) 2022-05-03 18:22:51 +00:00
test_nn.py add mixed data type mode for LayerNorm forward path 2022-05-12 03:35:06 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py torch.tensor: add tests for list of numpy arrays case 2022-04-04 01:02:31 +00:00
test_openmp.py
test_ops_gradients.py Various OpInfo architecture improvements 2022-04-18 21:55:32 +00:00
test_ops_jit.py Various OpInfo architecture improvements 2022-04-18 21:55:32 +00:00
test_ops.py [primTorch] flatten, squeeze, unsqueeze... (#77043) 2022-05-09 11:24:55 +00:00
test_optim.py Fix CosineAnnealingLR on restart 2022-04-20 13:35:01 +00:00
test_overrides.py Cannibalize noarch CI job into crossref CI job 2022-04-20 11:56:25 +00:00
test_package.py
test_per_overload_api.py Update __torch_dispatch__ to return op overload instead of the opoverload packet function (#72673) 2022-03-07 22:38:42 +00:00
test_prims.py Register prims as operators. 2022-05-11 16:38:14 +00:00
test_profiler.py [Profiler] Expose profilerType in Python 2022-04-16 21:08:18 +00:00
test_pruning_op.py
test_public_bindings.py Add "mps" device to PyTorch framework. 2022-04-27 19:21:57 +00:00
test_python_dispatch.py Jiterator with Python Registration (#77121) 2022-05-10 20:54:23 +00:00
test_pytree.py Register torch.return_types.* as pytree nodes 2022-04-19 13:46:20 +00:00
test_quantization.py [quant][fx] Add RNN reference module (#73386) 2022-03-02 10:30:37 +00:00
test_reductions.py Fix bincount to use acc scalar for the bounds (#76979) 2022-05-10 21:03:04 +00:00
test_scatter_gather_ops.py Bugfix NAN and Inf handling for scatter_reduce (amin and amax) 2022-05-06 15:39:57 +00:00
test_segment_reductions.py
test_serialization.py Make sure requires_grad is propagated for all backend 2022-04-25 19:31:24 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py [testing] Update dispatch macros (#74977) 2022-03-30 14:13:21 -07:00
test_show_pickle.py
test_sort_and_select.py Speedup segmented sort with large nsort 2022-05-11 16:24:28 +00:00
test_sparse_csr.py Sparse CSR: enable autograd for torch.sparse.addmm and torch.sparse.mm 2022-05-11 18:57:40 +00:00
test_sparse.py Faster index_select for sparse COO tensors on CPU. (#72710) 2022-05-10 16:33:13 +00:00
test_spectral_ops.py [complex32] fft support (cuda only) (#74857) 2022-05-12 04:28:55 +00:00
test_stateless.py Removed direct doc formatting 2022-05-02 14:14:33 +00:00
test_static_runtime.py Fix quicklints (#72256) 2022-02-03 15:17:35 +00:00
test_subclass.py Support for tensor subclasses as parameters 2022-04-27 19:28:55 +00:00
test_tensor_creation_ops.py [chalf] rand, randn, full, empty, ones, zeros (#77183) 2022-05-11 05:05:54 +00:00
test_tensorboard.py Cannibalize noarch CI job into crossref CI job 2022-04-20 11:56:25 +00:00
test_tensorexpr_pybind.py [NNC] Lowering function generates the output buffer with the specified stride (#76529) 2022-05-04 20:04:22 +00:00
test_tensorexpr.py [NNC] call super().setUp() & tearDown() in test_tensorexpr.py (#74504) 2022-03-22 20:17:21 +00:00
test_testing.py add rocm ciflow/slow workflow 2022-04-22 17:41:28 +00:00
test_throughput_benchmark.py
test_torch.py Support torch.Tensor.to for CSR 2022-05-05 21:59:50 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py [chalf] update type promotion table (#76893) 2022-05-10 19:51:33 +00:00
test_typing.py
test_unary_ufuncs.py Adds python ref consistency test, elementwise unary reference inputs, and formats test files 2022-05-01 22:42:46 +00:00
test_utils.py Fix issue with _checkpoint_without_reentrant 2022-05-05 17:37:31 +00:00
test_view_ops.py Adds python ref consistency test, elementwise unary reference inputs, and formats test files 2022-05-01 22:42:46 +00:00
test_vmap.py
test_vulkan.py
test_xnnpack_integration.py Update XNNPACK (#73467) 2022-02-28 06:09:26 +00:00