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

When I build the intel-extension-for-pytorch , I got the error that it cannot find xpu compiler path from OS PATH

Open sxunix opened this issue 2 years ago • 2 comments

Describe the issue

When I build the intel-extension-for-pytorch , I got the following error. How can I setup the OS Path for the xpu compliers? File "C:\Users\tao\Downloads\ipex_bundle\intel-extension-for-pytorch\setup.py", line 431, in get_xpu_compliers raise RuntimeError("Failed to find compiler path from OS PATH")

The details are as follows: Traceback (most recent call last): File "C:\Users\tao\Downloads\ipex_bundle\intel-extension-for-pytorch\setup.py", line 1104, in setup( File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_init_.py", line 87, in setup return distutils.core.setup(**attrs) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\core.py", line 185, in setup return run_commands(dist) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands dist.run_commands() File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\dist.py", line 968, in run_commands self.run_command(cmd) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 1217, in run_command super().run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\dist.py", line 987, in run_command cmd_obj.run() File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\wheel\bdist_wheel.py", line 369, in run self.run_command("build") File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\cmd.py", line 319, in run_command self.distribution.run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 1217, in run_command super().run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\dist.py", line 987, in run_command cmd_obj.run() File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\command\build.py", line 132, in run self.run_command(cmd_name) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\cmd.py", line 319, in run_command self.distribution.run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 1217, in run_command super().run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\dist.py", line 987, in run_command cmd_obj.run() File "C:\Users\tao\Downloads\ipex_bundle\intel-extension-for-pytorch\setup.py", line 1073, in run self.run_command("build_clib") File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\cmd.py", line 319, in run_command self.distribution.run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 1217, in run_command super().run_command(command) File "C:\Users\tao\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_distutils\dist.py", line 987, in run_command cmd_obj.run() File "C:\Users\tao\Downloads\ipex_bundle\intel-extension-for-pytorch\setup.py", line 687, in run gpu_cc, gpu_cxx = get_xpu_compliers() File "C:\Users\tao\Downloads\ipex_bundle\intel-extension-for-pytorch\setup.py", line 431, in get_xpu_compliers raise RuntimeError("Failed to find compiler path from OS PATH") RuntimeError: Failed to find compiler path from OS PATH

sxunix avatar Nov 12 '23 02:11 sxunix

@min-jean-cho

jingxu10 avatar Nov 15 '23 11:11 jingxu10

Hi, it looks like the path to the DPC++ Compiler is not being properly set (or icx/icpx are missing)

Please double check that the icx and icpx compilers are installed. they should be located under <path to DPC++ Compiler>\latest\bin\ and make sure that your script is calling vars.bat for the DPC++ Compiler

If you aren't already, I recommend using the compile_bundle script

kminhta avatar Dec 14 '23 18:12 kminhta