Skip to content

Commit 1c9c2d0

Browse files
authored
Merge branch 'main' into cuda-cubemap-driver-fix
2 parents daf330f + 01af560 commit 1c9c2d0

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

source/adapters/hip/device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
549549
// native asserts are in progress
550550
std::string SupportedExtensions = "";
551551
SupportedExtensions += "pi_ext_intel_devicelib_assert ";
552+
SupportedExtensions += "ur_exp_usm_p2p ";
552553

553554
int RuntimeVersion = 0;
554555
UR_CHECK_ERROR(hipRuntimeGetVersion(&RuntimeVersion));

source/adapters/level_zero/device.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
247247
SupportedExtensions += ("ur_exp_command_buffer ");
248248
// Return supported for the UR multi-device compile experimental feature
249249
SupportedExtensions += ("ur_exp_multi_device_compile ");
250+
SupportedExtensions += ("ur_exp_usm_p2p ");
250251

251252
return ReturnValue(SupportedExtensions.c_str());
252253
}
@@ -803,7 +804,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
803804
return ReturnValue(uint32_t{Device->ZeDeviceProperties->numThreadsPerEU});
804805
case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH:
805806
// currently not supported in level zero runtime
806-
return UR_RESULT_ERROR_INVALID_VALUE;
807+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
807808
case UR_DEVICE_INFO_BFLOAT16: {
808809
// bfloat16 math functions are not yet supported on Intel GPUs.
809810
return ReturnValue(ur_bool_t{false});
@@ -996,7 +997,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
996997
logger::error("Unsupported ParamName in urGetDeviceInfo");
997998
logger::error("ParamNameParamName={}(0x{})", ParamName,
998999
logger::toHex(ParamName));
999-
return UR_RESULT_ERROR_INVALID_VALUE;
1000+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
10001001
}
10011002

10021003
return UR_RESULT_SUCCESS;

source/adapters/level_zero/kernel.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueKernelLaunch(
130130
*OutEvent ///< [in,out][optional] return an event object that identifies
131131
///< this particular kernel execution instance.
132132
) {
133-
auto Queue = this;
133+
UR_ASSERT(WorkDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
134+
UR_ASSERT(WorkDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
134135

136+
auto Queue = this;
135137
ze_kernel_handle_t ZeKernel{};
136138
UR_CALL(getZeKernel(Queue, Kernel, &ZeKernel));
137139

@@ -337,6 +339,9 @@ ur_result_t ur_queue_handle_legacy_t_::enqueueCooperativeKernelLaunchExp(
337339
*OutEvent ///< [in,out][optional] return an event object that identifies
338340
///< this particular kernel execution instance.
339341
) {
342+
UR_ASSERT(WorkDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
343+
UR_ASSERT(WorkDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
344+
340345
auto Queue = this;
341346
auto ZeDevice = Queue->Device->ZeDevice;
342347

source/adapters/level_zero/usm_p2p.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PEnablePeerAccessExp(
1717
std::ignore = commandDevice;
1818
std::ignore = peerDevice;
1919

20-
logger::error(logger::LegacyMessage("[UR][L0] {} function not implemented!"),
21-
"{} function not implemented!", __FUNCTION__);
22-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
20+
// L0 has peer devices enabled by default
21+
return UR_RESULT_SUCCESS;
2322
}
2423

2524
UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PDisablePeerAccessExp(
@@ -28,9 +27,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PDisablePeerAccessExp(
2827
std::ignore = commandDevice;
2928
std::ignore = peerDevice;
3029

31-
logger::error(logger::LegacyMessage("[UR][L0] {} function not implemented!"),
32-
"{} function not implemented!", __FUNCTION__);
33-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
30+
// L0 has peer devices enabled by default
31+
return UR_RESULT_SUCCESS;
3432
}
3533

3634
UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp(
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
urDeviceCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle
22
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
33
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GLOBAL_MEM_FREE
4-
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH
5-
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ASYNC_BARRIER
6-
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED
7-
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP

0 commit comments

Comments
 (0)