Skip to content

[SYCL][UR][L0] Fix issue with event caching causing profiling tag conflicts #16233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if(SYCL_UR_USE_FETCH_CONTENT)
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
endfunction()

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

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
Expand Down
14 changes: 7 additions & 7 deletions sycl/cmake/modules/UnifiedRuntimeTag.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# commit e37f75ffad5ad22e96c46eb70ab1757be7cc5afc
# Merge: daa0b110464c 323b37c55504
# Author: Martin Grant <martin.morrisongrant@codeplay.com>
# Date: Fri Dec 6 18:03:11 2024 +0000
# Merge pull request #2379 from Bensuo/ben/coverity-fixes
# Fix command_buffer coverity issues
set(UNIFIED_RUNTIME_TAG e37f75ffad5ad22e96c46eb70ab1757be7cc5afc)
# commit 5c10466f349b0ff303bd14b015f64bbcd0b78d7d
# Merge: ffcc53b6 b7b6b557
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
# Date: Mon Dec 9 14:58:34 2024 +0000
# Merge pull request #2410 from steffenlarsen/steffen/fix_profiling_tag_eviction_and_caching
# [L0] Fix cached and evicted timestamp recordings
set(UNIFIED_RUNTIME_TAG 5c10466f349b0ff303bd14b015f64bbcd0b78d7d)
33 changes: 33 additions & 0 deletions sycl/test-e2e/Regression/profiling_tag_cached_conflicting.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// REQUIRES: aspect-ext_oneapi_queue_profiling_tag
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// Regression test to ensure that the adapters do not tamper (e.g. through
// caching the events) the recordings.

// HIP backend currently returns invalid values for submission time queries.
// UNSUPPORTED: hip
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/12904

// CUDA backend seems to fail sporadically for expected profiling tag time
// query orderings.
// UNSUPPORTED: cuda
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/14053

#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/profiling_tag.hpp>

int main() {
sycl::queue Q{sycl::property::queue::in_order()};

uint64_t T1 = 0;
for (size_t I = 0; I < 20; ++I) {
sycl::event E = sycl::ext::oneapi::experimental::submit_profiling_tag(Q);
uint64_t T2 =
E.get_profiling_info<sycl::info::event_profiling::command_end>();
assert(T1 < T2);
std::swap(T1, T2);
}

return 0;
}
Loading