-
Notifications
You must be signed in to change notification settings - Fork 608
Add RemoveAssert pass to remove _assert_tensor_metadata
nodes
#7277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7277
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ebb9eaf with merge base 037a0d3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D67057219 |
80526dd
to
a5bcbd2
Compare
…rch#7277) Summary: `_assert_tensor_metadata` nodes is added to the result of exported graphs in D66988295. (More background in T209705957, mostly to relax aten.to constraint). Add a pass to remove this op when calling to_edge. Differential Revision: D67057219
This pull request was exported from Phabricator. Differential Revision: D67057219 |
…rch#7277) Summary: `_assert_tensor_metadata` nodes is added to the result of exported graphs in D66988295. (More background in T209705957, mostly to relax aten.to constraint). Add a pass to remove this op when calling to_edge. Differential Revision: D67057219
a5bcbd2
to
60db2c8
Compare
This pull request was exported from Phabricator. Differential Revision: D67057219 |
60db2c8
to
6c9cbbf
Compare
…rch#7277) Summary: `_assert_tensor_metadata` nodes is added to the result of exported graphs in D66988295. (More background in T209705957, mostly to relax aten.to constraint). Add a pass to remove this op when calling to_edge. Differential Revision: D67057219
This pull request was exported from Phabricator. Differential Revision: D67057219 |
…rch#7277) Summary: `_assert_tensor_metadata` nodes is added to the result of exported graphs in D66988295. (More background in T209705957, mostly to relax aten.to constraint). Add a pass to remove this op when calling to_edge. Differential Revision: D67057219
6c9cbbf
to
1fe46a4
Compare
This pull request was exported from Phabricator. Differential Revision: D67057219 |
…rch#7277) Summary: `_assert_tensor_metadata` nodes is added to the result of exported graphs in D66988295. (More background in T209705957, mostly to relax aten.to constraint). Add a pass to remove this op when calling to_edge. Differential Revision: D67057219
1fe46a4
to
ebb9eaf
Compare
This pull request was exported from Phabricator. Differential Revision: D67057219 |
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch. Update to pin to include pytorch/executorch#7277. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_float_conversion buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_device_to_mutation_float ADD_NEW_STABILITY_CONFIGS=true buck2 run 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests buck2 run 'fbcode//mode/dev-nosan' fbcode//deeplearning/aot_inductor/cpu/test:cpu_lowering_utils_test buck2 run 'fbcode//mode/dev-nosan' //executorch/exir/tests:test_memory_format_ops_pass ``` Reviewed By: bdhirsh Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch. Update to pin to include pytorch/executorch#7277. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_float_conversion buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_device_to_mutation_float ADD_NEW_STABILITY_CONFIGS=true buck2 run 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests buck2 run 'fbcode//mode/dev-nosan' fbcode//deeplearning/aot_inductor/cpu/test:cpu_lowering_utils_test buck2 run 'fbcode//mode/dev-nosan' //executorch/exir/tests:test_memory_format_ops_pass buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_by_feature_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_stability_test -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/soft_max_loss_with_class_weights:stability_tests -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:distillation_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:stability_tests - aps_models.ads.modules.module_stability_tests.loss_stability_tests.ctr_cvr_logistic_regression_loss_stability_test.CtrCvrLogisticRegressionLossStabilityTest: test_cider_loss -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/feature_perturbation_stability_tests:sparse_feature_perturbation_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:train_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:histogram_binning_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:replicate_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:label_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:dral_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/adjust_task_weight_stability_tests:task_weight_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/loss_modules/module_stability_tests/cider_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_by_feature_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true ``` Reviewed By: bdhirsh, shruthign Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch. Update to pin to include pytorch/executorch#7277. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_float_conversion buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_device_to_mutation_float ADD_NEW_STABILITY_CONFIGS=true buck2 run 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests buck2 run 'fbcode//mode/dev-nosan' fbcode//deeplearning/aot_inductor/cpu/test:cpu_lowering_utils_test buck2 run 'fbcode//mode/dev-nosan' //executorch/exir/tests:test_memory_format_ops_pass buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_by_feature_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_stability_test -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/soft_max_loss_with_class_weights:stability_tests -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:distillation_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:stability_tests - aps_models.ads.modules.module_stability_tests.loss_stability_tests.ctr_cvr_logistic_regression_loss_stability_test.CtrCvrLogisticRegressionLossStabilityTest: test_cider_loss -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/feature_perturbation_stability_tests:sparse_feature_perturbation_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:train_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:histogram_binning_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:replicate_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:label_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:dral_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/adjust_task_weight_stability_tests:task_weight_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/loss_modules/module_stability_tests/cider_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_by_feature_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true ``` Reviewed By: bdhirsh, shruthign Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch. Update to pin to include pytorch/executorch#7277. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_float_conversion buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_device_to_mutation_float ADD_NEW_STABILITY_CONFIGS=true buck2 run 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests buck2 run 'fbcode//mode/dev-nosan' fbcode//deeplearning/aot_inductor/cpu/test:cpu_lowering_utils_test buck2 run 'fbcode//mode/dev-nosan' //executorch/exir/tests:test_memory_format_ops_pass buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_by_feature_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_stability_test -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/soft_max_loss_with_class_weights:stability_tests -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:distillation_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:stability_tests - aps_models.ads.modules.module_stability_tests.loss_stability_tests.ctr_cvr_logistic_regression_loss_stability_test.CtrCvrLogisticRegressionLossStabilityTest: test_cider_loss -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/feature_perturbation_stability_tests:sparse_feature_perturbation_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:train_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:histogram_binning_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:replicate_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:label_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:dral_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/adjust_task_weight_stability_tests:task_weight_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/loss_modules/module_stability_tests/cider_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_by_feature_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true ``` Reviewed By: bdhirsh, shruthign Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch. Update to pin to include pytorch/executorch#7277. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_float_conversion buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_device_to_mutation_float ADD_NEW_STABILITY_CONFIGS=true buck2 run 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests buck2 run 'fbcode//mode/dev-nosan' fbcode//deeplearning/aot_inductor/cpu/test:cpu_lowering_utils_test buck2 run 'fbcode//mode/dev-nosan' //executorch/exir/tests:test_memory_format_ops_pass buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_by_feature_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck test aps_models/ads/modules/module_stability_tests/histogram_binning_calibration_tests:calibration_stability_test -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test 'fbcode//mode/opt' fbcode//aps_models/ads/modules/module_stability_tests/soft_max_loss_with_class_weights:stability_tests -- test_stability_config --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:distillation_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/loss_stability_tests:stability_tests - aps_models.ads.modules.module_stability_tests.loss_stability_tests.ctr_cvr_logistic_regression_loss_stability_test.CtrCvrLogisticRegressionLossStabilityTest: test_cider_loss -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/feature_perturbation_stability_tests:sparse_feature_perturbation_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:train_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:inference_stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/ctr_cvr_task_arch_stability_tests:histogram_binning_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:replicate_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:label_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/aggregator_stability_tests:dral_aggregator_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/module_stability_tests/adjust_task_weight_stability_tests:task_weight_stability_test -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/loss_modules/module_stability_tests/cider_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true buck2 test fbcode//aps_models/ads/modules/py2pt/calibration/module_stability_tests/histogram_binning_calibration_by_feature_stability_tests:stability_tests -- --env OVERRIDE_IR_CONFIGS=true ``` Reviewed By: bdhirsh, shruthign Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch and mtia. Update to executorch pin to include pytorch/executorch#7277. Reviewed By: bdhirsh, shruthign Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. We need to remove ` torch.ops.aten._assert_tensor_metadata.default` for executorch and mtia. Update to executorch pin to include pytorch/executorch#7277. Reviewed By: bdhirsh, shruthign Differential Revision: D66988295
Summary: if we have a.to(b), and b has a different dtype with a, then it must be a copy. In this case, we do not need to freeze the tensor. Instead, we use torch.ops.aten._assert_tensor_metadata.default to ensure that a must not have the same dtype as b. Fixes #139718 Update executorch pin to include pytorch/executorch#7277. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_float_conversion buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:test_export -- -r test_device_to_mutation_float ``` Differential Revision: D66988295 Pull Request resolved: #142420 Approved by: https://github.com/bdhirsh
Summary:
_assert_tensor_metadata
nodes is added in D66988295.Differential Revision: D67057219