Skip to content

Commit 16cedbe

Browse files
Moved graph_state to common.hpp
1 parent 88ec242 commit 16cedbe

File tree

13 files changed

+45
-17
lines changed

13 files changed

+45
-17
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ namespace property::node {
3838
class depends_on;
3939
} // namespace property::node
4040

41-
/// State to template the command_graph class on.
42-
enum class graph_state {
43-
modifiable, ///< In modifiable state, commands can be added to graph.
44-
executable, ///< In executable state, the graph is ready to execute.
45-
};
46-
41+
enum class graph_state;
4742
template <graph_state State> class command_graph;
4843

4944
namespace detail {

sycl/include/sycl/ext/oneapi/experimental/graph.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#pragma once
1010

1111
#include "graph/command_graph.hpp"
12+
#include "graph/common.hpp"
1213
#include "graph/dynamic.hpp"
1314
#include "graph/executable_graph.hpp"
1415
#include "graph/modifiable_graph.hpp"

sycl/include/sycl/ext/oneapi/experimental/graph/command_graph.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#pragma once
1010

11+
#include "common.hpp" // for graph_state
1112
#include "executable_graph.hpp"
1213
#include "modifiable_graph.hpp"
13-
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for graph_state
1414

1515
#include <functional> // for function
1616
#include <memory> // for shared_ptr
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//==----------- graph_common.hpp --- SYCL graph properties -----------------==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#pragma once
10+
11+
namespace sycl {
12+
inline namespace _V1 {
13+
namespace ext {
14+
namespace oneapi {
15+
namespace experimental {
16+
17+
/// State to template the command_graph class on.
18+
enum class graph_state {
19+
modifiable, ///< In modifiable state, commands can be added to graph.
20+
executable, ///< In executable state, the graph is ready to execute.
21+
};
22+
23+
} // namespace experimental
24+
} // namespace oneapi
25+
} // namespace ext
26+
} // namespace _V1
27+
} // namespace sycl

sycl/include/sycl/ext/oneapi/experimental/graph/dynamic.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#pragma once
1010

1111
#include "command_graph.hpp"
12+
#include "common.hpp" // for graph_state
1213
#include <sycl/accessor.hpp> // for local_accessor
1314
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
1415
#include <sycl/detail/kernel_desc.hpp> // for kernel_param_kind_t
15-
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for graph_state
1616
#include <sycl/ext/oneapi/experimental/work_group_memory.hpp> // for work_group_memory
1717
#include <sycl/ext/oneapi/properties/properties.hpp> // for empty_properties_t
1818

sycl/include/sycl/ext/oneapi/experimental/graph/executable_graph.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#pragma once
1010

11-
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
12-
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
13-
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for graph_state
11+
#include "common.hpp" // for graph_state
12+
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
13+
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
1414
#include <sycl/ext/oneapi/experimental/graph/node.hpp> // for node class
1515
#include <sycl/property_list.hpp> // for property_list
1616

sycl/include/sycl/ext/oneapi/experimental/graph/modifiable_graph.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
#pragma once
1010

11-
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
12-
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
13-
#include <sycl/detail/string_view.hpp> // for string_view
14-
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for graph_state
11+
#include "common.hpp" // for graph_state
12+
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
13+
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
14+
#include <sycl/detail/string_view.hpp> // for string_view
1515
#include <sycl/ext/oneapi/experimental/graph/node.hpp> // for node class
1616
#include <sycl/property_list.hpp> // for property_list
1717

sycl/include/sycl/ext/oneapi/experimental/graph/node.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#pragma once
1010

11+
#include "common.hpp" // for graph_state
1112
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
1213
#include <sycl/detail/impl_utils.hpp> // for getSyclObjImpl, createSyclObjFromImpl...
1314
#include <sycl/detail/property_helper.hpp> // for PropertyWith...

sycl/source/detail/graph/dynamic_impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <sycl/detail/kernel_desc.hpp> // for kernel_param_kind_t
1717
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for checkGraphPropertiesAndThrow
1818
#include <sycl/ext/oneapi/experimental/graph/command_graph.hpp> // for command_graph
19+
#include <sycl/ext/oneapi/experimental/graph/common.hpp> // for graph_state
1920
#include <sycl/ext/oneapi/experimental/graph/dynamic.hpp> // for dynamic parameters
2021

2122
namespace sycl {

sycl/source/detail/graph/dynamic_impl.hpp

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

1111
#include <detail/accessor_impl.hpp> // for LocalAccessorImplHost
1212
#include <sycl/detail/cg_types.hpp> // for CGType
13-
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for graph_state
13+
#include <sycl/ext/oneapi/experimental/graph/common.hpp> // for graph_state
1414
#include <sycl/ext/oneapi/experimental/raw_kernel_arg.hpp> // for raw_kernel_arg
1515

1616
#include <cstring> // for memcpy

sycl/source/detail/graph/graph_impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <sycl/detail/string_view.hpp> // for string_view
2626
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for checking graph properties
2727
#include <sycl/ext/oneapi/experimental/graph/command_graph.hpp> // for command_graph
28+
#include <sycl/ext/oneapi/experimental/graph/common.hpp> // for graph_state
2829
#include <sycl/ext/oneapi/experimental/graph/executable_graph.hpp> // for executable_command_graph
2930
#include <sycl/ext/oneapi/experimental/graph/modifiable_graph.hpp> // for modifiable_command_graph
3031
#include <sycl/feature_test.hpp> // for testing

sycl/source/detail/graph/graph_impl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ namespace ext {
4040
namespace oneapi {
4141
namespace experimental {
4242
// Forward declarations
43+
enum class graph_state;
4344
template <graph_state State> class command_graph;
4445

4546
namespace detail {

sycl/test/include_deps/sycl_detail_core.hpp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@
115115
// CHECK-NEXT: ext/oneapi/experimental/event_mode_property.hpp
116116
// CHECK-NEXT: ext/oneapi/experimental/graph.hpp
117117
// CHECK-NEXT: ext/oneapi/experimental/graph/command_graph.hpp
118+
// CHECK-NEXT: ext/oneapi/experimental/graph/common.hpp
118119
// CHECK-NEXT: ext/oneapi/experimental/graph/executable_graph.hpp
120+
// CHECK-NEXT: ext/oneapi/experimental/graph/node.hpp
119121
// CHECK-NEXT: ext/oneapi/experimental/detail/properties/graph_properties.hpp
120122
// CHECK-NEXT: ext/oneapi/experimental/detail/properties/graph_properties.def
121123
// CHECK-NEXT: ext/oneapi/experimental/detail/properties/node_properties.def
122-
// CHECK-NEXT: ext/oneapi/experimental/graph/node.hpp
123124
// CHECK-NEXT: ext/oneapi/experimental/graph/modifiable_graph.hpp
124125
// CHECK-NEXT: ext/oneapi/experimental/graph/dynamic.hpp
125126
// CHECK-NEXT: ext/oneapi/experimental/work_group_memory.hpp

0 commit comments

Comments
 (0)