Skip to content

Commit 8a41b47

Browse files
[SYCL][UR][L0] Fix issue with event caching causing profiling tag conflicts (#16233)
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]> Co-authored-by: Kenneth Benzie (Benie) <[email protected]>
1 parent c16775d commit 8a41b47

File tree

3 files changed

+41
-8
lines changed

3 files changed

+41
-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/oneapi-src/unified-runtime.git")
120120
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake)
121121

122122
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# commit e37f75ffad5ad22e96c46eb70ab1757be7cc5afc
2-
# Merge: daa0b110464c 323b37c55504
3-
# Author: Martin Grant <martin.morrisongrant@codeplay.com>
4-
# Date: Fri Dec 6 18:03:11 2024 +0000
5-
# Merge pull request #2379 from Bensuo/ben/coverity-fixes
6-
# Fix command_buffer coverity issues
7-
set(UNIFIED_RUNTIME_TAG e37f75ffad5ad22e96c46eb70ab1757be7cc5afc)
1+
# commit 5c10466f349b0ff303bd14b015f64bbcd0b78d7d
2+
# Merge: ffcc53b6 b7b6b557
3+
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
4+
# Date: Mon Dec 9 14:58:34 2024 +0000
5+
# Merge pull request #2410 from steffenlarsen/steffen/fix_profiling_tag_eviction_and_caching
6+
# [L0] Fix cached and evicted timestamp recordings
7+
set(UNIFIED_RUNTIME_TAG 5c10466f349b0ff303bd14b015f64bbcd0b78d7d)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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/detail/core.hpp>
18+
#include <sycl/ext/oneapi/experimental/profiling_tag.hpp>
19+
20+
int main() {
21+
sycl::queue Q{sycl::property::queue::in_order()};
22+
23+
uint64_t T1 = 0;
24+
for (size_t I = 0; I < 20; ++I) {
25+
sycl::event E = sycl::ext::oneapi::experimental::submit_profiling_tag(Q);
26+
uint64_t T2 =
27+
E.get_profiling_info<sycl::info::event_profiling::command_end>();
28+
assert(T1 < T2);
29+
std::swap(T1, T2);
30+
}
31+
32+
return 0;
33+
}

0 commit comments

Comments
 (0)