-
Notifications
You must be signed in to change notification settings - Fork 795
[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
kbenzie
left a 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.
@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.
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.
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.
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
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
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
1. Add install target for Windows debug libs called `install-unified-runtime-libraries` 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. 2. Add `UR_USE_DEBUG_POSTFIX` option to enable adding the `d` suffix to library names. 3. Remove setting redundant `OUTPUT_NAME`s as 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 property setters fixed the previous issue. 4. Add debug UR subbuild on Windows `ExternalProject` 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. 5. Update `ur_proxy_loaderd.dll` to use Windows debug libs
install-unified-runtime-librarieswhich installs only the runtime library subset of targets. This can be used to provideur_loaderd.dllandur_adatper_<name>d.dllwhich link against the multithreaded debug DLL C runtime by using theDEBUG_POSTFIXtarget property to appenddto the library names.UR_USE_DEBUG_POSTFIXoption to enable adding thedsuffix to library names.OUTPUT_NAMEs as combiningDEBUG_POSTFIX=dand then settingLIBRARY_OUTPUT_NAME/RUNTIME_OUTPUT_NAMEexposes a bug in CMake where theDEBUG_POSTFIXis ignored for theur_loader.dll. Removing these redundant property setters fixed the previous issue.ExternalProjectcompiled in debug mode and with theUR_USE_DEBUG_POSTFIXoption enabled.<build>/bin/<build>/libdirectories so they can be used in testing (not yet implemented).deploy-sycl-toolchaininstall target alongside the normally named runtime libraries.ur_proxy_loaderd.dllto use Windows debug libs