-
Notifications
You must be signed in to change notification settings - Fork 744
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] Fix failing ABI tests when LLVM_LIBDIR_SUFFIX is set #1605
Conversation
I've removed XFAIL from all CUDA USM tests, since the tests pass on my machine. |
I see all CUDA USM tests passing on
|
sycl/test/devicelib/assert.cpp
Outdated
@@ -1,6 +1,5 @@ | |||
// REQUIRES: cpu,linux | |||
// RUN: %clangxx -fsycl -c %s -o %t.o | |||
// RUN: %clangxx -fsycl %t.o %sycl_libs_dir/libsycl-glibc.o -o %t.out | |||
// RUN: %clangxx -fsycl %s -lsycl -o %t.out |
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.
Link devicelib tests with libsycl instead of individual intermediate object files.
%sycl_libs_dir/libsycl-glibc.o
is not an intermediate object file, see https://github.com/intel/llvm/blob/sycl/libdevice/cmake/modules/SYCLLibdevice.cmake#L33
These object files provide definitions for library functions used in device code. libsycl.so
does not contain these definitions.
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.
Is that only for libsycl-glibc.o
or also for the others ?
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.
That applies for all other object files used in sycl/test/devicelib directory:
- libsycl-msvc.o
- libsycl-glibc.o
- libsycl-complex.o
- libsycl-complex-fp64.o
- libsycl-cmath.o
- libsycl-cmath-fp64.o
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.
by the way, how do I build them ?
make sycl-toolchain
does not do it, at least using my (possibly outdated) build recipe.
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.
@fwyzard python scripts should do the trick: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain
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'd better move libdevice
tests into libdevice
project directory. Then, the libdevice
tests that require libsycl
may be enabled only if libsycl
is actually being built. There may still be pure libdevice
tests that do not require libsycl
, although, I do not think there are any right now.
@asavonic, @fwyzard, if it sounds reasonable to you, I can make this change.
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.
Either way should be fine: keeping the libdevice
tests under sycl, and enabling them only if libdevice
is built, or moving them to the libdevice
directory, and enabling those that depend on SYCL only if it s being built.
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 still don't understand why I could get the tests to pass when libdevice
was not built...
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'd better move
libdevice
tests intolibdevice
project directory. Then, thelibdevice
tests that requirelibsycl
may be enabled only iflibsycl
is actually being built. There may still be purelibdevice
tests that do not requirelibsycl
, although, I do not think there are any right now.@asavonic, @fwyzard, if it sounds reasonable to you, I can make this change.
I think it is easier to propagate a flag from CMake to LIT and disable these tests if the feature is missing.
If we move them to the toplevel directory, we probably need to copy some bits from sycl/lit.cfg.py as well (all those CPU_RUN_PLACEHOLDER hacks). Not sure how to make them run for check-sycl as well.
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.
OK, it is probably not worth it.
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.
Approved to start buildbot
Make ABI tests look for libsycl in the correct directory. Signed-off-by: Andrea Bocci <[email protected]>
OK, I figured out why the CUDA USM tests were not failing for me (asserts were disabled), and will have a fix for those in a separate PR. So this PR not is just about fixing the ABI tests when LLVM_LIBDIR_SUFFIX is set. |
…_docs * origin/sycl: (6482 commits) [SYCL][NFC] Clean formatting in Markdown documents (intel#1635) [SYCL][Doc] Remove obsolete parens from README (intel#1637) [SYCL] Fix failing ABI tests when LLVM_LIBDIR_SUFFIX is set (intel#1605) [SYCL] Fix warnings in libdevice (intel#1630) [SYCL][CUDA] Triage and clean LIT (intel#1620) [SYCL][NFC] Fix GCC 8 compilation warnings (intel#1631) [SYCL] Minor fixes in LowerWGScope [SYCL] PI: correct default interoperability plugin selection [SYCL] Add faster reduction implementations using atomic or/and intel::reduce() (intel#1615) [SYCL] Add sycl-ls utility for listing devices discovered/selected by SYCL RT (intel#1575) [SYCL] Fix getDeviceFromHandler declarations (intel#1626) [SPIR-V] Correct/improve declaration of SPIR-V builtins (intel#1519) [SYCL][USM] Improve USM allocator test and fix improper behavior. (intel#1538) [SYCL] Fix failing ABI LITs (intel#1622) [SYCL] Add support for MSVC internal math functions in device library (intel#1441) [SYCL] Add runtime library versioning (intel#1604) [SYCL] Check weak symbols in ABI dumps (intel#1609) [NFC][SYCL] Improve kernel metadata test (intel#1610) Revert "[SYCL] XFAIL LIT test due to duplicate diagnostic" (intel#1460) [SYCL] Move the reduction command group funcs out of handler.hpp (intel#1602) ...
Make ABI tests look for libsycl in the correct directory.