Skip to content

Commit bccf836

Browse files
committed
[SYCL][UR][L0] Fix issue with event caching causing profiling tag conflicts
This commit adds a test and changes to a UR version that fixes an issue where the L0 would report old timestamp recordings for events produced for profiling tags, due to reusing of dead events. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent b8395de commit bccf836

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if(SYCL_UR_USE_FETCH_CONTENT)
116116
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
117117
endfunction()
118118

119-
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime")
119+
set(UNIFIED_RUNTIME_REPO "https://github.com/steffenlarsen/unified-runtime")
120120
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake)
121121

122122
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
# commit eb076da108a49ef1426f38690547a71905f58015
2-
# Merge: d8d8ee90 46832dfd
3-
# Author: Callum Fare <[email protected]>
4-
# Date: Fri Nov 29 15:54:31 2024 +0000
5-
# Merge pull request #2396 from kswiecicki/init-results-fix
6-
# [L0] Add nullopt check before init results access
7-
set(UNIFIED_RUNTIME_TAG eb076da108a49ef1426f38690547a71905f58015)
1+
set(UNIFIED_RUNTIME_TAG b7b6b55769c2f4e8ffb077a9f945e371232148f2)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// REQUIRES: aspect-ext_oneapi_queue_profiling_tag
2+
// RUN: %{build} -o %t.out
3+
// RUN: %{run} %t.out
4+
5+
// Regression test to ensure that the adapters do not tamper (e.g. through
6+
// caching the events) the recordings.
7+
8+
// HIP backend currently returns invalid values for submission time queries.
9+
// UNSUPPORTED: hip
10+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/12904
11+
12+
// CUDA backend seems to fail sporadically for expected profiling tag time
13+
// query orderings.
14+
// UNSUPPORTED: cuda
15+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/14053
16+
17+
#include <sycl/sycl.hpp>
18+
19+
int main() {
20+
sycl::queue Q{sycl::property::queue::in_order()};
21+
22+
uint64_t T1 = 0;
23+
for (size_t I = 0; I < 20; ++I) {
24+
sycl::event E = sycl::ext::oneapi::experimental::submit_profiling_tag(Q);
25+
uint64_t T2 =
26+
E.get_profiling_info<sycl::info::event_profiling::command_end>();
27+
assert(T1 < T2);
28+
std::swap(T1, T2);
29+
}
30+
31+
return 0;
32+
}

0 commit comments

Comments
 (0)