Skip to content

Commit c3fc047

Browse files
committed
Make ALLOC_INFO_POOL an optional query.
1 parent f82095f commit c3fc047

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

include/ur_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3389,7 +3389,7 @@ typedef enum ur_usm_alloc_info_t {
33893389
UR_USM_ALLOC_INFO_BASE_PTR = 1, ///< [void *] Memory allocation base pointer info
33903390
UR_USM_ALLOC_INFO_SIZE = 2, ///< [size_t] Memory allocation size info
33913391
UR_USM_ALLOC_INFO_DEVICE = 3, ///< [::ur_device_handle_t] Memory allocation device info
3392-
UR_USM_ALLOC_INFO_POOL = 4, ///< [::ur_usm_pool_handle_t] Memory allocation pool info
3392+
UR_USM_ALLOC_INFO_POOL = 4, ///< [::ur_usm_pool_handle_t][optional-query] Memory allocation pool info
33933393
/// @cond
33943394
UR_USM_ALLOC_INFO_FORCE_UINT32 = 0x7fffffff
33953395
/// @endcond

scripts/core/usm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ etors:
7474
- name: DEVICE
7575
desc: "[$x_device_handle_t] Memory allocation device info"
7676
- name: POOL
77-
desc: "[$x_usm_pool_handle_t] Memory allocation pool info"
77+
desc: "[$x_usm_pool_handle_t][optional-query] Memory allocation pool info"
7878
--- #--------------------------------------------------------------------------
7979
type: enum
8080
desc: "USM memory advice"

source/adapters/opencl/usm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ urUSMGetMemAllocInfo(ur_context_handle_t hContext, const void *pMem,
669669
PropNameCL = CL_MEM_ALLOC_DEVICE_INTEL;
670670
break;
671671
default:
672-
return UR_RESULT_ERROR_INVALID_VALUE;
672+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
673673
}
674674

675675
size_t CheckPropSize = 0;

test/conformance/program/program_adapter_cuda.match

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ urProgramBuildTest.BuildFailure/*
33
{{OPT}}urProgramCreateWithILTest.SuccessWithProperties/*
44
{{OPT}}urProgramCreateWithILTest.BuildInvalidProgram/*
55
# This test flakily fails
6-
<<<<<<< HEAD
76
{{OPT}}urProgramGetBuildInfoSingleTest.LogIsNullTerminated/*
87
{{OPT}}urProgramSetSpecializationConstantsTest.Success/*
98
{{OPT}}urProgramSetSpecializationConstantsTest.UseDefaultValue/*
@@ -12,11 +11,3 @@ urProgramSetSpecializationConstantsTest.InvalidValueId/*
1211
urProgramSetSpecializationConstantsTest.InvalidValuePtr/*
1312
urProgramSetMultipleSpecializationConstantsTest.MultipleCalls/*
1413
urProgramSetMultipleSpecializationConstantsTest.SingleCall/*
15-
=======
16-
{{OPT}}urProgramGetBuildInfoSingleTest.LogIsNullTerminated/NVIDIA_CUDA_BACKEND___{{.*}}
17-
# CUDA doesn't expose kernel numbers or names
18-
{{OPT}}urProgramSetSpecializationConstantsTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}
19-
{{OPT}}urProgramSetSpecializationConstantsTest.UseDefaultValue/NVIDIA_CUDA_BACKEND___{{.*}}
20-
urProgramSetMultipleSpecializationConstantsTest.MultipleCalls/NVIDIA_CUDA_BACKEND___{{.*}}
21-
urProgramSetMultipleSpecializationConstantsTest.SingleCall/NVIDIA_CUDA_BACKEND___{{.*}}
22-
>>>>>>> aafd80ef (Fix most or possibly all match file issues.)

test/conformance/testing/include/uur/optional_queries.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ template <> inline bool isQueryOptional(ur_device_info_t query) {
4646
query) != optional_ur_device_info_t.end();
4747
}
4848

49+
constexpr std::array optional_ur_usm_alloc_info_t = {
50+
UR_USM_ALLOC_INFO_POOL,
51+
};
52+
53+
template <> inline bool isQueryOptional(ur_usm_alloc_info_t query) {
54+
return std::find(optional_ur_usm_alloc_info_t.begin(),
55+
optional_ur_usm_alloc_info_t.end(),
56+
query) != optional_ur_usm_alloc_info_t.end();
57+
}
58+
4959
constexpr std::array optional_ur_program_info_t = {
5060
UR_PROGRAM_INFO_NUM_KERNELS,
5161
UR_PROGRAM_INFO_KERNEL_NAMES,

test/conformance/usm/usm_adapter_opencl.match

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)