Skip to content

Commit 9cb4c60

Browse files
[SYCL][UR] Fix get_info<sycl::info::device::local_mem_type> query (#8657)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 44993e9 commit 9cb4c60

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,16 @@ inline pi_result ur2piInfoValue(ur_device_info_t ParamName,
228228
PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE},
229229
};
230230
return Value.convertArray(Map);
231+
} else if (ParamName == UR_DEVICE_INFO_LOCAL_MEM_TYPE) {
232+
static std::unordered_map<ur_device_local_mem_type_t,
233+
pi_device_local_mem_type>
234+
Map = {
235+
{UR_DEVICE_LOCAL_MEM_TYPE_LOCAL, PI_DEVICE_LOCAL_MEM_TYPE_LOCAL},
236+
{UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL, PI_DEVICE_LOCAL_MEM_TYPE_GLOBAL},
237+
};
238+
return Value.convert(Map);
239+
} else {
240+
// TODO: what else needs a UR-PI translation?
231241
}
232242

233243
if (ParamValueSizePI && ParamValueSizePI != *ParamValueSizeUR) {
@@ -545,8 +555,8 @@ inline pi_result piDevicePartition(
545555

546556
auto hDevice = reinterpret_cast<ur_device_handle_t>(Device);
547557
auto phSubDevices = reinterpret_cast<ur_device_handle_t *>(SubDevices);
548-
HANDLE_ERRORS(urDevicePartition(hDevice, UrProperties, NumEntries, phSubDevices,
549-
NumSubDevices));
558+
HANDLE_ERRORS(urDevicePartition(hDevice, UrProperties, NumEntries,
559+
phSubDevices, NumSubDevices));
550560
return PI_SUCCESS;
551561
}
552562
} // namespace pi2ur

0 commit comments

Comments
 (0)