Skip to content

update Vulkan nn.module test to support not decomposition #4054

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions backends/vulkan/test/test_vulkan_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner
from executorch.backends.vulkan.vulkan_preprocess import VulkanBackend

from executorch.exir import EdgeCompileConfig, EdgeProgramManager, to_edge
from executorch.exir import EdgeCompileConfig
from torch.export import Dim, export, ExportedProgram

ctypes.CDLL("libvulkan.so.1")


from executorch.exir.program._program import _to_edge_transform_and_lower
from executorch.extension.pybindings.portable_lib import ( # @manual
_load_for_executorch_from_buffer,
)
Expand Down Expand Up @@ -119,16 +120,15 @@ def run_test(memory_layout):
program: ExportedProgram = export(
model, sample_inputs, dynamic_shapes=dynamic_shapes
)
edge_program: EdgeProgramManager = to_edge(
program, compile_config=self._edge_compile_config
)

edge_program = edge_program.transform(
[I64toI32(self._edge_compile_config._skip_dim_order), MeanToSumDiv()]
edge_program = _to_edge_transform_and_lower(
program,
transform_passes=[
I64toI32(self._edge_compile_config._skip_dim_order),
MeanToSumDiv(),
],
partitioner=[VulkanPartitioner(compile_options)],
)

edge_program = edge_program.to_backend(VulkanPartitioner(compile_options))

executorch_program = edge_program.to_executorch()

self.assertEqual(
Expand Down
Loading