Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] level_zero/ze_api.h not found when running UT. #3064

Open
Stonepia opened this issue Dec 24, 2024 · 2 comments
Open

[Windows] level_zero/ze_api.h not found when running UT. #3064

Stonepia opened this issue Dec 24, 2024 · 2 comments
Labels
bug Something isn't working windows

Comments

@Stonepia
Copy link
Contributor

Describe the bug

When running the UT on Windows, I got the following error. The Triton needs the level_zero to build, but it can't find it.

Note that in Linux, the level_zero headers come with the driver, but on Windows, we don't have this default behavior. May I ask what should I do?

E   subprocess.CalledProcessError: Command '['C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\bin\\icpx.EXE', 'C:\\Users\\sdp\\AppData\\Local\\Temp\\tmpr3g8gym8\\main.cpp', '-O3', '-shared', '-Wno-psabi', '-lze_loader', '-L/usr/local\\lib', '-LC:\\Users\\sdp\\miniforge3\\envs\\tongsu_stock_pt\\Lib\\site-packages\\triton\\backends\\intel\\lib', '-LC:\\Users\\sdp\\miniforge3\\envs\\tongsu_stock_pt\\Lib\\..\\libs', '-I/usr/local\\include', '-IC:\\Program Files (x86)\\Intel\\oneAPI\\compiler/latest/include', '-IC:\\Program Files (x86)\\Intel\\oneAPI\\compiler/latest/include/sycl', '-IC:\\Users\\sdp\\miniforge3\\envs\\tongsu_stock_pt\\Lib\\site-packages\\triton\\backends\\intel\\include', '-IC:\\Users\\sdp\\AppData\\Local\\Temp\\tmpr3g8gym8', '-IC:\\Users\\sdp\\miniforge3\\envs\\tongsu_stock_pt\\Include', '-INone', '-IC:\\Users\\sdp\\miniforge3\\envs\\tongsu_stock_pt\\lib\\site-packages\\numpy\\core\\include', '-o', 'C:\\Users\\sdp\\AppData\\Local\\Temp\\tmpr3g8gym8\\spirv_utils.cp310-win_amd64.pyd', '-fsycl']' returned non-zero exit status 1.
--------------------------------------------------------------- Captured stderr --------------------------------------------------------------- 
In file included from C:\Users\sdp\AppData\Local\Temp\tmpr3g8gym8\main.cpp:17:
C:\Users\sdp\miniforge3\envs\ts_stock_pt\Lib\site-packages\triton\backends\intel\include\sycl_functions.h:15:10: fatal error: 'level_zero/ze_api.h' file not found
   15 | #include <level_zero/ze_api.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

Environment details

@Stonepia Stonepia added bug Something isn't working windows labels Dec 24, 2024
@pbchekin
Copy link
Contributor

Correct, download the latest release for Windows from https://github.com/oneapi-src/level-zero/releases and extract it, for example, to c:\level_zero. Then set environment variable ZE_PATH=c:\level_zero.

Workflow example: https://github.com/intel/intel-xpu-backend-for-triton/blob/win-test/.github/workflows/build-test-windows.yml#L19.
Example run (without tutorials and instrumentation tests): https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/12383767088/job/34567109930.

@Stonepia
Copy link
Contributor Author

Thanks for the reply!
Manually downloading the level-zero works great.
May I ask if this is a temporary solution or the next release, we will have level-zero shipped with the driver (which is the same as the behavior of Linux)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

2 participants