|
32 | 32 | from executorch.exir.passes.propagate_device_pass import ( |
33 | 33 | _get_target_device_from_compile_specs, |
34 | 34 | _parse_device_spec_value, |
| 35 | + PropagateDeviceConfig, |
35 | 36 | TARGET_DEVICE_COMPILE_SPEC_KEY, |
36 | 37 | ) |
37 | 38 | from executorch.exir.schema import DeviceType |
@@ -766,7 +767,9 @@ def forward(self, a, b): |
766 | 767 | inputs = (torch.randn(2, 2), torch.randn(2, 2)) |
767 | 768 | et_config = ExecutorchBackendConfig( |
768 | 769 | emit_stacktrace=False, |
769 | | - skip_h2d_for_method_inputs=True, |
| 770 | + propagate_device_config=PropagateDeviceConfig( |
| 771 | + skip_h2d_for_method_inputs=True |
| 772 | + ), |
770 | 773 | enable_non_cpu_memory_planning=True, |
771 | 774 | ) |
772 | 775 |
|
@@ -822,7 +825,9 @@ def forward(self, a, b): |
822 | 825 | inputs = (torch.randn(2, 2), torch.randn(2, 2)) |
823 | 826 | et_config = ExecutorchBackendConfig( |
824 | 827 | emit_stacktrace=False, |
825 | | - skip_d2h_for_method_outputs=True, |
| 828 | + propagate_device_config=PropagateDeviceConfig( |
| 829 | + skip_d2h_for_method_outputs=True |
| 830 | + ), |
826 | 831 | enable_non_cpu_memory_planning=True, |
827 | 832 | ) |
828 | 833 |
|
@@ -876,8 +881,10 @@ def forward(self, a, b): |
876 | 881 | inputs = (torch.randn(2, 2), torch.randn(2, 2)) |
877 | 882 | et_config = ExecutorchBackendConfig( |
878 | 883 | emit_stacktrace=False, |
879 | | - skip_h2d_for_method_inputs=True, |
880 | | - skip_d2h_for_method_outputs=True, |
| 884 | + propagate_device_config=PropagateDeviceConfig( |
| 885 | + skip_h2d_for_method_inputs=True, |
| 886 | + skip_d2h_for_method_outputs=True, |
| 887 | + ), |
881 | 888 | enable_non_cpu_memory_planning=True, |
882 | 889 | ) |
883 | 890 |
|
@@ -952,7 +959,9 @@ def forward(self, a, b): |
952 | 959 | inputs = (torch.randn(2, 2), torch.randn(2, 2)) |
953 | 960 | et_config = ExecutorchBackendConfig( |
954 | 961 | emit_stacktrace=False, |
955 | | - skip_h2d_for_method_inputs=True, |
| 962 | + propagate_device_config=PropagateDeviceConfig( |
| 963 | + skip_h2d_for_method_inputs=True |
| 964 | + ), |
956 | 965 | enable_non_cpu_memory_planning=True, |
957 | 966 | ) |
958 | 967 |
|
|
0 commit comments