77# pyre-strict
88
99import logging
10- import sys
1110import unittest
1211
1312import torch
13+ from executorch .backends .apple .coreml .recipes import CoreMLRecipeProvider # pyre-ignore
1414from executorch .backends .xnnpack .recipes .xnnpack_recipe_provider import (
1515 XNNPACKRecipeProvider ,
1616)
1717from executorch .export import export , recipe_registry
1818from executorch .export .target_recipes import get_ios_recipe
1919from executorch .runtime import Runtime
2020
21- if sys .platform != "win32" :
22- from executorch .backends .apple .coreml .recipes import ( # pyre-ignore
23- CoreMLRecipeProvider ,
24- )
25-
2621
2722class TestTargetRecipes (unittest .TestCase ):
2823 """Test target recipes."""
@@ -31,14 +26,12 @@ def setUp(self) -> None:
3126 torch ._dynamo .reset ()
3227 super ().setUp ()
3328 recipe_registry .register_backend_recipe_provider (XNNPACKRecipeProvider ())
34- if sys .platform != "win32" :
35- # pyre-ignore
36- recipe_registry .register_backend_recipe_provider (CoreMLRecipeProvider ())
29+ # pyre-ignore
30+ recipe_registry .register_backend_recipe_provider (CoreMLRecipeProvider ())
3731
3832 def tearDown (self ) -> None :
3933 super ().tearDown ()
4034
41- @unittest .skipIf (sys .platform == "win32" , "Core ML is not available on Windows." )
4235 def test_ios_fp32_recipe_with_xnnpack_fallback (self ) -> None :
4336 # Linear ops skipped by coreml but handled by xnnpack
4437 class Model (torch .nn .Module ):
@@ -114,7 +107,6 @@ def forward(self, x, y):
114107 et_output = session .run_method ("forward" , example_inputs [0 ])
115108 logging .info (f"et output { et_output } " )
116109
117- @unittest .skipIf (sys .platform == "win32" , "Core ML is not available on Windows." )
118110 def test_ios_quant_recipes (self ) -> None :
119111 class Model (torch .nn .Module ):
120112 def __init__ (self ):
0 commit comments