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

[SYCL] Changed sycl::backend::level0 to sycl::backend::level_zero #2025

Merged
merged 19 commits into from
Jul 30, 2020

Conversation

glyons-intel
Copy link
Contributor

Signed-off-by: Gail Lyons gail.lyons@intel.com

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@glyons-intel glyons-intel requested review from kbobrovs, smaslov-intel and a team as code owners July 1, 2020 14:58
@@ -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},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{"PI_LEVEL0", backend::level_zero},
{"PI_LEVEL_ZERO", backend::level_zero},

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -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);
Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@smaslov-intel
Copy link
Contributor

There are other instances of "Level0" and "L0" that need to be renamed, e.g. here:

CL/sycl/detail/pi.hpp:#define LEVEL0_PLUGIN_NAME "pi_level0.dll"
CL/sycl/detail/pi.hpp:#define LEVEL0_PLUGIN_NAME "libpi_level0.so"

Copy link
Contributor

@smaslov-intel smaslov-intel left a 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>
@glyons-intel glyons-intel requested a review from pvchupin as a code owner July 14, 2020 12:44

# 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"l0"

Copy link
Contributor Author

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}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"L0"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

{"PI_CUDA", backend::cuda}}};
if (ValStr) {
if (strcmp(ValStr, "PI_LEVEL0") == 0) {
Copy link
Contributor

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.

Copy link
Contributor Author

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>
smaslov-intel
smaslov-intel previously approved these changes Jul 16, 2020
Copy link
Contributor

@smaslov-intel smaslov-intel left a 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>
smaslov-intel
smaslov-intel previously approved these changes Jul 16, 2020
smaslov-intel
smaslov-intel previously approved these changes Jul 20, 2020
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
Copy link
Contributor

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.

Copy link
Contributor Author

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>
smaslov-intel
smaslov-intel previously approved these changes Jul 23, 2020
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
smaslov-intel
smaslov-intel previously approved these changes Jul 27, 2020
Copy link
Contributor

@bader bader left a 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.

sycl/source/detail/config.hpp Outdated Show resolved Hide resolved
sycl/test/basic_tests/image_accessor_readsampler.cpp Outdated Show resolved Hide resolved
sycl/test/spec_const/spec_const_hw.cpp Outdated Show resolved Hide resolved
sycl/test/spec_const/spec_const_redefine.cpp Outdated Show resolved Hide resolved
kbobrovs
kbobrovs previously approved these changes Jul 28, 2020
pvchupin
pvchupin previously approved these changes Jul 28, 2020
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@glyons-intel glyons-intel dismissed stale reviews from pvchupin, kbobrovs, and smaslov-intel via c8479d3 July 28, 2020 15:49
@bader bader self-assigned this Jul 28, 2020
smaslov-intel
smaslov-intel previously approved these changes Jul 28, 2020
@bader
Copy link
Contributor

bader commented Jul 29, 2020

@glyons-intel, it looks like there were other commits to the sycl branch, which conflict with this PR. Could you resolve conflicts, please?

bader
bader previously approved these changes Jul 29, 2020
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@bader bader merged commit 215f591 into intel:sycl Jul 30, 2020
@glyons-intel glyons-intel deleted the glyons-name branch October 28, 2020 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants