Skip to content

Commit fcf431f

Browse files
authored
Arm Backend: Add Tiny Stories llama test case for TOSA BI (#9996)
Test currently xfails with key error relating to scalar_tensor Signed-off-by: Ryan O'Shea <[email protected]>
1 parent 6c63cc9 commit fcf431f

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

backends/arm/test/models/test_llama.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def prepare_model(self):
102102
def test_llama_tosa_MI(self):
103103
llama_model, llama_inputs, llama_meta = self.prepare_model()
104104

105-
if llama_model is None and llama_inputs is None and llama_meta is None:
105+
if llama_model is None or llama_inputs is None:
106106
pytest.skip("Missing model and/or input files")
107107

108108
with torch.no_grad():
@@ -123,3 +123,29 @@ def test_llama_tosa_MI(self):
123123
rtol=1.1, # TODO: MLETORCH-825 decrease tolerance
124124
)
125125
)
126+
127+
@pytest.mark.xfail(reason="KeyError: scalar_tensor_1 (MLETORCH-907)")
128+
def test_llama_tosa_BI(self):
129+
llama_model, llama_inputs, llama_meta = self.prepare_model()
130+
131+
if llama_model is None or llama_inputs is None:
132+
pytest.skip("Missing model and/or input files")
133+
134+
with torch.no_grad():
135+
(
136+
ArmTester(
137+
llama_model,
138+
example_inputs=llama_inputs,
139+
compile_spec=common.get_tosa_compile_spec("TOSA-0.80+BI"),
140+
constant_methods=llama_meta,
141+
)
142+
.quantize()
143+
.export()
144+
.to_edge_transform_and_lower()
145+
.to_executorch()
146+
.run_method_and_compare_outputs(
147+
inputs=llama_inputs,
148+
atol=4.3,
149+
rtol=1.1, # TODO: Tolerance needs to be updated after MLETORCH-907
150+
)
151+
)

0 commit comments

Comments
 (0)