intel-extension-for-pytorch icon indicating copy to clipboard operation
intel-extension-for-pytorch copied to clipboard

compile_bundle.sh is hard to use

Open msaroufim opened this issue 1 year ago • 7 comments

Describe the issue

I'm trying to instal ipex from source https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=cpu&version=main&os=linux%2fwsl2&package=source to make a contribution but keep running into many issues which stem from this file wget https://github.com/intel/intel-extension-for-pytorch/raw/main/scripts/compile_bundle.sh

  1. This file will on my machine download pytorch 2.3 even though a makefile later fails because it needs 2.4. I had to myself install pytorch from nightlies and then disable installation of torch, vision and audio
  2. There is no line that says python setup.py develop anywhere which for python only changes is frustrating because building the project end to end takes a while
  3. Even after succesfully installing ipex once I try to import it, I get this error ImportError: /opt/conda/envs/ipex/lib/libmkl_intel_thread.so.2: undefined symbol: __kmpc_reduce_nowait and am now stuck

msaroufim avatar Mar 27 '24 21:03 msaroufim

Hi @jingxu10, this specific error (3) occurred because of the system already having another libmkl in its LD_LIBRARY_PATH.

@msaroufim, I resolved this specific issue but could you please run the following command on your system to resolve the libstdc ++ linking error? export LD_PRELOAD=$(bash ./intel-extension-for-pytorch/tools/get_libstdcpp_lib.sh)

We'd want to ensure that we don't use another libstdc++ present on the system. Thanks!

I've verified on my local system that this works.

sanchitintel avatar Mar 27 '24 22:03 sanchitintel

Hi @jingxu10, could you please help address 1 & 2? Thanks!

sanchitintel avatar Mar 27 '24 22:03 sanchitintel

undefined symbol from my environment ImportError: /opt/intel/oneapi/mkl/2024.0/lib/libmkl_sycl_lapack.so.4: undefined symbol: mkl_lapack_dsytrd_sb2st_block_rfg, while install from source with compile_bundle.sh Tried export LD_PRELOAD=$(bash ./intel-extension-for-pytorch/tools/get_libstdcpp_lib.sh), not work.

image

zhangcong2019 avatar Mar 30 '24 00:03 zhangcong2019

@zhangcong2019, remove /opt/intel/oneapi/ from your LD_LIBRARY_PATH

sanchitintel avatar Apr 01 '24 07:04 sanchitintel

@zhangcong2019, remove /opt/intel/oneapi/ from your LD_LIBRARY_PATH

Thanks a lot, will try

zhangcong2019 avatar Apr 01 '24 07:04 zhangcong2019

https://github.com/intel/intel-extension-for-pytorch/blob/main/dependency_version.yml has been updated, so compile_bundle.sh has now been fixed. Thanks!

sanchitintel avatar Apr 02 '24 22:04 sanchitintel

https://github.com/intel/intel-extension-for-pytorch/blob/main/dependency_version.yml has been updated, so compile_bundle.sh has now been fixed. Thanks!

Thanks a lot!

zhangcong2019 avatar Apr 03 '24 02:04 zhangcong2019