@@ -180,16 +180,14 @@ def _dtype_cases() -> list:
180180 ]
181181
182182
183- def _vgf_no_quant_dtype_cases () -> list :
184- return [
185- pytest .param (torch .float32 , id = "fp32" ),
186- pytest .param (torch .bfloat16 , id = "bf16" ),
187- ]
188-
189-
190- def _vgf_quant_dtype_cases () -> list :
183+ def _vgf_dtype_cases () -> list :
191184 return [
192185 pytest .param (torch .float32 , id = "fp32" ),
186+ pytest .param (
187+ torch .bfloat16 ,
188+ marks = pytest .mark .xfail (reason = "BF16 runtime support not ready for VGF." ),
189+ id = "bf16" ,
190+ ),
193191 ]
194192
195193
@@ -235,14 +233,12 @@ def test_phi3_tosa_INT_layers(name, module_factory, input_factory):
235233
236234
237235@common .SkipIfNoModelConverter
238- @pytest .mark .parametrize ("dtype" , _vgf_no_quant_dtype_cases ())
236+ @pytest .mark .parametrize ("dtype" , _vgf_dtype_cases ())
239237@pytest .mark .parametrize ("name,module_factory,input_factory" , _module_cases ())
240238def test_phi3_vgf_no_quant_layers (name , module_factory , input_factory , dtype ):
241239 config = _phi3_config ()
242240 module = module_factory (config ).to (dtype )
243241 inputs = input_factory (config , dtype )
244- atol = 1e-02 if dtype == torch .bfloat16 else 1e-03
245- rtol = 1e-02 if dtype == torch .bfloat16 else 1e-03
246242
247243 pipeline = VgfPipeline [input_t1 if len (inputs ) == 1 else input_t2 ](
248244 module ,
@@ -254,14 +250,12 @@ def test_phi3_vgf_no_quant_layers(name, module_factory, input_factory, dtype):
254250 InsertInt32CastsAfterInt64PlaceholdersPass (),
255251 ],
256252 quantize = False ,
257- atol = atol ,
258- rtol = rtol ,
259253 )
260254 pipeline .run ()
261255
262256
263257@common .SkipIfNoModelConverter
264- @pytest .mark .parametrize ("dtype" , _vgf_quant_dtype_cases ())
258+ @pytest .mark .parametrize ("dtype" , _vgf_dtype_cases ())
265259@pytest .mark .parametrize ("name,module_factory,input_factory" , _module_cases ())
266260def test_phi3_vgf_quant_layers (name , module_factory , input_factory , dtype ):
267261 config = _phi3_config ()
0 commit comments