-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL] Add property validation for kernel_bundle free functions and graph extension #15647
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
Merged
steffenlarsen
merged 43 commits into
intel:sycl
from
KseniyaTikhomirova:propertycheck_ext
Jan 8, 2025
Merged
Changes from 40 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
91f0ce6
Add def based check for queue
KseniyaTikhomirova ae0b1d4
add test for queue
KseniyaTikhomirova 6e673ac
fix code-review comments
KseniyaTikhomirova 34d65d9
fix format
KseniyaTikhomirova 05b7398
add check to buffer & image
KseniyaTikhomirova 10bd181
fix format
KseniyaTikhomirova 87a1691
fix build & format
KseniyaTikhomirova f3b6e39
add check to context
KseniyaTikhomirova db53824
add test for context
KseniyaTikhomirova c5a4eff
fix build
KseniyaTikhomirova d88c3f2
add check to sampler
KseniyaTikhomirova d83f367
add test for sampler
KseniyaTikhomirova 8edf0c1
add check to stream
KseniyaTikhomirova a9c8c39
add test for stream
KseniyaTikhomirova 0587a71
update tests
KseniyaTikhomirova f02ca36
add check to reduction
KseniyaTikhomirova 72fc90d
add test for reduction
KseniyaTikhomirova 4e5f586
add check to usm_allocator
KseniyaTikhomirova 2d99591
add test for usm_allocator
KseniyaTikhomirova 0973de0
update linux symbols
KseniyaTikhomirova e76b4ae
fix stream test
KseniyaTikhomirova 4f25430
fix format
KseniyaTikhomirova 80acde2
add check to accessor
KseniyaTikhomirova 05cf71d
add test for sampled/unsampled_image
KseniyaTikhomirova 24120ff
Merge branch 'sycl' into defbased_property
KseniyaTikhomirova f16372f
fix tests
KseniyaTikhomirova 6fa9b2b
add a few accessor tests
KseniyaTikhomirova 95ea264
Merge branch 'sycl' into defbased_property
KseniyaTikhomirova a80b944
add check for kernel bundle free methods
KseniyaTikhomirova 75cefe0
move graph properties to files
KseniyaTikhomirova f9c7862
enable check for graph
KseniyaTikhomirova 2d563ff
update linux symbols
KseniyaTikhomirova 483e645
add graph property validation
KseniyaTikhomirova f009c27
add unittests
KseniyaTikhomirova 460470a
update win symbols
KseniyaTikhomirova c270827
Merge branch 'sycl' into propertycheck_ext
KseniyaTikhomirova bd99f58
fix potential warnings
KseniyaTikhomirova 8612578
fix forward declaration issues
KseniyaTikhomirova b0ec3be
Merge branch 'sycl' into propertycheck_ext
KseniyaTikhomirova 808287a
fix code-review comments
KseniyaTikhomirova 7ceb2b8
fix comments
KseniyaTikhomirova 9e874d3
update win symbols
KseniyaTikhomirova 4c9eb8a
Merge branch 'sycl' into propertycheck_ext
KseniyaTikhomirova 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
26 changes: 26 additions & 0 deletions
26
sycl/include/sycl/ext/oneapi/experimental/detail/properties/graph_properties.def
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,26 @@ | ||
| // --*- c++ -*--- | ||
| #ifndef __SYCL_DATA_LESS_PROP | ||
| #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) | ||
| #endif | ||
| #ifndef __SYCL_MANUALLY_DEFINED_PROP | ||
| #define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) | ||
| #endif | ||
|
|
||
| /// Property passed to command_graph constructor to disable checking for cycles. | ||
| __SYCL_DATA_LESS_PROP(property::graph, no_cycle_check, GraphNoCycleCheck) | ||
|
|
||
| /// Property passed to command_graph constructor to allow buffers to be used | ||
| /// with graphs. Passing this property represents a promise from the user that | ||
| /// the buffer will outlive any graph that it is used in. | ||
| __SYCL_DATA_LESS_PROP(property::graph, assume_buffer_outlives_graph, GraphAssumeBufferOutlivesGraph) | ||
|
|
||
| /// Property passed to command_graph<graph_state::modifiable>::finalize() to | ||
| /// mark the resulting executable command_graph as able to be updated. | ||
| __SYCL_DATA_LESS_PROP(property::graph, updatable, GraphUpdatable) | ||
|
|
||
| /// Property used to enable executable graph profiling. Enables profiling on | ||
| /// events returned by submissions of the executable graph | ||
| __SYCL_DATA_LESS_PROP(property::graph, enable_profiling, GraphEnableProfiling) | ||
|
|
||
| #undef __SYCL_DATA_LESS_PROP | ||
| #undef __SYCL_MANUALLY_DEFINED_PROP |
67 changes: 67 additions & 0 deletions
67
sycl/include/sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp
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,67 @@ | ||
| //==----------- queue_properties.hpp --- SYCL queue properties -------------==// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <sycl/detail/property_helper.hpp> // for DataLessPropKind | ||
| #include <sycl/properties/property_traits.hpp> // for is_property_of | ||
|
|
||
| #include <type_traits> // for true_type | ||
|
|
||
| namespace sycl { | ||
| inline namespace _V1 { | ||
| namespace ext { | ||
| namespace oneapi { | ||
| namespace experimental { | ||
| #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \ | ||
| namespace NS_QUALIFIER { \ | ||
| class PROP_NAME \ | ||
| : public sycl::detail::DataLessProperty<sycl::detail::ENUM_VAL> {}; \ | ||
| } | ||
| #include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.def> | ||
|
|
||
| #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \ | ||
| namespace NS_QUALIFIER { \ | ||
| class PROP_NAME \ | ||
| : public sycl::detail::DataLessProperty<sycl::detail::ENUM_VAL> {}; \ | ||
| } | ||
| #include <sycl/ext/oneapi/experimental/detail/properties/node_properties.def> | ||
|
|
||
| class node; | ||
| namespace property::node { | ||
| class depends_on; | ||
| } // namespace property::node | ||
| // Graph property trait specializations. | ||
| enum class graph_state; | ||
| template <graph_state State> class command_graph; | ||
|
|
||
| } // namespace experimental | ||
| } // namespace oneapi | ||
| } // namespace ext | ||
|
|
||
| #define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) \ | ||
| template <ext::oneapi::experimental::graph_state State> \ | ||
| struct is_property_of<ext::oneapi::experimental::NS_QUALIFIER::PROP_NAME, \ | ||
| ext::oneapi::experimental::command_graph<State>> \ | ||
| : std::true_type {}; | ||
| #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \ | ||
| __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) | ||
|
|
||
| #include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.def> | ||
|
|
||
| #define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) \ | ||
| template <> \ | ||
| struct is_property_of<ext::oneapi::experimental::NS_QUALIFIER::PROP_NAME, \ | ||
| ext::oneapi::experimental::node> : std::true_type {}; | ||
| #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \ | ||
| __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) | ||
|
|
||
| #include <sycl/ext/oneapi/experimental/detail/properties/node_properties.def> | ||
|
|
||
| } // namespace _V1 | ||
| } // namespace sycl | ||
17 changes: 17 additions & 0 deletions
17
sycl/include/sycl/ext/oneapi/experimental/detail/properties/node_properties.def
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,17 @@ | ||
| // --*- c++ -*--- | ||
| #ifndef __SYCL_DATA_LESS_PROP | ||
| #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) | ||
| #endif | ||
| #ifndef __SYCL_MANUALLY_DEFINED_PROP | ||
| #define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) | ||
| #endif | ||
|
|
||
| /// Property used to to add all previous graph leaves as dependencies when | ||
| /// creating a new node with command_graph::add(). | ||
| __SYCL_DATA_LESS_PROP(property::node, depends_on_all_leaves, GraphDependOnAllLeaves) | ||
|
|
||
| // Contains data field, defined explicitly. | ||
| __SYCL_MANUALLY_DEFINED_PROP(property::node, depends_on) | ||
|
|
||
| #undef __SYCL_DATA_LESS_PROP | ||
| #undef __SYCL_MANUALLY_DEFINED_PROP |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.