-
Notifications
You must be signed in to change notification settings - Fork 770
[SYCL][CUDA] Fixes for multiple backends in the same program #1252
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
Yes, it works:
Thank you for the fixes ! |
3595834
to
8a642f2
Compare
An additional commit has been added: This ensures that CUDA operations are allowed in device-event callbacks, which could be needed if e.g. an event ends its life in the callback, by introducing a worker-thread that sleeps until callbacks are added to its work-queue. Edit: This commit has been dropped. |
8a642f2
to
f6904a8
Compare
968e7e9
to
5baf374
Compare
Could you please share more details?
You mean you can call cuEventDestroy in the callback? Are there other use cases than "an event ends its life in the callback"? |
Since CUDA events are explicitly destroyed, we must retain the event when we enqueue callbacks, so yes we need this for Likewise I believe for one of the current uses of the callbacks the registered callback also destroys the |
@Ruyk, @steffenlarsen, could you resolve merge conflicts, please? |
5baf374
to
458754f
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.
LGTM. Two last comments.
458754f
to
146b163
Compare
@steffenlarsen, @Ruyk, could you take a look at failed checks, please? |
The unittests are currently selecting the first plugin, which seems to be the OpenCL plugin. Is this failing on a machine with no available OpenCL devices? This should definitely be fixed, but we need a way of selecting the plugins correctly. |
Isn't that what the |
The unittests tests the PI API and therefore doesn't use the SYCL device selector. The initial way adjusting the tests to the plugin system was to select the first plugin in the collection returned by |
146b163
to
63c0b40
Compare
The EventTest unittest has been disabled. I notice that most unittests are currently disabled, so I opened a new issue (#1362) to investigate this. |
It seems to be failing with MSVC. From what I gather there is a problem with printing the parameters of |
Could you try to ifdef the check at line 150 i.e. sycl\unittests\pi\EventTest.cpp(150)? |
Or it has problems with printing lambda object. |
63c0b40
to
585902a
Compare
That's an interesting point. I've tried to move the callback to a separate function. I can't test it, so let's see what the bot says. |
Signed-off-by: Stuart Adams <stuart.adams@codeplay.com> Signed-off-by: Steffen Larsen <steffen.larsen@codeplay.com> Signed-off-by: Ruyman Reyes <ruyman.reyes@codeplay.com>
The SYCL RT code for GlueEvent calls now the right plugin to create the event that triggers the dependency chain. Renamed variables to clarify the source code and avoid confusions between Context and Plugin Signed-off-by: Ruyman Reyes <ruyman@codeplay.com>
585902a
to
cd9b90e
Compare
…hinx * upstream/sycl: (357 commits) [Support] Implement a simple tabular data management library (intel#1358) [Support] Implement a property set I/O library (intel#1357) [SYCL] Fix buffer constructor using iterators (intel#1386) [SYCL][FPGA] Enable a set of loop attributes (intel#1312) [Driver][SYCL][FPGA] Proper dependency output location when given /Fo<dir> (intel#1346) [SPIR-V] Enabling SPIR-V builtin lookup in device SYCL mode (intel#1384) [SYCL][NFC] Unify setting kernel arguments (intel#1379) [SYCL][Doc] First revision of standard layout relaxation extension (intel#1344) [SYCL] Fixed sub-buffer alloca search (intel#1385) [SYCL][FPGA] Emit multiple IR variants for the IVDep attribute (intel#1383) [SYCL] Add experimental flag to enable front-end optimizations (intel#1376) [SYCL] Remove unexpected double in complex SPIR-V for float support (intel#1381) [SYCL] Default work-group sizes based on max (intel#952) [SYCL][CUDA] Fix usage of multiple backends in the same program (intel#1252) [SPIR-V] Add SPIR-V builtin definitions to the builtin lookup. [SPIR-V] Add macro definition when -fdeclare-spirv-builtins is activated [SYCL] Fix sycl_generic printing [SYCL] Support intel::reqd_work_group_size (intel#1328) [SYCL][NFC] Make the RT::PiPlugin object private (intel#1375) [SPIRV] Add convergent attribute to SPIR-V built-ins (intel#1373) ...
Dear all,
when I executed the program i have following output:
The clinfo detects following platforms on my machine.
Could you plase advice on that? How can I enable both backends? Thanks. Here is the compilation log:
|
Could you please open an issue? https://github.com/intel/llvm/issues |
Thanks, I created: #2372 |
This pull request contains two commits:
This two patches should fix #1231, but should not be merged until we run some additional testing on our side.