diff --git a/sycl/include/sycl/info/device_traits.def b/sycl/include/sycl/info/device_traits.def index 40dfec9efbe96..da16716639239 100644 --- a/sycl/include/sycl/info/device_traits.def +++ b/sycl/include/sycl/info/device_traits.def @@ -32,6 +32,8 @@ __SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_int, uint32_t, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT) __SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_long, uint32_t, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG) +__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_long_long, uint32_t, + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG) __SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_float, uint32_t, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT) __SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_double, uint32_t, @@ -46,6 +48,8 @@ __SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_int, uint32_t, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT) __SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_long, uint32_t, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG) +__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_long_long, uint32_t, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG) __SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_float, uint32_t, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT) __SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_double, uint32_t, diff --git a/sycl/source/detail/ur_device_info_ret_types.inc b/sycl/source/detail/ur_device_info_ret_types.inc index b3a00b6d422c1..cf736c41d800b 100644 --- a/sycl/source/detail/ur_device_info_ret_types.inc +++ b/sycl/source/detail/ur_device_info_ret_types.inc @@ -39,6 +39,7 @@ MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR, uint32_t) MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT, uint32_t) MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT, uint32_t) MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, uint32_t) +MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG, uint32_t) MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT, uint32_t) MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE, uint32_t) MAP(UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF, uint32_t) @@ -46,6 +47,7 @@ MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, uint32_t) MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, uint32_t) MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, uint32_t) MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, uint32_t) +MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG, uint32_t) MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, uint32_t) MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, uint32_t) MAP(UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF, uint32_t) diff --git a/sycl/test-e2e/Basic/info.cpp b/sycl/test-e2e/Basic/info.cpp index 8cfea54d6dda0..dd849b749ccfe 100644 --- a/sycl/test-e2e/Basic/info.cpp +++ b/sycl/test-e2e/Basic/info.cpp @@ -233,6 +233,8 @@ int main() { dev, "Preferred vector width int"); print_info( dev, "Preferred vector width long"); + print_info( + dev, "Preferred vector width long long"); print_info( dev, "Preferred vector width float"); print_info( @@ -247,6 +249,8 @@ int main() { dev, "Native vector width int"); print_info( dev, "Native vector width long"); + print_info( + dev, "Native vector width long long"); print_info( dev, "Native vector width float"); print_info( diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index 0e80426ea02c2..e880fdd80e33a 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3882,6 +3882,7 @@ _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_cuda_cluster_gr _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_max_work_groups_1dEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_max_work_groups_2dEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_max_work_groups_3dEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv +_ZNK4sycl3_V16device13get_info_implINS0_4info6device29native_vector_width_long_longEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device29preferred_vector_width_doubleEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device30partition_type_affinity_domainEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device31atomic_fence_order_capabilitiesEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv @@ -3889,6 +3890,7 @@ _ZNK4sycl3_V16device13get_info_implINS0_4info6device31atomic_fence_scope_capabil _ZNK4sycl3_V16device13get_info_implINS0_4info6device31ext_intel_gpu_hw_threads_per_euEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device32atomic_memory_order_capabilitiesEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device32atomic_memory_scope_capabilitiesEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv +_ZNK4sycl3_V16device13get_info_implINS0_4info6device32preferred_vector_width_long_longEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device33ext_intel_gpu_subslices_per_sliceEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device33ext_oneapi_max_global_work_groupsEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device33usm_restricted_shared_allocationsEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index b966cfc4f25ab..e6758a7742c2a 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -165,6 +165,7 @@ ??$get_info_impl@Unative_vector_width_half@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Unative_vector_width_int@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Unative_vector_width_long@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ +??$get_info_impl@Unative_vector_width_long_long@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Unative_vector_width_short@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Unode_mask@device@info@intel@ext@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Unum_args@kernel@info@_V1@sycl@@@kernel@_V1@sycl@@AEBAIXZ @@ -185,6 +186,7 @@ ??$get_info_impl@Upreferred_vector_width_half@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Upreferred_vector_width_int@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Upreferred_vector_width_long@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ +??$get_info_impl@Upreferred_vector_width_long_long@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Upreferred_vector_width_short@device@info@_V1@sycl@@@device@_V1@sycl@@AEBAIXZ ??$get_info_impl@Uprintf_buffer_size@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_KXZ ??$get_info_impl@Uprofile@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA?AVstring@detail@12@XZ diff --git a/unified-runtime/include/unified-runtime/ur_api.h b/unified-runtime/include/unified-runtime/ur_api.h index 93f1d812b0bff..c71043740dd8b 100644 --- a/unified-runtime/include/unified-runtime/ur_api.h +++ b/unified-runtime/include/unified-runtime/ur_api.h @@ -2374,6 +2374,10 @@ typedef enum ur_device_info_t { UR_DEVICE_INFO_LUID = 129, /// [uint32_t][optional-query] return device Windows node mask UR_DEVICE_INFO_NODE_MASK = 130, + /// [uint32_t] preferred vector width for long long + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG = 131, + /// [uint32_t] native vector width for long long + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG = 132, /// [::ur_bool_t] Returns true if the device supports the use of /// command-buffers. UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000, diff --git a/unified-runtime/include/unified-runtime/ur_print.hpp b/unified-runtime/include/unified-runtime/ur_print.hpp index 448fff9eef09b..a094c2f835869 100644 --- a/unified-runtime/include/unified-runtime/ur_print.hpp +++ b/unified-runtime/include/unified-runtime/ur_print.hpp @@ -3172,6 +3172,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { case UR_DEVICE_INFO_NODE_MASK: os << "UR_DEVICE_INFO_NODE_MASK"; break; + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: + os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG"; + break; + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: + os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG"; + break; case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP: os << "UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP"; break; @@ -4986,6 +4992,32 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, os << ")"; } break; + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: { + const uint32_t *tptr = (const uint32_t *)ptr; + if (sizeof(uint32_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) + << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << *tptr; + + os << ")"; + } break; + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: { + const uint32_t *tptr = (const uint32_t *)ptr; + if (sizeof(uint32_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) + << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << *tptr; + + os << ")"; + } break; case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP: { const ur_bool_t *tptr = (const ur_bool_t *)ptr; if (sizeof(ur_bool_t) > size) { diff --git a/unified-runtime/scripts/core/device.yml b/unified-runtime/scripts/core/device.yml index 4f98155eca8ab..d927e129a2d63 100644 --- a/unified-runtime/scripts/core/device.yml +++ b/unified-runtime/scripts/core/device.yml @@ -470,6 +470,10 @@ etors: desc: "[uint8_t[]][optional-query] return device Windows LUID" - name: NODE_MASK desc: "[uint32_t][optional-query] return device Windows node mask" + - name: PREFERRED_VECTOR_WIDTH_LONG_LONG + desc: "[uint32_t] preferred vector width for long long" + - name: NATIVE_VECTOR_WIDTH_LONG_LONG + desc: "[uint32_t] native vector width for long long" --- #-------------------------------------------------------------------------- type: function desc: "Retrieves various information about device" diff --git a/unified-runtime/source/adapters/cuda/device.cpp b/unified-runtime/source/adapters/cuda/device.cpp index 903b66f8cd8d0..832b0a33e1e39 100644 --- a/unified-runtime/source/adapters/cuda/device.cpp +++ b/unified-runtime/source/adapters/cuda/device.cpp @@ -129,7 +129,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: { return ReturnValue(1u); } - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: { + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: { return ReturnValue(1u); } case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: { @@ -150,7 +151,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: { return ReturnValue(1u); } - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: { + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: { return ReturnValue(1u); } case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: { diff --git a/unified-runtime/source/adapters/hip/device.cpp b/unified-runtime/source/adapters/hip/device.cpp index 9ba3c79ffd8b0..e9b43f770c7fb 100644 --- a/unified-runtime/source/adapters/hip/device.cpp +++ b/unified-runtime/source/adapters/hip/device.cpp @@ -137,7 +137,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: { return ReturnValue(1u); } - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: { + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: { return ReturnValue(1u); } case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: { @@ -158,7 +159,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: { return ReturnValue(1u); } - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: { + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: { return ReturnValue(1u); } case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: { diff --git a/unified-runtime/source/adapters/level_zero/device.cpp b/unified-runtime/source/adapters/level_zero/device.cpp index ec9a2f8c5a874..ed3e9a8e88b9d 100644 --- a/unified-runtime/source/adapters/level_zero/device.cpp +++ b/unified-runtime/source/adapters/level_zero/device.cpp @@ -783,9 +783,11 @@ ur_result_t urDeviceGetInfo( return ReturnValue( Device->ZeDeviceVectorWidthPropertiesExt->preferred_vector_width_int); case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: return ReturnValue( Device->ZeDeviceVectorWidthPropertiesExt->native_vector_width_long); case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: return ReturnValue( Device->ZeDeviceVectorWidthPropertiesExt->preferred_vector_width_long); case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: diff --git a/unified-runtime/source/adapters/native_cpu/device.cpp b/unified-runtime/source/adapters/native_cpu/device.cpp index 02b381f3b688e..b39b33e376ce1 100644 --- a/unified-runtime/source/adapters/native_cpu/device.cpp +++ b/unified-runtime/source/adapters/native_cpu/device.cpp @@ -228,6 +228,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT: case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE: case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF: @@ -240,6 +241,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: return ReturnValue(uint32_t{8}); case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: return ReturnValue(uint32_t{4}); case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: return ReturnValue(uint32_t{8}); diff --git a/unified-runtime/source/adapters/offload/device.cpp b/unified-runtime/source/adapters/offload/device.cpp index 01ea016e7fff4..f8b5b3da0d662 100644 --- a/unified-runtime/source/adapters/offload/device.cpp +++ b/unified-runtime/source/adapters/offload/device.cpp @@ -107,7 +107,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, olInfo = OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT; break; case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: olInfo = OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG; break; case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: diff --git a/unified-runtime/source/adapters/opencl/device.cpp b/unified-runtime/source/adapters/opencl/device.cpp index 6ab7b9be174af..dd443ad271fc0 100644 --- a/unified-runtime/source/adapters/opencl/device.cpp +++ b/unified-runtime/source/adapters/opencl/device.cpp @@ -887,7 +887,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return UR_RESULT_SUCCESS; } - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: { + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG: { CL_RETURN_ON_FAILURE(clGetDeviceInfo(hDevice->CLDevice, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, propSize, pPropValue, pPropSizeRet)); @@ -936,7 +937,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return UR_RESULT_SUCCESS; } - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: { + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG: { CL_RETURN_ON_FAILURE(clGetDeviceInfo(hDevice->CLDevice, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, propSize, pPropValue, pPropSizeRet)); diff --git a/unified-runtime/test/conformance/device/urDeviceGetInfo.cpp b/unified-runtime/test/conformance/device/urDeviceGetInfo.cpp index c6e696384d2d0..8022d613d8362 100644 --- a/unified-runtime/test/conformance/device/urDeviceGetInfo.cpp +++ b/unified-runtime/test/conformance/device/urDeviceGetInfo.cpp @@ -326,6 +326,23 @@ TEST_P(urDeviceGetInfoTest, SuccessPreferredVectorWidthHalf) { property_value); } +TEST_P(urDeviceGetInfoTest, SuccessPreferredVectorWidthLongLong) { + size_t property_size = 0; + const ur_device_info_t property_name = + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG; + + ASSERT_SUCCESS_OR_OPTIONAL_QUERY( + urDeviceGetInfo(device, property_name, 0, nullptr, &property_size), + property_name); + ASSERT_EQ(property_size, sizeof(uint32_t)); + + uint32_t property_value = 0; + ASSERT_QUERY_RETURNS_VALUE(urDeviceGetInfo(device, property_name, + property_size, &property_value, + nullptr), + property_value); +} + TEST_P(urDeviceGetInfoTest, SuccessNativeVectorWidthChar) { size_t property_size = 0; const ur_device_info_t property_name = @@ -444,6 +461,23 @@ TEST_P(urDeviceGetInfoTest, SuccessNativeVectorWidthHalf) { property_value); } +TEST_P(urDeviceGetInfoTest, SuccessNativeVectorWidthLongLong) { + size_t property_size = 0; + const ur_device_info_t property_name = + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG; + + ASSERT_SUCCESS_OR_OPTIONAL_QUERY( + urDeviceGetInfo(device, property_name, 0, nullptr, &property_size), + property_name); + ASSERT_EQ(property_size, sizeof(uint32_t)); + + uint32_t property_value = 0; + ASSERT_QUERY_RETURNS_VALUE(urDeviceGetInfo(device, property_name, + property_size, &property_value, + nullptr), + property_value); +} + TEST_P(urDeviceGetInfoTest, SuccessMaxClockFrequency) { size_t property_size = 0; const ur_device_info_t property_name = UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY; diff --git a/unified-runtime/test/conformance/testing/include/uur/utils.h b/unified-runtime/test/conformance/testing/include/uur/utils.h index 1930c35a6ce34..e037e958375c9 100644 --- a/unified-runtime/test/conformance/testing/include/uur/utils.h +++ b/unified-runtime/test/conformance/testing/include/uur/utils.h @@ -243,6 +243,8 @@ ur_result_t GetDevicePreferredVectorWidthInt(ur_device_handle_t device, uint32_t &pref_width); ur_result_t GetDevicePreferredVectorWidthLong(ur_device_handle_t device, uint32_t &pref_width); +ur_result_t GetDevicePreferredVectorWidthLongLong(ur_device_handle_t device, + uint32_t &pref_width); ur_result_t GetDevicePreferredVectorWidthFloat(ur_device_handle_t device, uint32_t &pref_width); ur_result_t GetDevicePreferredVectorWidthDouble(ur_device_handle_t device, @@ -257,6 +259,8 @@ ur_result_t GetDeviceNativeVectorWithInt(ur_device_handle_t device, uint32_t &vec_width); ur_result_t GetDeviceNativeVectorWithLong(ur_device_handle_t device, uint32_t &vec_width); +ur_result_t GetDeviceNativeVectorWithLongLong(ur_device_handle_t device, + uint32_t &vec_width); ur_result_t GetDeviceNativeVectorWithFloat(ur_device_handle_t device, uint32_t &vec_width); ur_result_t GetDeviceNativeVectorWithDouble(ur_device_handle_t device, diff --git a/unified-runtime/test/conformance/testing/source/utils.cpp b/unified-runtime/test/conformance/testing/source/utils.cpp index 0c451052320f0..f0b7378a4c505 100644 --- a/unified-runtime/test/conformance/testing/source/utils.cpp +++ b/unified-runtime/test/conformance/testing/source/utils.cpp @@ -128,6 +128,12 @@ ur_result_t GetDevicePreferredVectorWidthLong(ur_device_handle_t device, device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, pref_width); } +ur_result_t GetDevicePreferredVectorWidthLongLong(ur_device_handle_t device, + uint32_t &pref_width) { + return GetDeviceInfo( + device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG, pref_width); +} + ur_result_t GetDevicePreferredVectorWidthFloat(ur_device_handle_t device, uint32_t &pref_width) { return GetDeviceInfo( @@ -170,6 +176,12 @@ ur_result_t GetDeviceNativeVectorWithLong(ur_device_handle_t device, device, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, vec_width); } +ur_result_t GetDeviceNativeVectorWithLongLong(ur_device_handle_t device, + uint32_t &vec_width) { + return GetDeviceInfo( + device, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG, vec_width); +} + ur_result_t GetDeviceNativeVectorWithFloat(ur_device_handle_t device, uint32_t &vec_width) { return GetDeviceInfo( diff --git a/unified-runtime/tools/urinfo/urinfo.hpp b/unified-runtime/tools/urinfo/urinfo.hpp index 6f101f287322d..4d99ff224b11c 100644 --- a/unified-runtime/tools/urinfo/urinfo.hpp +++ b/unified-runtime/tools/urinfo/urinfo.hpp @@ -351,6 +351,12 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_NODE_MASK); std::cout << prefix; + printDeviceInfo(hDevice, + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG_LONG); + std::cout << prefix; + printDeviceInfo(hDevice, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG_LONG); + std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP); std::cout << prefix;