This repository was archived by the owner on Mar 28, 2023. It is now read-only.
forked from llvm/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 130
[SYCL] Add support for sycl::ext::oneapi::property::queue::use_priority #1414
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ad412fc
[SYCL] Add support for sycl::ext::oneapi::property::queue::use_priority
smaslov-intel ad0be9f
clang-format
smaslov-intel 47ef95c
rely on ZE_DEBUG=-1 output
smaslov-intel 489a65d
add regexp
smaslov-intel e775a7e
priority_low and priority_high
smaslov-intel a1d647d
add priority_normal
smaslov-intel 4170556
Update SYCL/Plugin/level_zero_queue_priority.cpp
smaslov-intel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,39 @@ | ||
| // REQUIRES: gpu, level_zero, level_zero_dev_kit | ||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out | ||
| // RUN: env ZE_DEBUG=-1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER | ||
| // | ||
| // Check that queue priority is passed to Level Zero runtime | ||
| // This is the last value in the ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC | ||
| // | ||
| #include <sycl/sycl.hpp> | ||
|
|
||
| void test(sycl::property_list Props) { | ||
| sycl::queue Q(Props); | ||
| (void)Q.submit([&](sycl::handler &CGH) { | ||
| CGH.single_task<class EmptyKernel>([=]() {}); | ||
| }); | ||
| Q.wait(); | ||
| } | ||
|
|
||
| int main(int Argc, const char *Argv[]) { | ||
|
|
||
| // CHECK: [getZeQueue]: create queue {{.*}} priority = Normal | ||
| test(sycl::property_list{}); | ||
|
|
||
| // CHECK: [getZeQueue]: create queue {{.*}} priority = Low | ||
| test({sycl::ext::oneapi::property::queue::priority_low{}}); | ||
|
|
||
| // CHECK: [getZeQueue]: create queue {{.*}} priority = High | ||
| test({sycl::ext::oneapi::property::queue::priority_high{}}); | ||
|
|
||
| // CHECK: Queue cannot be constructed with both of priority_low and priority_high. | ||
| try { | ||
| test({sycl::ext::oneapi::property::queue::priority_low{}, | ||
| sycl::ext::oneapi::property::queue::priority_high{}}); | ||
| } catch (sycl::exception &E) { | ||
| std::cerr << E.what() << std::endl; | ||
| } | ||
|
|
||
| std::cout << "The test passed." << std::endl; | ||
| return 0; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.