-
Notifications
You must be signed in to change notification settings - Fork 30
Level-zero on Windows (WIP) #386
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
Conversation
@1e-to check CI please. |
@@ -4,6 +4,9 @@ if errorlevel 1 ( | |||
exit /b 1 | |||
) | |||
|
|||
git clone -b v1.2.3 https://github.com/oneapi-src/level-zero.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make comment that tag version is not very important. Headers are backward compatible.
if(UNIX) | ||
find_path(LEVEL_ZERO_INCLUDE_DIR NAMES level_zero/zet_api.h HINTS $ENV{L0_INCLUDE_DIR}) | ||
elif(WIN32) | ||
find_path(LEVEL_ZERO_INCLUDE_DIR NAMES zet_api.h HINTS $ENV{L0_INCLUDE_DIR}) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not necessary if L0_INCLUDE_DIR
has correct value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is that, because in source level-zero/include/zet_api.h, not level_zero/zet_api.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that build process copies level-zero/include/zet_api.h
into include/level_zero/zet_api.h
.
@@ -26,7 +26,11 @@ | |||
# TODO: Add a way to record the version of the level_zero library | |||
|
|||
find_library(LEVEL_ZERO_LIBRARY ze_loader HINTS $ENV{L0_LIB_DIR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also set L0_LIB_DIR in bld.bat? Is it needed from level-zero repo, or what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We access ze_loader
library dynamically. I do not know why we search for it. @diptorupd Do you have something to comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was that FindLevelZero.cmake should not really care whether we use the library dynamically. Maybe someone is already doing a more comprehensive cmake module for Level zero than I want to write. I will look if there is one.
I tried to test it on TestProgramForLevel0GPU.create_program_from_spirv ERROR: test_create_program_from_spirv (__main__.TestProgramForLevel0GPU)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_sycl_program.py", line 104, in test_create_program_from_spirv
prog = dpctl_prog.create_program_from_spirv(q, spirv)
File "dpctl\program\_program.pyx", line 161, in dpctl.program._program.create_program_from_spirv
File "dpctl\program\_program.pyx", line 191, in dpctl.program._program.create_program_from_spirv
dpctl.program._program.SyclProgramCompilationError |
@1e-to @PokhodenkoSA I added level zero program creation support for Windows in #319. I took a slightly different approach by using a cmake module to git checkout the level zero headers and removed the FindLevelZero.cmake. I am closing this PR now. |
Closes #340