Skip to content

Commit

Permalink
Merge pull request #1617 from oneapi-src/v0.9.3rc
Browse files Browse the repository at this point in the history
Candidate for the v0.9.3 release tag
  • Loading branch information
kbenzie authored May 16, 2024
2 parents 308eba4 + 616ae4f commit 3b57cff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
project(unified-runtime VERSION 0.9.2)
project(unified-runtime VERSION 0.9.3)

include(GNUInstallDirs)
include(CheckCXXSourceCompiles)
Expand Down
23 changes: 17 additions & 6 deletions source/adapters/level_zero/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,15 +582,26 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelGetGroupInfo(

ZeStruct<ze_kernel_properties_t> kernelProperties;
kernelProperties.pNext = &workGroupProperties;

auto ZeResult = ZE_CALL_NOCHECK(
zeKernelGetProperties,
(Kernel->ZeKernelMap[Device->ZeDevice], &kernelProperties));
if (ZeResult || workGroupProperties.maxGroupSize == 0) {
// Set the Kernel to use as the ZeKernel initally for native handle support.
// This makes the assumption that this device is the same device where this
// kernel was created.
auto ZeKernelDevice = Kernel->ZeKernel;
auto It = Kernel->ZeKernelMap.find(Device->ZeDevice);
if (It != Kernel->ZeKernelMap.end()) {
ZeKernelDevice = Kernel->ZeKernelMap[Device->ZeDevice];
}
if (ZeKernelDevice) {
auto ZeResult = ZE_CALL_NOCHECK(zeKernelGetProperties,
(ZeKernelDevice, &kernelProperties));
if (ZeResult || workGroupProperties.maxGroupSize == 0) {
return ReturnValue(
uint64_t{Device->ZeDeviceComputeProperties->maxTotalGroupSize});
}
return ReturnValue(workGroupProperties.maxGroupSize);
} else {
return ReturnValue(
uint64_t{Device->ZeDeviceComputeProperties->maxTotalGroupSize});
}
return ReturnValue(workGroupProperties.maxGroupSize);
}
case UR_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE: {
struct {
Expand Down

0 comments on commit 3b57cff

Please sign in to comment.