pytorch/test/expect
Shangdi Yu ea4b80e6d6 [FX][export] strict DCE pass, check schema for node impurity (#130552)
Fixes the failure in `test/export/test_export_training_ir_to_run_decomp.py ` caused by dead code elimination removing node with side effects.

For background, in export, we may want to export higher-level IRs that are not functional, so we need to check for side effects more carefully.

 A call_function node is impure if it has at least one mutable argument.

Fixed the tests below:

test_to_module_with_mutated_buffer_multiple_update_sub_later
test_export_input_mutation_static_shape
test_buffer_util

Another attempt modifying the original DCE pass is made in PR #130395, but it breaks some other tests, so here we add a flag and use it for export only.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/130552
Approved by: https://github.com/pianpwk
2024-07-12 15:43:27 +00:00
..
__init__.py
HasDecompTest.test_aten_core_operators.expect Revert "Add decompositions for copy variants of view ops (#128416)" 2024-07-11 22:09:23 +00:00
HasDecompTest.test_has_decomposition.expect Revert "Add decompositions for copy variants of view ops (#128416)" 2024-07-11 22:09:23 +00:00
TestAutograd.test_function-x_grad_desc.expect
TestAutograd.test_function-y_grad_desc.expect
TestFXAPIBackwardCompatibility.test_class_member_back_compat-fx_backcompat_class_members.expect Add support for multiple flexattention calls in a single compile (#125516) 2024-05-07 21:37:37 +00:00
TestFXAPIBackwardCompatibility.test_function_back_compat-fx_backcompat_function_signatures.expect [FX][export] strict DCE pass, check schema for node impurity (#130552) 2024-07-12 15:43:27 +00:00
TestJit.test_cu_escaped_number.expect
TestJit.test_import_method.expect
TestJit.test_non_ascii_string.expect
TestJit.test_pretty_printer-empty_float_list_test.expect
TestJit.test_pretty_printer-empty_int_list_test.expect
TestJit.test_pretty_printer-if_one.expect
TestJit.test_pretty_printer-if_test.expect
TestJit.test_pretty_printer-loop_use_test.expect
TestJit.test_pretty_printer-print_weird_test.expect
TestJit.test_pretty_printer-python_op_name_test.expect
TestJit.test_pretty_printer-while_if_test.expect
TestJit.test_pretty_printer-while_test.expect
TestPytorchExportModes.test_aten_fallback.expect
TestPytorchExportModes.test_onnx_aten.expect
TestScript.test_annot_ast_mypy_fn.expect
TestScript.test_annot_ast_mypy_method.expect
TestScript.test_annot_ast_py3_fn.expect
TestScript.test_annot_ast_py3_method.expect
TestScript.test_annot_string_mypy_fn.expect
TestScript.test_annot_string_mypy_method.expect
TestScript.test_annot_string_py3_fn.expect
TestScript.test_annot_string_py3_method.expect
TestScript.test_annotated_script_fn.expect
TestScript.test_annotated_script_method.expect
TestScript.test_format-stdout.expect
TestScript.test_listconstruct_erasure.expect
TestScript.test_parser_type_annotations.expect
TestScript.test_parser_type_annotations_comment.expect
TestScript.test_print-stdout.expect
TestScript.test_python_frontend.expect
TestScript.test_python_frontend_py2.expect
TestScript.test_python_frontend_py3.expect
TestScript.test_string_print-stdout.expect
TestScript.test_torch_dot_tensor_annotation.expect
TestSparseCompressedCPU.test_print_SparseBSC_cpu.expect
TestSparseCompressedCPU.test_print_SparseBSR_cpu.expect
TestSparseCompressedCPU.test_print_SparseCSC_cpu.expect
TestSparseCompressedCPU.test_print_SparseCSR_cpu.expect
TestSparseCompressedCUDA.test_print_SparseBSC_cuda.expect
TestSparseCompressedCUDA.test_print_SparseBSR_cuda.expect
TestSparseCompressedCUDA.test_print_SparseCSC_cuda.expect
TestSparseCompressedCUDA.test_print_SparseCSR_cuda.expect
TestSparseCPU.test_print_coalesced_cpu_float64.expect
TestSparseCPU.test_print_uncoalesced_cpu_float64.expect
TestSparseCUDA.test_print_coalesced_cuda_float64.expect
TestSparseCUDA.test_print_uncoalesced_cuda_float64.expect
TestSparseMeta.test_print_meta_SparseBSC_float64.expect
TestSparseMeta.test_print_meta_SparseBSR_float64.expect
TestSparseMeta.test_print_meta_SparseCOO_float64.expect
TestSparseMeta.test_print_meta_SparseCSC_float64.expect
TestSparseMeta.test_print_meta_SparseCSR_float64.expect
TestTensorBoard.test_audio.expect
TestTensorBoard.test_caffe2_simple_cnnmodel.expect
TestTensorBoard.test_caffe2_simple_model.expect
TestTensorBoard.test_histogram_auto.expect
TestTensorBoard.test_histogram_doane.expect
TestTensorBoard.test_histogram_fd.expect
TestTensorBoard.test_hparams_bool.expect
TestTensorBoard.test_hparams_number.expect
TestTensorBoard.test_hparams_string.expect
TestTensorBoard.test_image_with_3_channel_batched.expect
TestTensorBoard.test_image_with_boxes.expect
TestTensorBoard.test_image_with_one_channel.expect
TestTensorBoard.test_image_with_one_channel_batched.expect
TestTensorBoard.test_image_without_channel.expect
TestTensorBoard.test_mesh.expect
TestTensorBoard.test_nested_nn_squential.expect
TestTensorBoard.test_pr_curve.expect
TestTensorBoard.test_pr_curve_raw.expect
TestTensorBoard.test_pytorch_graph.expect
TestTensorBoard.test_scalar_new_style.expect
TestTensorBoard.test_text.expect
TestTensorBoard.test_video.expect
TestTorch.test_is_nonzero-empty.expect
TestTorch.test_is_nonzero-multiple.expect
TestTorch.test_print-non_contiguous.expect