-
Notifications
You must be signed in to change notification settings - Fork 745
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
[SYCL] Changed sycl::backend::level0 to sycl::backend::level_zero #2025
Conversation
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
sycl/source/detail/config.hpp
Outdated
@@ -120,7 +120,7 @@ template <> class SYCLConfig<SYCL_BE> { | |||
const char *ValStr = BaseT::getRawValue(); | |||
const std::array<std::pair<std::string, backend>, 3> SyclBeMap = { | |||
{{"PI_OPENCL", backend::opencl}, | |||
{"PI_LEVEL0", backend::level0}, | |||
{"PI_LEVEL0", backend::level_zero}, |
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.
{"PI_LEVEL0", backend::level_zero}, | |
{"PI_LEVEL_ZERO", backend::level_zero}, |
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.
also docs which specify env variables need to be updated
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.
Done.
sycl/source/detail/pi.cpp
Outdated
@@ -215,7 +215,7 @@ bool findPlugins(vector_class<std::pair<std::string, backend>> &PluginNames) { | |||
// env only. | |||
// | |||
PluginNames.emplace_back(OPENCL_PLUGIN_NAME, backend::opencl); | |||
PluginNames.emplace_back(LEVEL0_PLUGIN_NAME, backend::level0); | |||
PluginNames.emplace_back(LEVEL0_PLUGIN_NAME, backend::level_zero); |
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.
LEVEL0_PLUGIN_NAME -> LEVEL_ZERO_PLUGIN_NAME
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.
Done.
@@ -766,7 +766,7 @@ ProgramManager::build(ProgramPtr Program, const ContextImplPtr Context, | |||
// is built during piProgramCreate. | |||
// TODO: remove this check as soon as piProgramCompile/piProgramLink will be | |||
// implemented in L0 plugin. |
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.
L0 -> Level-Zero, and please grep for other instances of "L0"
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.
Done.
There are other instances of "Level0" and "L0" that need to be renamed, e.g. here:
|
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 rename more
SYCL_BE PI_LEVEL0 is now PI_LEVEL_ZERO. PI_LEVEL0 is still accepted and handled correctly. cl::sycl::backend::level0 is now cl::sycl::backend::level_zero. Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
|
||
# This script file is used to allow exporting pi* symbols only. | ||
# All other symbols are regarded as local (hidden) | ||
set(linker_script "${CMAKE_CURRENT_SOURCE_DIR}/../ld-version-script.txt") | ||
|
||
# Filter symbols based on the scope defined in the script file, | ||
# and export pi* function symbols in the library. | ||
target_link_libraries( pi_level0 | ||
target_link_libraries( pi_level_zero | ||
PRIVATE "-Wl,--version-script=${linker_script}" | ||
) | ||
endif() | ||
|
||
if (TARGET l0-loader) |
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.
"l0"
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.
done.
|
||
target_link_libraries(pi_level0 PRIVATE "${L0_LOADER}") | ||
target_link_libraries(pi_level_zero PRIVATE "${L0_LOADER}") |
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.
"L0"
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.
done.
sycl/source/detail/config.hpp
Outdated
{"PI_CUDA", backend::cuda}}}; | ||
if (ValStr) { | ||
if (strcmp(ValStr, "PI_LEVEL0") == 0) { |
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.
Why did you want to support "PI_LEVEL0" name? Is this to accommodate current users/tests? Please add it to the array at line 123.
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.
yes, for backwards compatibility. done.
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
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.
LGTM
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@@ -3724,7 +3728,9 @@ _ZN2cl4sycl6detail13MemoryManager13releaseMemObjESt10shared_ptrINS1_12context_im | |||
_ZN2cl4sycl6detail13MemoryManager16allocateMemImageESt10shared_ptrINS1_12context_implEEPNS1_11SYCLMemObjIEPvbmRK14_pi_image_descRK16_pi_image_formatRKS3_INS1_10event_implEERKS5_RP9_pi_event | |||
_ZN2cl4sycl6detail13MemoryManager17allocateMemBufferESt10shared_ptrINS1_12context_implEEPNS1_11SYCLMemObjIEPvbmRKS3_INS1_10event_implEERKS5_RP9_pi_event | |||
_ZN2cl4sycl6detail13MemoryManager18allocateHostMemoryEPNS1_11SYCLMemObjIEPvbm | |||
_ZN2cl4sycl6detail13MemoryManager18releaseImageBufferESt10shared_ptrINS1_12context_implEEPv |
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 guess we should bump SYCL library version.
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.
Done.
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
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.
NOTE: SYCL version was incremented by other breaking changes already, so you need to update the version one more time.
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
c8479d3
@glyons-intel, it looks like there were other commits to the sycl branch, which conflict with this PR. Could you resolve conflicts, please? |
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons gail.lyons@intel.com