Skip to content

[ET-VK] model test #2889

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
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions backends/vulkan/test/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ python_unittest(
"//executorch/extension/pybindings:portable_lib", # @manual
"//executorch/extension/pytree:pylib",
"//executorch/kernels/portable:custom_ops_generated_lib",
"//wearables/camera/ml/model_experimentation/person_segmentation/cunet:cunet_lib",
],
)

Expand Down
13 changes: 13 additions & 0 deletions backends/vulkan/test/test_vulkan_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

from executorch.exir import EdgeProgramManager, to_edge
from torch.export import Dim, export, ExportedProgram
from wearables.camera.ml.model_experimentation.person_segmentation.cunet.cunet import (
C_UNet,
)

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

Expand Down Expand Up @@ -628,3 +631,13 @@ def forward(self, x):
sample_inputs,
memory_layouts=[vk_graph_schema.VkMemoryLayout.TENSOR_CHANNELS_PACKED],
)

def test_vulkan_backend_cunet(self):
module = C_UNet()
sample_inputs = (torch.rand((1, 3, 96, 72), dtype=torch.float32),)

self.lower_module_and_test_output(
module,
sample_inputs,
memory_layouts=[vk_graph_schema.VkMemoryLayout.TENSOR_CHANNELS_PACKED],
)