LLM: update setup to provide new install option to support ipex 2.1 & oneapi 2024 (#9647)

* update setup

* default to 2.0 now

* meet code review
This commit is contained in:
Ruonan Wang 2023-12-13 17:31:56 +08:00 committed by GitHub
parent 09ca540f9b
commit 9b9cd51de1

View file

@ -272,16 +272,28 @@ def setup_package():
all_requires += CONVERT_DEP all_requires += CONVERT_DEP
# Linux install with -f https://developer.intel.com/ipex-whl-stable-xpu # Linux install with -f https://developer.intel.com/ipex-whl-stable-xpu
xpu_requires = copy.deepcopy(all_requires) xpu_20_requires = copy.deepcopy(all_requires)
xpu_requires.remove('torch') xpu_20_requires.remove('torch')
xpu_requires += ["torch==2.0.1a0;platform_system=='Linux'", # xpu_20 only works for linux now
"torch==2.0.0a0+gitc6a572f;platform_system=='Windows'", xpu_20_requires += ["torch==2.0.1a0;platform_system=='Linux'",
"torchvision==0.15.2a0;platform_system=='Linux'", "torchvision==0.15.2a0;platform_system=='Linux'",
"intel_extension_for_pytorch==2.0.110+xpu;platform_system=='Linux'", "intel_extension_for_pytorch==2.0.110+xpu;platform_system=='Linux'",
"intel_extension_for_pytorch==2.0.110+gitba7f6c1;platform_system=='Windows'", "bigdl-core-xe==" + VERSION + ";platform_system=='Linux'",
"bigdl-core-xe==" + VERSION + ";(platform_system=='Linux' or platform_system=='Windows')", "bigdl-core-xe-esimd==" + VERSION + ";platform_system=='Linux'"]
"bigdl-core-xe-esimd==" + VERSION + ";platform_system=='Linux'"]
xpu_21_requires = copy.deepcopy(all_requires)
xpu_21_requires.remove('torch')
xpu_21_requires += ["torch==2.1.0a0",
"torchvision==0.16.0a0",
"intel_extension_for_pytorch==2.1.10+xpu",
"bigdl-core-xe-21==" + VERSION,
"bigdl-core-xe-esimd-21==" + VERSION + ";platform_system=='Linux'"]
# default to ipex 2.0 for linux and 2.1 for windows
xpu_requires = copy.deepcopy(xpu_20_requires)
xpu_requires.extend(["torch==2.1.0a0;platform_system=='Windows'",
"torchvision==0.16.0a0;platform_system=='Windows'",
"intel_extension_for_pytorch==2.1.10+xpu;platform_system=='Windows'",
"bigdl-core-xe-21==" + VERSION + ";platform_system=='Windows'"])
serving_requires = ['py-cpuinfo'] serving_requires = ['py-cpuinfo']
serving_requires += SERVING_DEP serving_requires += SERVING_DEP
@ -307,7 +319,9 @@ def setup_package():
] ]
}, },
extras_require={"all": all_requires, extras_require={"all": all_requires,
"xpu": xpu_requires, "xpu": xpu_requires, # default to ipex 2.0 for linux and 2.1 for windows
"xpu_20": xpu_20_requires,
"xpu_21": xpu_21_requires,
"serving": serving_requires}, "serving": serving_requires},
classifiers=[ classifiers=[
'License :: OSI Approved :: Apache Software License', 'License :: OSI Approved :: Apache Software License',