Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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.git")
set(UNIFIED_RUNTIME_REPO "https://github.com/aarongreig/unified-runtime.git")
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake)

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
Expand Down
8 changes: 1 addition & 7 deletions sycl/cmake/modules/UnifiedRuntimeTag.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# commit 3d58884b4939d9bd095c917f8dd823ac8486684c
# Merge: 6ade245e b0bd146a
# Author: aarongreig <[email protected]>
# Date: Thu Oct 31 14:05:55 2024 +0000
# Merge pull request #2228 from nrspruit/copy_engine_refactor
# [L0] Refactor Copy Engine Usage checks for Performance
set(UNIFIED_RUNTIME_TAG 3d58884b4939d9bd095c917f8dd823ac8486684c)
set(UNIFIED_RUNTIME_TAG aaron/addAssertDeviceInfoQuery)
11 changes: 5 additions & 6 deletions sycl/source/detail/device_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ device_impl::device_impl(ur_native_handle_t InteropDeviceHandle,
}
MPlatform = Platform;

MIsAssertFailSupported =
has_extension(UR_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT);
Adapter->call<UrApiKind::urDeviceGetInfo>(
MDevice, UR_DEVICE_INFO_USE_NATIVE_ASSERT, sizeof(ur_bool_t),
&MUseNativeAssert, nullptr);
}

device_impl::~device_impl() {
Expand Down Expand Up @@ -472,7 +473,7 @@ bool device_impl::has(aspect Aspect) const {
case aspect::ext_oneapi_srgb:
return get_info<info::device::ext_oneapi_srgb>();
case aspect::ext_oneapi_native_assert:
return isAssertFailSupported();
return useNativeAssert();
case aspect::ext_oneapi_cuda_async_barrier: {
int async_barrier_supported;
bool call_successful =
Expand Down Expand Up @@ -782,9 +783,7 @@ bool device_impl::has(aspect Aspect) const {
return false; // This device aspect has not been implemented yet.
}

bool device_impl::isAssertFailSupported() const {
return MIsAssertFailSupported;
}
bool device_impl::useNativeAssert() const { return MUseNativeAssert; }

std::string device_impl::getDeviceName() const {
std::call_once(MDeviceNameFlag,
Expand Down
9 changes: 7 additions & 2 deletions sycl/source/detail/device_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ class device_impl {
/// \return true if the SYCL device has the given feature.
bool has(aspect Aspect) const;

bool isAssertFailSupported() const;
/// Indicates the SYCL device prefers to use its native assert
/// implementation.
///
/// If this is false we will use the fallback assert implementation,
/// as detailed in doc/design/Assert.md
bool useNativeAssert() const;

bool isRootDevice() const { return MRootDevice == nullptr; }

Expand Down Expand Up @@ -302,7 +307,7 @@ class device_impl {
ur_device_type_t MType;
ur_device_handle_t MRootDevice = nullptr;
PlatformImplPtr MPlatform;
bool MIsAssertFailSupported = false;
bool MUseNativeAssert = false;
mutable std::string MDeviceName;
mutable std::once_flag MDeviceNameFlag;
mutable ext::oneapi::experimental::architecture MDeviceArch{};
Expand Down
Loading