pytorch/test/export
angelayi 5ef90e14a3 [export] Remove unused constants (#153800)
An internal test case ran into a weird issue when exporting, where the model imported a file which creates tensor constants upon importing [(code ptr)](https://fburl.com/code/xwmhxm7n). This causes the tracer to create some tensor constants even though it's not used in the model code. This PR updates the lift_constant_tensors pass to remove constant nodes that are not being used instead of lifting them as tensor constants.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/153800
Approved by: https://github.com/dolpm, https://github.com/pianpwk
2025-05-20 03:15:27 +00:00
..
__init__.py
opinfo_schema.py Fix unused Python variables in test/[e-z]* (#136964) 2024-12-18 23:02:30 +00:00
random_dag.py [BE] fix ruff rule E226: add missing whitespace around operator in f-strings (#144415) 2025-01-08 21:55:00 +00:00
test_converter.py Enable more nightly tests on s390x (#148452) 2025-03-18 16:09:39 +00:00
test_cpp_serdes.py
test_db.py [Codemod][AddExplicitStrictExportForTrainingInferenceArg] caffe2/test/export (#150884) 2025-04-09 19:18:33 +00:00
test_draft_export.py cleanup, refactor and add missing self._dde_suppressed checks (#152657) 2025-05-19 16:15:14 +00:00
test_experimental.py [DRAFT] INitial version of sticky export (#151047) 2025-04-23 22:58:43 +00:00
test_export_legacy.py EZ fix to make sure local pytest run succeeds in export (#144764) 2025-01-15 00:43:40 +00:00
test_export_strict.py Set non-strict export as default mode (#148790) 2025-03-12 21:10:58 +00:00
test_export_training_ir_to_run_decomp.py [BC-breaking] Set NonStrict as default for export_for_training (#150941) 2025-04-11 00:50:05 +00:00
test_export_with_inline_and_install.py [dynamo] Recursively realize the stack_values (#152853) 2025-05-07 02:36:44 +00:00
test_export.py [export] Remove unused constants (#153800) 2025-05-20 03:15:27 +00:00
test_functionalized_assertions.py fix incorrect literal strings / accidental tuples (#146037) 2025-02-03 15:08:11 +00:00
test_hop.py Remove unused import in tests (#146266) 2025-02-03 03:40:18 +00:00
test_lift_unlift.py Consistently use load_torchbind_test_lib in tests (#148082) 2025-03-03 19:37:28 +00:00
test_package.py [export] Exporter API prototype. (#153205) 2025-05-11 14:20:09 +00:00
test_pass_infra.py [Codemod][AddExplicitStrictExportArg] caffe2/test (#143688) 2024-12-27 07:58:44 +00:00
test_passes.py patch for block-wise quantization + pt2e (#146946) 2025-02-18 01:15:26 +00:00
test_retraceability.py Set non-strict export as default mode (#148790) 2025-03-12 21:10:58 +00:00
test_schema.py Tweak schema_check to handle annotated builtin types (#145154) 2025-01-19 18:48:35 +00:00
test_serdes.py Set non-strict export as default mode (#148790) 2025-03-12 21:10:58 +00:00
test_serialize.py [BC-breaking] Set NonStrict as default for export_for_training (#150941) 2025-04-11 00:50:05 +00:00
test_sparse.py Replace all random is_fbcode imports to environment (#151283) 2025-04-15 19:42:58 +00:00
test_swap.py Remove unused import in tests (#146266) 2025-02-03 03:40:18 +00:00
test_tools.py
test_torchbind.py Fakify torchbind objects in compile_fx and add tests for SigridTransformsInstanceTorchBind (#149529) 2025-03-21 18:58:28 +00:00
test_tree_utils.py fix incorrect literal strings / accidental tuples (#146037) 2025-02-03 15:08:11 +00:00
test_unflatten_training_ir.py [Codemod][AddExplicitStrictExportForTrainingInferenceArg] caffe2/test/export (#150884) 2025-04-09 19:18:33 +00:00
test_unflatten.py [export] Support no inputs in unflattened module (#153474) 2025-05-14 18:45:47 +00:00
test_verifier.py [Codemod][AddExplicitStrictExportForTrainingInferenceArg] caffe2/test/export (#150884) 2025-04-09 19:18:33 +00:00
testing.py Set non-strict export as default mode (#148790) 2025-03-12 21:10:58 +00:00