-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL][UR] Add Windows debug libs to install target #17512
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
8a462bf
to
3c4e12e
Compare
613d83b
to
a448455
Compare
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.
@bratpiorka as mentioned in my last email, here's where to hook in the UMF debug postfix option and copy/install the library to the relevant places.
-DUMF_LINK_HWLOC_STATICALLY:BOOL=${UMF_LINK_HWLOC_STATICALLY} | ||
-DUMF_DISABLE_HWLOC:BOOL=${UMF_DISABLE_HWLOC} | ||
# TODO: Enable d suffix in UMF | ||
# -DUMF_USE_DEBUG_POSTFIX=ON |
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.
Enable building umfd.dll
/umfd.lib
in the UR subbuild.
urd_copy_library_to_build(ur_adapter_${adatper}d) | ||
endforeach() | ||
# TODO: Also copy umfd.dll/umfd.lib | ||
# urd_copy_library_to_build(umfd) |
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.
Copy umfd.dll
/umfd.lib
into the parent <build>/bin
/<build>/lib
directories for use in testing.
# TODO: Also install umfd.dll/umfd.lib | ||
# install( | ||
# FILES ${URD_INSTALL_DIR}/bin/umfd.dll | ||
# DESTINATION "bin" COMPONENT unified-memory-framework) | ||
# install( | ||
# FILES ${URD_INSTALL_DIR}/lib/umfd.lib | ||
# DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT unified-memory-framework) |
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.
Add umfd.dll
/umfd.lib
to the install target.
unified-runtime/cmake/helpers.cmake
Outdated
-P ${CMAKE_BINARY_DIR}/cmake_install.cmake | ||
# TODO: Also install debug UMF runtime libraries component | ||
DEPENDS unified-runtime-libraries | ||
# TODO: Add dependency on building debug UMF libraries |
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.
Add command to install only umfd.dll
/umfd.lib
, we don't want a full install here since we only care about the runtime libraries being installed with the debug postfix.
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, see changes in oneapi-src/unified-memory-framework#1238
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.
Thanks, I'll test this today.
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 is mostly working, I've commented on the PR with one issue.
a448455
to
468c07c
Compare
It needs to pull in the UMF changes which I've not tested yet due a few high priority bug reports that have come in this week. |
468c07c
to
c3e02d1
Compare
I tried bumping the
But got compile errors, @PatKamin / @lukaszstolarczuk is there a UMF pulldown in progress? |
We've made the final 0.11.0 release (from branch v0.11.x), and I try to pull it into sycl here: #18095 Can you please share what kind of errors you got? |
I'll test with this commit.
They are on Linux , I didn't try Windows:
|
No errors with this tag, must be something on UMF main causing them. |
Och, yeah, these new |
c3e02d1
to
a1ec5df
Compare
I've verified that the v0.11.0 tag is working as expected locally. I've not included the bug it in this PR, though so #18095 should also be merged once the internal drop is ready. |
As the testing shows, though, these chanages do require the UMF tag update. |
This patch adds the `install-unified-runtime-libraries` target which installs only the runtime library subset of targets. This can be used to provide `ur_loaderd.dll` and `ur_adatper_<name>d.dll` which link against the multithreaded debug DLL C runtime by using the `DEBUG_POSTFIX` target property to append `d` to the library names.
Instead of implicitly adding the `d` suffix to library names make this optional. `DEBUG_POSTFIX` appears to be broken on Windows, the place it's most useful, as `urinfo.exe` still attempts to load `ur_loader.dll` when it should be looking for `ur_loaderd.dll`. Switching this over to `OUTPUT_NAME ${name}d` fixes this.
Looks like combining `DEBUG_POSTFIX=d` and then setting `LIBRARY_OUTPUT_NAME`/`RUNTIME_OUTPUT_NAME` exposes a bug in CMake where the `DEBUG_POSTFIX` is ignored for the `ur_loader.dll`. Removing these redundant propert setters fixed the previous issue.
Using ExternalProject this commit adds a subbuild of UR in compiled in debug mode and with the `UR_USE_DEBUG_POSTFIX` option enabled. The resulting libraries are then copied to the `<build>/bin`/`<build>/lib` directories so they can be used in testing (not yet implemented). Additionally, they are also included in the `deploy-sycl-toolchain` install target alongside the normally named runtime libraries.
5ecdb6b
to
19f2d9c
Compare
install-unified-runtime-libraries
which installs only the runtime library subset of targets. This can be used to provideur_loaderd.dll
andur_adatper_<name>d.dll
which link against the multithreaded debug DLL C runtime by using theDEBUG_POSTFIX
target property to appendd
to the library names.UR_USE_DEBUG_POSTFIX
option to enable adding thed
suffix to library names.OUTPUT_NAME
s as combiningDEBUG_POSTFIX=d
and then settingLIBRARY_OUTPUT_NAME
/RUNTIME_OUTPUT_NAME
exposes a bug in CMake where theDEBUG_POSTFIX
is ignored for theur_loader.dll
. Removing these redundant property setters fixed the previous issue.ExternalProject
compiled in debug mode and with theUR_USE_DEBUG_POSTFIX
option enabled.<build>/bin
/<build>/lib
directories so they can be used in testing (not yet implemented).deploy-sycl-toolchain
install target alongside the normally named runtime libraries.ur_proxy_loaderd.dll
to use Windows debug libs