Skip to content

Commit

Permalink
Update unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiomestre committed Apr 18, 2024
1 parent 9c8545d commit df11a02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 49 deletions.
6 changes: 4 additions & 2 deletions sycl/include/sycl/ext/oneapi/experimental/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,16 @@ class __SYCL_EXPORT modifiable_command_graph {
/// @param RecordingQueue The queue to change state on and associate this
/// graph with.
/// @param PropList Property list used to pass properties for recording.
void begin_recording(queue &RecordingQueue, const property_list& PropList = {});
void begin_recording(queue &RecordingQueue,
const property_list &PropList = {});

/// Change the state of multiple queues to be recording and associate this
/// graph with each of them.
/// @param RecordingQueues The queues to change state on and associate this
/// graph with.
/// @param PropList Property list used to pass properties for recording.
void begin_recording(const std::vector<queue> &RecordingQueues, const property_list& PropList = {});
void begin_recording(const std::vector<queue> &RecordingQueues,
const property_list &PropList = {});

/// Set all queues currently recording to this graph to the executing state.
void end_recording();
Expand Down
10 changes: 5 additions & 5 deletions sycl/test/abi/sycl_symbols_linux.dump
Original file line number Diff line number Diff line change
Expand Up @@ -3078,8 +3078,8 @@ _ZN4sycl3_V13ext6oneapi12experimental6detail24executable_command_graphC2ERKSt10s
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph13end_recordingERKSt6vectorINS0_5queueESaIS7_EE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph13end_recordingERNS0_5queueE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph13end_recordingEv
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph15begin_recordingERKSt6vectorINS0_5queueESaIS7_EE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph15begin_recordingERNS0_5queueE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph15begin_recordingERKSt6vectorINS0_5queueESaIS7_EERKNS0_13property_listE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph15begin_recordingERNS0_5queueERKNS0_13property_listE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph24addGraphLeafDependenciesENS3_4nodeE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph7addImplERKSt6vectorINS3_4nodeESaIS7_EE
_ZN4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph7addImplESt8functionIFvRNS0_7handlerEEERKSt6vectorINS3_4nodeESaISC_EE
Expand Down Expand Up @@ -4093,14 +4093,14 @@ _ZNK4sycl3_V16device9getNativeEv
_ZNK4sycl3_V16kernel11get_backendEv
_ZNK4sycl3_V16kernel11get_contextEv
_ZNK4sycl3_V16kernel13getNativeImplEv
_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
_ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel10attributesEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv
_ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel13function_nameEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv
_ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel15reference_countEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv
_ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel7contextEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv
_ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel8num_argsEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv
_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
_ZNK4sycl3_V16kernel17get_kernel_bundleEv
_ZNK4sycl3_V16kernel19ext_oneapi_get_infoINS0_3ext6oneapi12experimental4info21kernel_queue_specific23max_num_work_group_syncEEENT_11return_typeERKNS0_5queueE
_ZNK4sycl3_V16kernel3getEv
Expand Down
42 changes: 0 additions & 42 deletions sycl/unittests/Extensions/CommandGraph/CommandGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,48 +155,6 @@ TEST_F(CommandGraphTest, BeginEndRecording) {
// Trying to end when it is recording to a different graph should throw
ASSERT_ANY_THROW(Graph2.end_recording(Queue));
Graph.end_recording(Queue);

// Testing return values of begin and end recording
// Queue should change state so should return true here
ASSERT_TRUE(Graph.begin_recording(Queue));
// But not changed state here
ASSERT_FALSE(Graph.begin_recording(Queue));

// Queue2 should change state so should return true here
ASSERT_TRUE(Graph.begin_recording(Queue2));
// But not changed state here
ASSERT_FALSE(Graph.begin_recording(Queue2));

// Queue should have changed state so should return true
ASSERT_TRUE(Graph.end_recording(Queue));
// But not changed state here
ASSERT_FALSE(Graph.end_recording(Queue));

// Should end recording on Queue2
ASSERT_TRUE(Graph.end_recording());
// State should not change on Queue2 now
ASSERT_FALSE(Graph.end_recording(Queue2));

// Testing vector begin and end
ASSERT_TRUE(Graph.begin_recording({Queue, Queue2}));
// Both shoudl now not have state changed
ASSERT_FALSE(Graph.begin_recording(Queue));
ASSERT_FALSE(Graph.begin_recording(Queue2));

// End recording on both
ASSERT_TRUE(Graph.end_recording({Queue, Queue2}));
// Both shoudl now not have state changed
ASSERT_FALSE(Graph.end_recording(Queue));
ASSERT_FALSE(Graph.end_recording(Queue2));

// First add one single queue
ASSERT_TRUE(Graph.begin_recording(Queue));
// Vector begin should still return true as Queue2 has state changed
ASSERT_TRUE(Graph.begin_recording({Queue, Queue2}));
// End recording on Queue2
ASSERT_TRUE(Graph.end_recording(Queue2));
// Vector end should still return true as Queue will have state changed
ASSERT_TRUE(Graph.end_recording({Queue, Queue2}));
}

TEST_F(CommandGraphTest, GetCGCopy) {
Expand Down

0 comments on commit df11a02

Please sign in to comment.