Skip to content

Commit adf3592

Browse files
[SYCL] [Graph] Refactor graph headers (#19045)
Creates new file structure of Graph code. In the public headers it'll now be: ``` ├── graph │   ├── command_graph.hpp │   ├── executable_graph.hpp │   ├── dynamic.hpp │   ├── node.hpp │   └── modifiable_graph.hpp ├── graph.hpp ``` where `graph.hpp` just contains the includes of the remaining headers in `graph/`. Inside the impl section, `source/detail` it'll be: ``` ├── graph │   ├── dynamic_impl.cpp │   ├── dynamic_impl.hpp │   ├── graph_impl.cpp │   ├── graph_impl.hpp │   ├── memory_pool.cpp │   ├── memory_pool.hpp │   ├── node_impl.cpp │   └── node_impl.hpp ``` The includes in all files have been updated such that forward declarations are favoured wherever possible.
1 parent d727792 commit adf3592

28 files changed

+2662
-2300
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ libdevice/nativecpu* @intel/dpcpp-nativecpu-reviewers
163163

164164
# SYCL-Graphs extensions
165165
sycl/include/sycl/ext/oneapi/experimental/graph.hpp @intel/sycl-graphs-reviewers
166-
sycl/source/detail/graph_impl.cpp @intel/sycl-graphs-reviewers
167-
sycl/source/detail/graph_impl.hpp @intel/sycl-graphs-reviewers
168-
sycl/source/detail/graph_memory_pool.hpp @intel/sycl-graphs-reviewers
169-
sycl/source/detail/graph_memory_pool.cpp @intel/sycl-graphs-reviewers
166+
sycl/include/sycl/ext/oneapi/experimental/graph @intel/sycl-graphs-reviewers
167+
sycl/source/detail/graph @intel/sycl-graphs-reviewers
170168
sycl/unittests/Extensions/CommandGraph/ @intel/sycl-graphs-reviewers
171169
sycl/test-e2e/Graph @intel/sycl-graphs-reviewers
172170
sycl/doc/design/CommandGraph.md @intel/sycl-graphs-reviewers

sycl/include/sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <sycl/detail/property_helper.hpp> // for DataLessPropKind
1212
#include <sycl/properties/property_traits.hpp> // for is_property_of
13+
#include <sycl/property_list.hpp> // for property_list
1314

1415
#include <type_traits> // for true_type
1516

@@ -36,10 +37,30 @@ class node;
3637
namespace property::node {
3738
class depends_on;
3839
} // namespace property::node
39-
// Graph property trait specializations.
40+
4041
enum class graph_state;
4142
template <graph_state State> class command_graph;
4243

44+
namespace detail {
45+
inline void checkGraphPropertiesAndThrow(const property_list &Properties) {
46+
auto CheckDataLessProperties = [](int PropertyKind) {
47+
#define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \
48+
case NS_QUALIFIER::PROP_NAME::getKind(): \
49+
return true;
50+
#define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME)
51+
switch (PropertyKind) {
52+
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.def>
53+
54+
default:
55+
return false;
56+
}
57+
};
58+
// No properties with data for graph now.
59+
auto NoAllowedPropertiesCheck = [](int) { return false; };
60+
sycl::detail::PropertyValidator::checkPropsAndThrow(
61+
Properties, CheckDataLessProperties, NoAllowedPropertiesCheck);
62+
}
63+
} // namespace detail
4364
} // namespace experimental
4465
} // namespace oneapi
4566
} // namespace ext

0 commit comments

Comments
 (0)