Skip to content
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
4 changes: 2 additions & 2 deletions unified-runtime/cmake/FetchLevelZero.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ find_package(PkgConfig QUIET)
# just try to search for the path.
if(NOT UR_FORCE_FETCH_LEVEL_ZERO)
if(PkgConfig_FOUND)
pkg_check_modules(level-zero level-zero>=1.29.0)
pkg_check_modules(level-zero level-zero>=1.32.0)
if(level-zero_FOUND)
set(LEVEL_ZERO_INCLUDE_DIR "${level-zero_INCLUDEDIR}/level_zero")
set(LEVEL_ZERO_LIBRARY_SRC "${level-zero_LIBDIR}")
Expand Down Expand Up @@ -54,7 +54,7 @@ if(NOT LEVEL_ZERO_LIB_NAME AND NOT LEVEL_ZERO_LIBRARY)
set(UR_LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git")
# Remember to update the pkg_check_modules minimum version above when updating the
# clone tag
set(UR_LEVEL_ZERO_LOADER_TAG v1.29.0)
set(UR_LEVEL_ZERO_LOADER_TAG v1.32.0)

# Disable due to a bug https://github.com/oneapi-src/level-zero/issues/104
set(CMAKE_INCLUDE_CURRENT_DIR OFF)
Expand Down
6 changes: 3 additions & 3 deletions unified-runtime/source/adapters/level_zero/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
//===----------------------------------------------------------------------===//

#include "common.hpp"
#include "external/driver_experimental/zex_graph.h"
#include "logger/ur_logger.hpp"
#include "usm.hpp"
#include <level_zero/ze_api.h>

ur_result_t ze2urResult(ze_result_t ZeResult) {
if (ZeResult == ZE_RESULT_SUCCESS)
Expand Down Expand Up @@ -363,8 +363,8 @@ getZeStructureType<ze_pitched_alloc_2dimage_linear_pitch_exp_info_t>() {
}
template <>
ze_structure_type_ext_t
getZexStructureType<ze_record_replay_graph_exp_properties_t>() {
return ZE_STRUCTURE_TYPE_RECORD_REPLAY_GRAPH_EXP_PROPERTIES;
getZexStructureType<ze_record_replay_graph_ext_properties_t>() {
return ZE_STRUCTURE_TYPE_RECORD_REPLAY_GRAPH_EXT_PROPERTIES;
}

// Global variables for ZER_EXT_RESULT_ADAPTER_SPECIFIC_ERROR
Expand Down
19 changes: 14 additions & 5 deletions unified-runtime/source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1589,17 +1589,26 @@ ur_result_t urDeviceGetInfo(
return ReturnValue(false);
}

ze_record_replay_graph_exp_properties_t GraphProperties{};
// The experimental variant of the extension reports its capabilities
// through a structure with a different type value; an older driver would
// not recognize the stable one and would leave graphFlags unset. The
// structure layout (stype, pNext, graphFlags) is identical between the two
// variants, so the stable type can be reused with the experimental value.
constexpr ze_structure_type_t ZeStructTypeRecordReplayGraphExpProperties =
static_cast<ze_structure_type_t>(0x00030029);
ze_record_replay_graph_ext_properties_t GraphProperties{};
GraphProperties.stype =
ZE_STRUCTURE_TYPE_RECORD_REPLAY_GRAPH_EXP_PROPERTIES;
Device->Platform->ZeGraphExt.UsesLegacyExperimentalApi
? ZeStructTypeRecordReplayGraphExpProperties
: ZE_STRUCTURE_TYPE_RECORD_REPLAY_GRAPH_EXT_PROPERTIES;
GraphProperties.pNext = nullptr;
ZeStruct<ze_device_properties_t> DeviceProperties;
DeviceProperties.pNext = &GraphProperties;
ZE2UR_CALL(zeDeviceGetProperties, (ZeDevice, &DeviceProperties));

constexpr ze_record_replay_graph_exp_flags_t GraphModeMask =
ZE_RECORD_REPLAY_GRAPH_EXP_FLAG_IMMUTABLE_GRAPH |
ZE_RECORD_REPLAY_GRAPH_EXP_FLAG_MUTABLE_GRAPH;
constexpr ze_record_replay_graph_ext_flags_t GraphModeMask =
ZE_RECORD_REPLAY_GRAPH_EXT_FLAG_IMMUTABLE_GRAPH |
ZE_RECORD_REPLAY_GRAPH_EXT_FLAG_MUTABLE_GRAPH;
return ReturnValue(static_cast<ur_bool_t>(
(GraphProperties.graphFlags & GraphModeMask) != 0));
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading