pytorch/test/functorch
ydwu4 3062e267b1 [cond] Add more tests for valid inputs of cond (#110727)
This PR adds a parametrized test for cond. It tests cond can be traced with valid inputs. Specifically valid inputs is combination of:
- pred (python boolean, boolean tensor, int tensor, scalar tensor)
- true_fn/false_fn (func, obj, nn_module)
- Operands (0 or more tensor inputs), tested with 0  and 2
- closures (0 or more tensor closures), tested with 0 and 2
- nested_level (no nesting or level-2 nested cond)

What this test doesn't cover:
- pred: symbolic boolean expression as predicate
- true_fn/false_fn: that mutates indermediate tensors
- operands: non-tensor operands such as float, int
- closures: nn_module attribute closures, python constant closures
- nested_level: 3+

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110727
Approved by: https://github.com/zou3519
2023-10-11 15:56:13 +00:00
..
attn_ft.py
attn_positional.py
common_utils.py [functorch] test: try using reference_inputs in vmap tests (#91355) 2023-01-06 15:00:36 +00:00
discover_coverage.py [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
functorch_additional_op_db.py remove nvfuser test in upstream pytorch (#109918) 2023-09-24 13:49:37 +00:00
test_aotdispatch.py AOTDispatch subclass (#104483) 2023-10-10 16:13:16 +00:00
test_control_flow.py [cond] Add more tests for valid inputs of cond (#110727) 2023-10-11 15:56:13 +00:00
test_dims.py enable ASAN on some tests (#103647) 2023-06-28 02:17:14 +00:00
test_eager_transforms.py Setup_context does not contain default values of forward() (#108561) 2023-09-19 16:23:52 +00:00
test_logging.py component-level configurable logging for dynamo, inductor, aot (#94858) 2023-03-18 04:17:31 +00:00
test_memory_efficient_fusion.py [Reland] Move functorch/_src to torch/_functorch (#88756) (#90091) 2022-12-03 14:17:15 +00:00
test_minifier.py [BE] Enable more flake8-comprehensions checks (#94601) 2023-02-10 23:40:29 +00:00
test_ops.py Added batch rules for _upsample_bi*2d_aa and _upsample_bi*2d_aa_backward (#110172) 2023-09-28 17:42:48 +00:00
test_parsing.py Native rearrange in functorch (#101957) 2023-06-06 02:10:42 +00:00
test_rearrange.py NumPy support in torch.compile (#106211) 2023-08-11 00:39:32 +00:00
test_vmap_registrations.py Add batch decomposition for torch.linalg.eigh (#110640) 2023-10-09 21:36:49 +00:00
test_vmap.py Add batch decomposition for torch.linalg.eigh (#110640) 2023-10-09 21:36:49 +00:00
xfail_suggester.py [BE] Enable more flake8-comprehensions checks (#94601) 2023-02-10 23:40:29 +00:00