Skip to content

Commit efbe98d

Browse files
committed
up
1 parent 5be96ca commit efbe98d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

backends/apple/coreml/test/test_torch_ops.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
from executorch.backends.apple.coreml.compiler import CoreMLBackend
1616
from executorch.backends.apple.coreml.partition import CoreMLPartitioner
17+
from executorch.exir.backend.utils import format_delegated_graph
1718

1819
from torchao.prototype.quantization.codebook_coreml import CodebookWeightOnlyConfig
1920
from torchao.quantization import IntxWeightOnlyConfig, PerAxis, PerGroup, quantize_
20-
from executorch.exir.backend.utils import format_delegated_graph
21+
2122

2223
def is_fbcode():
2324
return not hasattr(torch.version, "git_version")
@@ -185,8 +186,10 @@ def test_dequantize_codebook_linear(self):
185186
"getitem",
186187
], f"Got unexpected node target after delegation: {node.target.__name__}"
187188

188-
print(format_delegated_graph(delegated_program.exported_program().graph_module))
189-
189+
assert (
190+
"executorch.exir.dialects.edge._ops.quant.dequantize_codebook.default"
191+
in format_delegated_graph(delegated_program.exported_program().graph_module)
192+
)
190193

191194
et_prog = delegated_program.to_executorch()
192195
self._compare_outputs(et_prog, model, example_inputs)
@@ -210,6 +213,12 @@ def test_dequantize_codebook_embedding(self):
210213
"executorch_call_delegate",
211214
"getitem",
212215
], f"Got unexpected node target after delegation: {node.target.__name__}"
216+
217+
assert (
218+
"executorch.exir.dialects.edge._ops.quant.dequantize_codebook.default"
219+
in format_delegated_graph(delegated_program.exported_program().graph_module)
220+
)
221+
213222
et_prog = delegated_program.to_executorch()
214223
self._compare_outputs(et_prog, model, example_inputs)
215224

0 commit comments

Comments
 (0)