Skip to content

Commit 710ea49

Browse files
committed
Update
[ghstack-poisoned]
2 parents 244b146 + 4ae840d commit 710ea49

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

backends/qualcomm/tests/tester.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from executorch.backends.qualcomm._passes.qnn_pass_manager import QnnPassManager
1414
from executorch.backends.qualcomm.partition.qnn_partitioner import QnnPartitioner
1515
from executorch.backends.qualcomm.utils.utils import (
16-
generate_qnn_executorch_compiler_spec,
1716
generate_htp_compiler_spec,
17+
generate_qnn_executorch_compiler_spec,
1818
get_soc_to_chipset_map,
1919
)
2020
from executorch.backends.test.harness import Tester as TesterBase
@@ -36,7 +36,7 @@ def __init__(
3636
self,
3737
partitioners: Optional[List[Partitioner]] = None,
3838
edge_compile_config: Optional[EdgeCompileConfig] = None,
39-
soc_model: str = "SM8650"
39+
soc_model: str = "SM8650",
4040
):
4141
backend_options = generate_htp_compiler_spec(use_fp16=True)
4242
self.chipset = get_soc_to_chipset_map()[soc_model]
@@ -47,7 +47,8 @@ def __init__(
4747

4848
super().__init__(
4949
partitioners=partitioners or [QnnPartitioner(self.compiler_specs)],
50-
edge_compile_config=edge_compile_config or EdgeCompileConfig(_check_ir_validity=False),
50+
edge_compile_config=edge_compile_config
51+
or EdgeCompileConfig(_check_ir_validity=False),
5152
default_partitioner_cls=QnnPartitioner,
5253
)
5354

@@ -69,7 +70,7 @@ def __init__(
6970
module: torch.nn.Module,
7071
example_inputs: Tuple[torch.Tensor],
7172
dynamic_shapes: Optional[Tuple[Any]] = None,
72-
):
73+
):
7374
# Specialize for Qualcomm
7475
stage_classes = (
7576
executorch.backends.test.harness.Tester.default_stage_classes()

backends/test/suite/flow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def all_flows() -> dict[str, TestFlow]:
6464

6565
try:
6666
from executorch.backends.test.suite.flows.vulkan import VULKAN_TEST_FLOW
67+
6768
flows += [
6869
VULKAN_TEST_FLOW,
6970
]
@@ -72,6 +73,7 @@ def all_flows() -> dict[str, TestFlow]:
7273

7374
try:
7475
from executorch.backends.test.suite.flows.qualcomm import QUALCOMM_TEST_FLOW
76+
7577
flows += [
7678
QUALCOMM_TEST_FLOW,
7779
]
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from executorch.backends.qualcomm.tests.tester import QualcommTester
22
from executorch.backends.test.suite.flow import TestFlow
33

4+
45
def _create_qualcomm_flow(
5-
name: str,
6-
quantize: bool = False,
6+
name: str,
7+
quantize: bool = False,
78
) -> TestFlow:
89
return TestFlow(
910
name,
@@ -12,4 +13,5 @@ def _create_qualcomm_flow(
1213
quantize=quantize,
1314
)
1415

16+
1517
QUALCOMM_TEST_FLOW = _create_qualcomm_flow("qualcomm")
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from executorch.backends.vulkan.test.tester import VulkanTester
21
from executorch.backends.test.suite.flow import TestFlow
2+
from executorch.backends.vulkan.test.tester import VulkanTester
3+
34

45
def _create_vulkan_flow(
5-
name: str,
6-
quantize: bool = False,
6+
name: str,
7+
quantize: bool = False,
78
) -> TestFlow:
89
return TestFlow(
910
name,
@@ -12,4 +13,5 @@ def _create_vulkan_flow(
1213
quantize=quantize,
1314
)
1415

16+
1517
VULKAN_TEST_FLOW = _create_vulkan_flow("vulkan")

backends/vulkan/test/tester.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import executorch.backends.test.harness.stages as BaseStages
1111

1212
import torch
13-
from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner
1413
from executorch.backends.test.harness import Tester as TesterBase
1514
from executorch.backends.test.harness.stages import StageType
15+
from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner
1616
from executorch.exir import EdgeCompileConfig
1717
from executorch.exir.backend.partitioner import Partitioner
1818

@@ -33,7 +33,8 @@ def __init__(
3333
super().__init__(
3434
default_partitioner_cls=VulkanPartitioner,
3535
partitioners=partitioners,
36-
edge_compile_config=edge_compile_config or EdgeCompileConfig(_check_ir_validity=False),
36+
edge_compile_config=edge_compile_config
37+
or EdgeCompileConfig(_check_ir_validity=False),
3738
)
3839

3940

0 commit comments

Comments
 (0)