-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Fix enqueue functions taking both kernel and properties (#14743)
The current implementation of the enqueue free functions taking both a launch_config and a kernel do not properly process the properties. This commit addresses this and adds a static assert about the properties passed to these only applying to the launch of the kernel and not how the compiler handles compiling the kernel. --------- Signed-off-by: Larsen, Steffen <[email protected]> Co-authored-by: Sergey Semenov <[email protected]>
- Loading branch information
1 parent
6ac800b
commit 33325d4
Showing
10 changed files
with
289 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
sycl/test/extensions/properties/kernel_properties_negative.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// RUN: %clangxx -ferror-limit=0 %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s | ||
|
||
// Negative tests for kernel properties. | ||
|
||
#include <sycl/sycl.hpp> | ||
|
||
namespace oneapi = sycl::ext::oneapi::experimental; | ||
|
||
extern sycl::kernel TestKernel; | ||
|
||
int main() { | ||
sycl::queue Q{}; | ||
|
||
oneapi::properties props1{oneapi::sub_group_size<8>}; | ||
oneapi::properties props2{ | ||
oneapi::sub_group_size<8>, | ||
oneapi::work_group_progress<oneapi::forward_progress_guarantee::parallel, | ||
oneapi::execution_scope::root_group>}; | ||
|
||
// expected-error-re@sycl/ext/oneapi/experimental/enqueue_functions.hpp:* {{static assertion failed due to requirement {{.*}} launch_config does not allow properties with compile-time kernel effects.}} | ||
oneapi::launch_config<sycl::range<1>, decltype(props1)> LC1{{1}, props1}; | ||
|
||
// expected-error-re@sycl/ext/oneapi/experimental/enqueue_functions.hpp:* {{static assertion failed due to requirement {{.*}} launch_config does not allow properties with compile-time kernel effects.}} | ||
oneapi::launch_config<sycl::range<1>, decltype(props2)> LC22{{1}, props2}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.