File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
neural_compressor/adaptor Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ def get_torch_version():
53
53
return version
54
54
55
55
56
+ def get_ipex_version ():
57
+ try :
58
+ ipex_version = ipex .__version__ .split ("+" )[0 ]
59
+ except ValueError as e : # pragma: no cover
60
+ assert False , "Got an unknown version of intel_extension_for_pytorch: {}" .format (e )
61
+ version = Version (ipex_version )
62
+ return version
63
+
64
+
56
65
def get_torch_white_list (approach ):
57
66
version = get_torch_version ()
58
67
import torch .quantization as tq
@@ -2603,7 +2612,7 @@ class PyTorch_IPEXAdaptor(TemplateAdaptor):
2603
2612
2604
2613
def __init__ (self , framework_specific_info ):
2605
2614
super (PyTorch_IPEXAdaptor , self ).__init__ (framework_specific_info )
2606
- self .version = get_torch_version ()
2615
+ self .version = get_ipex_version ()
2607
2616
query_config_file = "pytorch_ipex.yaml"
2608
2617
self .query_handler = PyTorchQuery (
2609
2618
device = self .device , local_config_file = os .path .join (os .path .dirname (__file__ ), query_config_file )
You can’t perform that action at this time.
0 commit comments