mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
IPEX bundle in MKL and DPCPP
This commit is contained in:
+3
-1
@@ -37,7 +37,9 @@
|
||||
- **Extra networks** new *settting -> extra networks -> build info on first access*
|
||||
indexes all networks on first access instead of server startup
|
||||
- **IPEX**
|
||||
- Update to **Torch 2.1 - This Update Requires Intel OneApi 2024.0**, thanks @disty0
|
||||
- Update to **Torch 2.1**, thanks @disty0
|
||||
- Built-in *MKL* and *DPCPP* for IPEX, thanks @disty0
|
||||
No need to install OneAPI anymore
|
||||
- Fix IPEX Optimize not applying with Diffusers backend, thanks @disty0
|
||||
- Disable 32 bit workarounds if the GPU supports 64 bit, thanks @disty0
|
||||
- More compatibility improvements, thanks @disty0
|
||||
|
||||
+4
-9
@@ -423,14 +423,10 @@ def check_torch():
|
||||
log.info('Intel OneAPI Toolkit detected')
|
||||
os.environ.setdefault('NEOReadDebugKeys', '1')
|
||||
os.environ.setdefault('ClDeviceGlobalMemSizeAvailablePercent', '100')
|
||||
if "linux" in sys.platform:
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.1.0a0 torchvision==0.16.0a0 intel-extension-for-pytorch==2.1.10+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/')
|
||||
os.environ.setdefault('TENSORFLOW_PACKAGE', 'tensorflow==2.13.0 intel-extension-for-tensorflow[gpu]')
|
||||
else:
|
||||
pytorch_pip = 'https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.0.110%2Bxpu-master%2Bdll-bundle/torch-2.0.0a0+gite9ebda2-cp310-cp310-win_amd64.whl'
|
||||
torchvision_pip = 'https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.0.110%2Bxpu-master%2Bdll-bundle/torchvision-0.15.2a0+fa99a53-cp310-cp310-win_amd64.whl'
|
||||
ipex_pip = 'https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.0.110%2Bxpu-master%2Bdll-bundle/intel_extension_for_pytorch-2.0.110+gitc6ea20b-cp310-cp310-win_amd64.whl'
|
||||
torch_command = os.environ.get('TORCH_COMMAND', f'{pytorch_pip} {torchvision_pip} {ipex_pip}')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.1.0a0 torchvision==0.16.0a0 intel-extension-for-pytorch==2.1.10+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/')
|
||||
os.environ.setdefault('TENSORFLOW_PACKAGE', 'tensorflow==2.13.0 intel-extension-for-tensorflow[gpu]')
|
||||
install('mkl==2024.0.0', 'mkl')
|
||||
install('mkl-dpcpp==2024.0.0', 'mkl-dpcpp')
|
||||
install('openvino', 'openvino', ignore=True)
|
||||
install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True)
|
||||
elif allow_openvino and args.use_openvino:
|
||||
@@ -503,7 +499,6 @@ def check_torch():
|
||||
if opts.get('cuda_compile_backend', '') == 'hidet':
|
||||
install('hidet', 'hidet')
|
||||
if args.use_openvino or opts.get('cuda_compile_backend', '') == 'openvino_fx':
|
||||
uninstall('openvino-nightly') # TODO openvino: remove after people had enough time upgrading
|
||||
install('openvino==2023.2.0', 'openvino')
|
||||
install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True) # TODO openvino: numpy version conflicts with tensorflow and doesn't support Python 3.11
|
||||
os.environ.setdefault('PYTORCH_TRACING_MODE', 'TORCHFX')
|
||||
|
||||
@@ -80,22 +80,16 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#Set OneAPI environmet if it's not set by the user
|
||||
if ([[ "$@" == *"--use-ipex"* ]] || [[ -d "/opt/intel/oneapi" ]] || [[ ! -z "$ONEAPI_ROOT" ]]) && [ ! -x "$(command -v sycl-ls)" ]
|
||||
if [ -d "$(realpath "$venv_dir")/lib/" ]
|
||||
then
|
||||
echo "Setting OneAPI environment"
|
||||
if [[ -z "$ONEAPI_ROOT" ]]
|
||||
then
|
||||
ONEAPI_ROOT=/opt/intel/oneapi
|
||||
fi
|
||||
source $ONEAPI_ROOT/setvars.sh
|
||||
export LD_LIBRARY_PATH=$(realpath "$venv_dir")/lib/:$LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ]
|
||||
then
|
||||
echo "Launching accelerate launch.py..."
|
||||
exec accelerate launch --num_cpu_threads_per_process=6 launch.py "$@"
|
||||
elif [[ "$@" == *"--use-ipex"* ]] && [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ] && [ -x "$(command -v sycl-ls)" ]
|
||||
elif [[ "$@" == *"--use-ipex"* ]] && [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ]
|
||||
then
|
||||
echo "Launching ipexrun launch.py..."
|
||||
exec ipexrun --multi-task-manager 'taskset' --memory-allocator 'jemalloc' launch.py "$@"
|
||||
|
||||
Reference in New Issue
Block a user