14
14
15
15
from executorch .backends .apple .coreml .compiler import CoreMLBackend
16
16
from executorch .backends .apple .coreml .partition import CoreMLPartitioner
17
+ from executorch .exir .backend .utils import format_delegated_graph
17
18
18
19
from torchao .prototype .quantization .codebook_coreml import CodebookWeightOnlyConfig
19
20
from torchao .quantization import IntxWeightOnlyConfig , PerAxis , PerGroup , quantize_
20
- from executorch . exir . backend . utils import format_delegated_graph
21
+
21
22
22
23
def is_fbcode ():
23
24
return not hasattr (torch .version , "git_version" )
@@ -185,8 +186,10 @@ def test_dequantize_codebook_linear(self):
185
186
"getitem" ,
186
187
], f"Got unexpected node target after delegation: { node .target .__name__ } "
187
188
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
+ )
190
193
191
194
et_prog = delegated_program .to_executorch ()
192
195
self ._compare_outputs (et_prog , model , example_inputs )
@@ -210,6 +213,12 @@ def test_dequantize_codebook_embedding(self):
210
213
"executorch_call_delegate" ,
211
214
"getitem" ,
212
215
], 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
+
213
222
et_prog = delegated_program .to_executorch ()
214
223
self ._compare_outputs (et_prog , model , example_inputs )
215
224
0 commit comments