pytorch/torch/_dynamo
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
..
backends [ONNX] switch from onnxscript-preview to onnxscript (#109139) 2023-09-18 22:24:47 +00:00
repro Add heuristic for when evict_first should be set (and some other minor things) (#108841) 2023-10-01 17:06:12 +00:00
variables [cond] Add more tests for valid inputs of cond (#110727) 2023-10-11 15:56:13 +00:00
__init__.py Re-land: Break graph on manual_seed. (#109109) 2023-09-28 15:28:40 +00:00
_trace_wrapped_higher_order_op.py Support a simple subset of functions as backward hooks on intermediate tensors (#109537) 2023-10-11 01:35:37 +00:00
allowed_functions.py [HigherOrderOp] expose torch.cond (#110293) 2023-10-07 20:39:52 +00:00
bytecode_analysis.py consider CALL_FINALLY non-jumping in stacksize_analysis (#103621) 2023-06-29 20:23:20 +00:00
bytecode_transformation.py [dynamo] fine-grained bytecode-source attribution in python 3.11 (#104676) 2023-07-20 17:18:52 +00:00
cache_size.py [reland][Dynamo] cache_size policy #107496 (#108069) 2023-08-28 22:06:54 +00:00
code_context.py [dynamo] preserve some FX node metadata of GraphModules (#107067) 2023-09-15 23:29:14 +00:00
codegen.py [dynamo] Graph break on rng get/set state - remove GeneratorStateSource (#109410) 2023-09-22 22:31:55 +00:00
compiled_autograd.py Support a simple subset of functions as backward hooks on intermediate tensors (#109537) 2023-10-11 01:35:37 +00:00
comptime.py Pretty dataclass dynamo explain (#102869) 2023-06-07 22:38:57 +00:00
config_utils.py [test][docs] Fix doctest warnings for syntax errors (#110517) 2023-10-05 00:00:06 +00:00
config.py Revert "Reland 3rd try [finishing colesbury's PR 100642] Guard on nn.Module dicts and type (#109323)" + Forward fixes + test (#110964) 2023-10-11 05:16:47 +00:00
convert_frame.py [dynamo] add config for displaying all guard failures (#110927) 2023-10-10 19:57:44 +00:00
current_scope_id.py [HigherOrderOp] Fall back on all new side effects in speculate_subgraph (#104077) 2023-06-28 14:20:37 +00:00
debug_utils.py Fix typo under torch directory (#110824) 2023-10-09 19:16:43 +00:00
decorators.py Fix typo under torch/_dynamo directory (#110459) 2023-10-04 16:05:05 +00:00
device_interface.py [Inductor] Generalize inductor triton backend device agnostic (#109486) 2023-09-24 07:49:20 +00:00
eval_frame.py Revert "[user errors] compulsory case names, allow multiple (#110878)" 2023-10-10 04:44:40 +00:00
exc.py Revert "[user errors] compulsory case names, allow multiple (#110878)" 2023-10-10 04:44:40 +00:00
external_utils.py Compiled autograd (#103822) 2023-07-24 21:12:05 +00:00
funcname_cache.py [dynamo, logging] Report name of defining class along side function name in Dynamo logs (#110190) 2023-10-05 20:41:38 +00:00
guards.py Revert "Reland 3rd try [finishing colesbury's PR 100642] Guard on nn.Module dicts and type (#109323)" + Forward fixes + test (#110964) 2023-10-11 05:16:47 +00:00
hooks.py
logging.py
mutation_guard.py [dynamo] Treat monkey patched .forward as dynamic (#107104) 2023-08-26 01:41:29 +00:00
output_graph.py [reland] Use is_symbolic instead of testing isinstance in some place (#110676) 2023-10-10 19:37:17 +00:00
polyfill.py [dynamo] Add itertools.repeat via polyfill (#110953) 2023-10-10 20:40:33 +00:00
profiler.py Don't test dynamic_shapes in profiler (#103516) 2023-06-13 17:47:25 +00:00
replay_record.py Fix TORCH_COMPILE_DEBUG incompatibility with aot inductor (#106169) 2023-07-28 17:17:58 +00:00
resume_execution.py [dynamo] fine-grained bytecode-source attribution in python 3.11 (#104676) 2023-07-20 17:18:52 +00:00
side_effects.py Support a simple subset of functions as backward hooks on intermediate tensors (#109537) 2023-10-11 01:35:37 +00:00
skipfiles.py [collective] Add a torch.compile + functional_collectives test (#110688) 2023-10-10 17:14:50 +00:00
source.py [dynamo] Remove SuperSource (#110475) 2023-10-08 04:45:06 +00:00
symbolic_convert.py Revert "[user errors] compulsory case names, allow multiple (#110878)" 2023-10-10 04:44:40 +00:00
test_case.py Enable default workflow PyT 2.0 UTs on ROCm stack (#100981) 2023-05-15 23:45:04 +00:00
test_minifier_common.py [BE] Enable ruff's UP rules and autoformat dynamo / functorch and refs (#105432) 2023-07-19 13:48:44 +00:00
testing.py Revert "[inductor] fix a max-autotune rng state related bug (#109828)" 2023-09-23 22:35:37 +00:00
types.py [Dynamo] fix signature in dynamo types (#110081) 2023-09-27 09:30:04 +00:00
utils.py Revert "[user errors] compulsory case names, allow multiple (#110878)" 2023-10-10 04:44:40 +00:00