|
7 | 7 | """`aten.mul.Tensor` (full broadcast) module + configs for the WebGPU op-test framework. |
8 | 8 |
|
9 | 9 | `MulModule` + `CONFIGS` are imported by `cases.py` to drive the declarative op-test |
10 | | -suite (export via VulkanPartitioner + fp64 torch golden, run on Dawn). `TestMul` is |
11 | | -the export-delegation + eager-correctness smoke test. Configs span the same-shape |
| 10 | +suite (export via VulkanPartitioner + fp64 torch golden, run on Dawn). `MulTest` is |
| 11 | +the export-delegation smoke test. Configs span the same-shape |
12 | 12 | fast path (SwiGLU), last-dim broadcast at LLM width, and a mixed-rank left-pad case. |
13 | 13 | """ |
14 | 14 |
|
15 | 15 | import unittest |
16 | 16 |
|
17 | 17 | import torch |
18 | 18 |
|
19 | | -from executorch.backends.vulkan import VulkanPartitioner |
| 19 | +from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner |
20 | 20 | from executorch.exir import to_edge_transform_and_lower |
21 | 21 |
|
22 | 22 | # name -> (shape_a, shape_b). Output shape is the broadcast of the two. |
@@ -55,20 +55,11 @@ def _delegated(et) -> bool: |
55 | 55 | ) |
56 | 56 |
|
57 | 57 |
|
58 | | -class TestMul(unittest.TestCase): |
| 58 | +class MulTest(unittest.TestCase): |
59 | 59 | def test_export_delegates(self) -> None: |
60 | 60 | for name, (sa, sb) in CONFIGS.items(): |
61 | 61 | a, b = _det_inputs(sa, sb) |
62 | 62 | et = _export(a, b) |
63 | 63 | self.assertTrue( |
64 | 64 | _delegated(et), f"Expected a VulkanBackend delegate (mul {name})" |
65 | 65 | ) |
66 | | - |
67 | | - def test_golden_matches_eager(self) -> None: |
68 | | - for _, (sa, sb) in CONFIGS.items(): |
69 | | - a, b = _det_inputs(sa, sb) |
70 | | - torch.testing.assert_close(MulModule()(a, b), a * b) |
71 | | - |
72 | | - |
73 | | -if __name__ == "__main__": |
74 | | - unittest.main() |
0 commit comments