pytorch/test
Jane Xu 17ecd1e9cd Migrate test_complex_optimizer to OptimizerInfo (#118160)
This PR does what it says and more.

1. We increase coverage by a LOT! Previously, complex was not tested for many many configs, including foreach + maximize at the same time. Or the fused impls. Or just random configs people forgot about.
2. I rearranged the maximize conditional and the _view_as_real to preserve list-ness. This is needed for _view_as_real to function properly, I did add a comment in the Files Changed. This new order also just...makes more aesthetic sense.
3. Note that LBFGS and SparseAdam are skipped--they don't support complex and now we know.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/118160
Approved by: https://github.com/mikaylagawarecki
2024-01-24 21:22:47 +00:00
..
ao/sparsity [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
autograd Autograd attaches logging hooks only in debug level (#116522) 2024-01-02 20:06:18 +00:00
backends/xeon
benchmark_utils
bottleneck_test
cpp Replace constraints with dynamic_shapes in caffe2/test/cpp & torchrec/distributed/tests/test_pt2 (#118026) 2024-01-23 22:15:15 +00:00
cpp_api_parity Add python and C++ support for LPPool3d (#114199) 2023-12-08 18:18:44 +00:00
cpp_extensions Add function to materialize COW storages (#117053) 2024-01-10 15:34:16 +00:00
custom_backend
custom_operator Better unsupported op error message (#117770) 2024-01-23 15:05:16 +00:00
distributed [dtensor] rewrite embedding ops using op strategy (#118079) 2024-01-24 19:12:12 +00:00
distributions Add bfloat16 CUDA support to binomial distribution (#116932) 2024-01-07 19:50:10 +00:00
dynamo Remove optimizer.step patching for profiler hook (#115772) 2024-01-23 20:15:41 +00:00
edge Adding event_tracer evalue logging calls in codegen (#114584) 2023-11-28 18:32:05 +00:00
error_messages
expect Revert "[CUDNN][SDPA] Experimental cuDNN Flash Attention v2 Inference (#115663)" 2024-01-18 23:40:30 +00:00
export [fx] Add hooks to intercept node replacements. (#117825) 2024-01-23 22:28:40 +00:00
forward_backward_compatibility Add out_dtype support for sparse semi-structured CUTLASS back-end (#116519) 2024-01-03 16:23:17 +00:00
functorch [ROCm] skip test_eager_transforms.py test_compile_vmap_hessian_cuda (#118009) 2024-01-23 09:57:18 +00:00
fx [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
inductor [AOTI] Enable for MacOS (#118076) 2024-01-24 14:24:05 +00:00
jit Run test_jit with PYTORCH_TEST_WITH_DYNAMO=1 in CI (#117765) 2024-01-19 13:42:41 +00:00
jit_hooks
lazy Replaced CHECK with TORCH_CHECK in order to not abort, but throw a Ru… (#117653) 2024-01-18 07:47:22 +00:00
mobile [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
nn [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
onnx [export] require Module to be passed to export (#117528) 2024-01-21 19:36:13 +00:00
onnx_caffe2 Revert "[ONNX] Remove the depreacated function _export (#109763)" 2023-09-25 17:47:21 +00:00
optim Migrate test_complex_optimizer to OptimizerInfo (#118160) 2024-01-24 21:22:47 +00:00
package
profiler Revert "accelerate binary_cross_entropy_with_logits by using log_sigmoid operator (#115539)" 2024-01-22 14:48:35 +00:00
quantization [quant][pt2e] Add fold_quantize=True for all convert_pt2e calls (#117797) 2024-01-24 17:54:13 +00:00
scripts
test_img
torch_np Add super().setUp() to TestFFT1D (#117329) 2024-01-12 07:47:01 +00:00
typing Add regression test for cuda_stream type checks (#111430) 2023-10-18 07:24:01 +00:00
_test_bazel.py
allowlist_for_publicAPI.json Initial torchbind support in PT2 (#117697) 2024-01-19 06:28:20 +00:00
conftest.py Reduce pytest prints (#117069) 2024-01-23 18:39:30 +00:00
create_dummy_torchscript_model.py
delete.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py
minioptest_failures_dict.json [generate_opcheck_tests] Enable using same failures_dict for multiple testclasses (#110164) 2023-09-28 17:56:45 +00:00
mkl_verbose.py
mkldnn_verbose.py
pytest_shard_custom.py Reduce pytest prints (#117069) 2024-01-23 18:39:30 +00:00
run_doctests.sh
run_test.py Reduce pytest prints (#117069) 2024-01-23 18:39:30 +00:00
simulate_nccl_errors.py
test_ao_sparsity.py
test_autocast.py Remove incorrect usages of skipIfTorchDynamo (#117114) 2024-01-10 22:25:31 +00:00
test_autograd_fallback.py
test_autograd.py [codemod] markDynamoStrictTest batch 22 (#117729) 2024-01-18 16:59:26 +00:00
test_binary_ufuncs.py [Dynamo] Add complex to literal constant (#117819) 2024-01-23 23:46:46 +00:00
test_bundled_images.py [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
test_bundled_inputs.py
test_comparison_utils.py
test_compile_benchmark_util.py unify TEST_CUDA (#106685) 2023-08-10 09:01:36 +00:00
test_complex.py Don't fastpath conj copy when conj/neg bit mismatch (#108881) 2023-09-08 20:44:43 +00:00
test_content_store.py Fix recompilation issue with content store (#113533) 2023-11-13 23:58:13 +00:00
test_cpp_api_parity.py markDynamoStrictTest some test_cpp_extensions.* (#115858) 2023-12-15 01:22:38 +00:00
test_cpp_extensions_aot.py markDynamoStrictTest some test_cpp_extensions.* (#115858) 2023-12-15 01:22:38 +00:00
test_cpp_extensions_jit.py markDynamoStrictTest some test_cpp_extensions.* (#115858) 2023-12-15 01:22:38 +00:00
test_cpp_extensions_open_device_registration.py markDynamoStrictTest some test_cpp_extensions.* (#115858) 2023-12-15 01:22:38 +00:00
test_cuda_expandable_segments.py
test_cuda_multigpu.py
test_cuda_nvml_based_avail.py markDynamoStrictTest some more tests (#115857) 2023-12-15 01:22:38 +00:00
test_cuda_primary_ctx.py markDynamoStrictTest some more tests (#115857) 2023-12-15 01:22:38 +00:00
test_cuda_sanitizer.py unify TEST_CUDA (#106685) 2023-08-10 09:01:36 +00:00
test_cuda_trace.py markDynamoStrictTest some more tests (#115857) 2023-12-15 01:22:38 +00:00
test_cuda.py [Memory Snapshot] Track context for SEGMENT_FREE and SEGMENT_UNMAP (#118055) 2024-01-23 21:48:57 +00:00
test_custom_ops.py Add config toggle suggestions for data-dependent/dynamic output shape (#114337) 2024-01-05 14:01:01 +00:00
test_dataloader.py [BE]: Enable RUFF PERF402 and apply fixes (#115505) 2023-12-20 18:01:24 +00:00
test_datapipe.py Remove incorrect usages of skipIfTorchDynamo (#117114) 2024-01-10 22:25:31 +00:00
test_decomp.py [PyTorch] SDPA decomp: actually use attn_mask (#117579) 2024-01-17 10:26:43 +00:00
test_deploy.py
test_determination.py
test_dispatch.py Revert "markDynamoStrictTest more tests (#115871)" 2023-12-19 15:36:27 +00:00
test_dlpack.py Improve uint{16,32,64} dlpack/numpy compatibility (#116808) 2024-01-11 17:01:54 +00:00
test_dynamic_shapes.py Rename unbacked SymInt prefix to u (#117859) 2024-01-22 20:53:47 +00:00
test_expanded_weights.py [Dynamo] Use isinstance rather than istype when check if python module type (#117022) 2024-01-15 23:25:30 +00:00
test_fake_tensor.py Initial implementation of FakeTensor caching (#113873) 2024-01-17 20:38:54 +00:00
test_flop_counter.py Re-add initial Flash Attention support on ROCM (#115981) 2024-01-04 22:21:31 +00:00
test_foreach.py Refactor some tests by using TEST_CUDA & TEST_MULTIGPU instead (#116083) 2024-01-03 08:53:59 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py Cudagraphs support for compiled optimizers (#107504) 2023-08-31 20:47:18 +00:00
test_functionalization_of_rng_ops.py
test_functionalization.py Enable reverse view_funcs by default for python subclasses (#116512) 2024-01-05 16:48:12 +00:00
test_futures.py
test_fx_experimental.py Revert "[codemod] markDynamoStrictTest batch 16 (#117218)" 2024-01-12 03:06:20 +00:00
test_fx_passes.py
test_fx_reinplace_pass.py
test_fx.py [codemod] markDynamoStrictTest batch 22 (#117729) 2024-01-18 16:59:26 +00:00
test_hub.py Default permissions for torch.hub downloads (#82869) 2023-08-24 15:48:24 +00:00
test_import_stats.py
test_indexing.py [BE]: Apply FURB118 (prev): replaces unnecessary lambdas with operator. (#116027) 2023-12-20 19:35:08 +00:00
test_itt.py
test_jit_autocast.py
test_jit_disabled.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py [BE]: Enable F821 and fix bugs (#116579) 2024-01-01 08:40:46 +00:00
test_jit_fuser.py [BE]: Enable F821 and fix bugs (#116579) 2024-01-01 08:40:46 +00:00
test_jit_legacy.py
test_jit_llga_fuser.py
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py
test_jit.py [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
test_jiterator.py
test_kernel_launch_checks.py
test_legacy_vmap.py Skip some slow tests (under Dynamo) (#117389) 2024-01-12 22:18:07 +00:00
test_license.py
test_linalg.py enable mkldnn bf32 matmul (#116015) 2024-01-20 09:30:23 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py
test_matmul_cuda.py Skip unit tests that fail on MI210 runners (#114613) 2023-11-27 22:25:35 +00:00
test_meta.py Added meta function for _upsample_bicubic2d_aa (#117347) 2024-01-16 23:33:55 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn_fusion.py [codemod] markDynamoStrictTest batch 22 (#117729) 2024-01-18 16:59:26 +00:00
test_mkldnn_verbose.py
test_mkldnn.py [BE]: Enable RUFF PERF402 and apply fixes (#115505) 2023-12-20 18:01:24 +00:00
test_mobile_optimizer.py Revert "markDynamoStrictTest on more tests (#115879)" 2023-12-15 20:00:09 +00:00
test_model_dump.py
test_model_exports_to_core_aten.py Build and test ExecuTorch on PyTorch (#113364) 2023-11-16 02:19:58 +00:00
test_module_init.py Revert "markDynamoStrictTest on more tests (#115879)" 2023-12-15 20:00:09 +00:00
test_modules.py Revert "markDynamoStrictTest on more tests (#115879)" 2023-12-15 20:00:09 +00:00
test_monitor.py Change dynamo_test_failures.py to silently run skipped tests (#117401) 2024-01-17 02:48:19 +00:00
test_mps.py add Half support for interpolate operators on CPU (#105648) 2024-01-18 09:07:16 +00:00
test_multiprocessing_spawn.py Revert "markDynamoStrictTest on more tests (#115879)" 2023-12-15 20:00:09 +00:00
test_multiprocessing.py Revert "markDynamoStrictTest on more tests (#115879)" 2023-12-15 20:00:09 +00:00
test_namedtensor.py Add some checks about Device and Layout when create/convert named tensor (#113628) 2023-11-14 20:40:27 +00:00
test_namedtuple_return_api.py Revert "[CUDNN][SDPA] Experimental cuDNN Flash Attention v2 Inference (#115663)" 2024-01-18 23:40:30 +00:00
test_native_functions.py
test_native_mha.py Re-add initial Flash Attention support on ROCM (#115981) 2024-01-04 22:21:31 +00:00
test_nestedtensor.py [Nested Tensor]Support SDPA math fallback for jagged layout nested tensor (#116445) 2024-01-12 17:30:40 +00:00
test_nn.py Remove skips for passing tests (#118000) 2024-01-23 16:11:38 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py Improve uint{16,32,64} dlpack/numpy compatibility (#116808) 2024-01-11 17:01:54 +00:00
test_openmp.py
test_ops_fwd_gradients.py unMarkDynamoStrictTest on OpInfo-based tests (#115856) 2023-12-15 01:22:31 +00:00
test_ops_gradients.py unMarkDynamoStrictTest on OpInfo-based tests (#115856) 2023-12-15 01:22:31 +00:00
test_ops_jit.py unMarkDynamoStrictTest on OpInfo-based tests (#115856) 2023-12-15 01:22:31 +00:00
test_ops.py Initial implementation of FakeTensor caching (#113873) 2024-01-17 20:38:54 +00:00
test_optim.py Migrate test_complex_optimizer to OptimizerInfo (#118160) 2024-01-24 21:22:47 +00:00
test_out_dtype_op.py Allow registering decomps for HigherOrderOp; add decomp for out_dtype (#108080) 2023-08-31 03:15:38 +00:00
test_overrides.py [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
test_package.py
test_per_overload_api.py
test_prims.py Revert "markDynamoStrictTest some more (#115885)" 2023-12-15 19:51:24 +00:00
test_proxy_tensor.py Always accept 0-d scalar tensors as int, even if __index__ fails (#117451) 2024-01-14 14:39:46 +00:00
test_pruning_op.py [dynamo] Eagerly install guards (#111415) 2023-11-07 19:55:19 +00:00
test_public_bindings.py [ONNX][dynamo_export] Decomposition skips using custom operator (#117314) 2024-01-18 22:19:28 +00:00
test_python_dispatch.py [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
test_pytree.py [pytree] add access api (#117771) 2024-01-20 04:03:26 +00:00
test_quantization.py enable cat for cuda bits types (#115044) 2023-12-06 00:05:18 +00:00
test_reductions.py Make and/or on uint8 tensors properly return 0x00 or 0x01 (#117827) 2024-01-22 17:30:22 +00:00
test_scatter_gather_ops.py
test_schema_check.py Revert "markDynamoStrictTest some more (#115885)" 2023-12-15 19:51:24 +00:00
test_segment_reductions.py
test_serialization.py Support pathlib.Path as input to torch.load when mmap=True (#116104) 2023-12-28 22:54:11 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py Revert "markDynamoStrictTest some more (#115885)" 2023-12-15 19:51:24 +00:00
test_sort_and_select.py Removed an internal assertion for the optional stable value and inste… (#117414) 2024-01-17 02:25:21 +00:00
test_sparse_csr.py [ROCm] skip test_sparse_csr test_triton_bsr_softmax_cuda (#118006) 2024-01-23 00:09:42 +00:00
test_sparse_semi_structured.py Add out_dtype support for sparse semi-structured CUTLASS back-end (#116519) 2024-01-03 16:23:17 +00:00
test_sparse.py Add batched sparse CSR/CSC/BSR/BSC to sparse COO conversion support (#116206) 2024-01-07 19:42:02 +00:00
test_spectral_ops.py FFT: Handle noop fftn calls gracefully (#117368) 2024-01-12 20:16:50 +00:00
test_stateless.py Throw error if stateless.functional_call called with nn.DataParallel (#107403) 2023-08-18 03:02:04 +00:00
test_static_runtime.py Skip test_fork_wait_4 and test_fork_wait_4_async (#112743) 2023-11-02 20:46:29 +00:00
test_subclass.py Allow storage() to work on python tensor subclasses, but error on future data accesses (#107417) 2023-08-22 15:25:31 +00:00
test_sympy_utils.py Run sympy expressions with Python values / FX tracing (#113978) 2023-11-20 21:25:11 +00:00
test_tensor_creation_ops.py Enable some uint{16,32,64} tests that are working (#116809) 2024-01-15 02:25:21 +00:00
test_tensorboard.py Add tensorboard to pip requirements (#109349) 2023-09-15 10:39:48 +00:00
test_tensorexpr_pybind.py
test_tensorexpr.py
test_testing.py Back out "[Kineto] Initialize libkineto profilers during torch init process during pybind set-up (#112623)" (#116201) 2023-12-21 16:32:19 +00:00
test_throughput_benchmark.py
test_torch.py Fix swap_tensors to swap PyObjects associated with TensorImpl (#116955) 2024-01-24 01:40:18 +00:00
test_transformers.py Revert "[CUDNN][SDPA] Experimental cuDNN Flash Attention v2 Inference (#115663)" 2024-01-18 23:40:30 +00:00
test_type_hints.py
test_type_info.py Add finfo properties for float8 dtypes (#109744) 2023-09-21 03:41:48 +00:00
test_type_promotion.py Improve uint{16,32,64} dlpack/numpy compatibility (#116808) 2024-01-11 17:01:54 +00:00
test_typing.py [BE] Revive test_typing (#111428) 2023-10-18 02:19:49 +00:00
test_unary_ufuncs.py Remove incorrect usages of skipIfTorchDynamo (#117114) 2024-01-10 22:25:31 +00:00
test_utils.py Some tiny modification about torch.set/get_default_device (#116014) 2023-12-19 05:08:06 +00:00
test_view_ops.py Implement numpy(force=True) (#109636) 2023-09-20 20:06:13 +00:00
test_vulkan.py
test_weak.py [BE]: Enable RUF015 codebase wide (#115507) 2023-12-11 15:51:01 +00:00
test_xnnpack_integration.py