mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Report cl_khr_integer_dot_product extension
Related-To: NEO-6206 With this commir OpenCL will report cl_khr_integer_dot_product extension in version 2. With all properties enabled. Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d29ed25f8b
commit
31983ec043
@@ -287,5 +287,11 @@ const ProductHelper &ClDevice::getProductHelper() const {
|
||||
const GTPinGfxCoreHelper &ClDevice::getGTPinGfxCoreHelper() const {
|
||||
return *gtpinGfxCoreHelper;
|
||||
}
|
||||
cl_version ClDevice::getExtensionVersion(std::string name) {
|
||||
if (name.compare("cl_khr_integer_dot_product") == 0)
|
||||
return CL_MAKE_VERSION(2u, 0, 0);
|
||||
else
|
||||
return CL_MAKE_VERSION(1u, 0, 0);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -136,6 +136,7 @@ class ClDevice : public BaseObject<_cl_device_id> {
|
||||
const GTPinGfxCoreHelper &getGTPinGfxCoreHelper() const;
|
||||
|
||||
std::unique_ptr<GTPinGfxCoreHelper> gtpinGfxCoreHelper;
|
||||
cl_version getExtensionVersion(std::string name);
|
||||
|
||||
protected:
|
||||
void initializeCaps();
|
||||
|
||||
@@ -405,6 +405,22 @@ void ClDevice::initializeCaps() {
|
||||
deviceInfo.crossDeviceSharedMemCapabilities = productHelper.getCrossDeviceSharedMemCapabilities();
|
||||
deviceInfo.sharedSystemMemCapabilities = productHelper.getSharedSystemMemCapabilities(&hwInfo);
|
||||
|
||||
deviceInfo.integerDotCapabilities = CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR | CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED_KHR;
|
||||
deviceInfo.integerDotAccelerationProperties8Bit = {
|
||||
CL_TRUE, // signed_accelerated;
|
||||
CL_TRUE, // unsigned_accelerated;
|
||||
CL_TRUE, // mixed_signedness_accelerated;
|
||||
CL_TRUE, // accumulating_saturating_signed_accelerated;
|
||||
CL_TRUE, // accumulating_saturating_unsigned_accelerated;
|
||||
CL_TRUE}; // accumulating_saturating_mixed_signedness_accelerated;
|
||||
deviceInfo.integerDotAccelerationProperties4x8BitPacked = {
|
||||
CL_TRUE, // signed_accelerated;
|
||||
CL_TRUE, // unsigned_accelerated;
|
||||
CL_TRUE, // mixed_signedness_accelerated;
|
||||
CL_TRUE, // accumulating_saturating_signed_accelerated;
|
||||
CL_TRUE, // accumulating_saturating_unsigned_accelerated;
|
||||
CL_TRUE}; // accumulating_saturating_mixed_signedness_accelerated;
|
||||
|
||||
initializeOsSpecificCaps();
|
||||
getOpenclCFeaturesList(hwInfo, deviceInfo.openclCFeatures);
|
||||
}
|
||||
@@ -416,7 +432,7 @@ void ClDevice::initializeExtensionsWithVersion() {
|
||||
deviceInfo.extensionsWithVersion.reserve(deviceExtensionsVector.size());
|
||||
for (auto deviceExtension : deviceExtensionsVector) {
|
||||
cl_name_version deviceExtensionWithVersion;
|
||||
deviceExtensionWithVersion.version = CL_MAKE_VERSION(1, 0, 0);
|
||||
deviceExtensionWithVersion.version = getExtensionVersion(deviceExtension);
|
||||
strcpy_s(deviceExtensionWithVersion.name, CL_NAME_VERSION_MAX_NAME_SIZE, deviceExtension.c_str());
|
||||
deviceInfo.extensionsWithVersion.push_back(deviceExtensionWithVersion);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,9 @@ cl_int ClDevice::getDeviceInfo(cl_device_info paramName,
|
||||
case CL_DEVICE_VENDOR_ID: getCap<CL_DEVICE_VENDOR_ID >(src, srcSize, retSize); break;
|
||||
case CL_DEVICE_VERSION: getStr<CL_DEVICE_VERSION >(src, srcSize, retSize); break;
|
||||
case CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT: getCap<CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT >(src, srcSize, retSize); break;
|
||||
case CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR: getCap<CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR >(src, srcSize, retSize); break;
|
||||
case CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED_KHR: getCap<CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED_KHR >(src, srcSize, retSize); break;
|
||||
case CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT_KHR: getCap<CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT_KHR >(src, srcSize, retSize); break;
|
||||
case CL_DRIVER_VERSION: getStr<CL_DRIVER_VERSION >(src, srcSize, retSize); break; // clang-format on
|
||||
case CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES:
|
||||
if (paramValueSize == sizeof(cl_bool)) {
|
||||
|
||||
@@ -142,6 +142,9 @@ struct ClDeviceInfo {
|
||||
cl_unified_shared_memory_capabilities_intel crossDeviceSharedMemCapabilities;
|
||||
cl_unified_shared_memory_capabilities_intel sharedSystemMemCapabilities;
|
||||
StackVec<uint32_t, 4> supportedThreadArbitrationPolicies;
|
||||
cl_device_integer_dot_product_capabilities_khr integerDotCapabilities;
|
||||
cl_device_integer_dot_product_acceleration_properties_khr integerDotAccelerationProperties8Bit;
|
||||
cl_device_integer_dot_product_acceleration_properties_khr integerDotAccelerationProperties4x8BitPacked;
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ template<> struct Map<CL_DEVICE_MAX_WRITE_IMAGE_ARGS > : public MapBa
|
||||
template<> struct Map<CL_DEVICE_PRINTF_BUFFER_SIZE > : public MapBase<CL_DEVICE_PRINTF_BUFFER_SIZE, size_t, &DeviceInfo::printfBufferSize> {};
|
||||
template<> struct Map<CL_DEVICE_PROFILING_TIMER_RESOLUTION > : public MapBase<CL_DEVICE_PROFILING_TIMER_RESOLUTION, size_t, &DeviceInfo::outProfilingTimerResolution> {};
|
||||
template<> struct Map<CL_DEVICE_VENDOR_ID > : public MapBase<CL_DEVICE_VENDOR_ID, uint32_t, &DeviceInfo::vendorId> {};
|
||||
|
||||
template<> struct Map<CL_DEVICE_ATOMIC_FENCE_CAPABILITIES > : public ClMapBase<CL_DEVICE_ATOMIC_FENCE_CAPABILITIES, uint64_t, &ClDeviceInfo::atomicFenceCapabilities> {};
|
||||
template<> struct Map<CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES > : public ClMapBase<CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES, uint64_t, &ClDeviceInfo::atomicMemoryCapabilities> {};
|
||||
template<> struct Map<CL_DEVICE_AVAILABLE > : public ClMapBase<CL_DEVICE_AVAILABLE, uint32_t, &ClDeviceInfo::deviceAvailable> {};
|
||||
@@ -175,6 +174,10 @@ template<> struct Map<CL_DEVICE_VERSION > :
|
||||
template<> struct Map<CL_DRIVER_VERSION > : public ClMapBase<CL_DRIVER_VERSION, const char *, &ClDeviceInfo::driverVersion> {};
|
||||
template<> struct Map<CL_DRIVER_UUID_KHR > : public ClMapBase<CL_DRIVER_UUID_KHR, const char *, &ClDeviceInfo::driverVersion> {};
|
||||
template<> struct Map<CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT > : public ClMapBase<CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT, uint32_t, &ClDeviceInfo::workGroupCollectiveFunctionsSupport> {};
|
||||
template<> struct Map<CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR > : public ClMapBase<CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR, cl_device_integer_dot_product_capabilities_khr, &ClDeviceInfo::integerDotCapabilities> {};
|
||||
template<> struct Map<CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED_KHR > : public ClMapBase<CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED_KHR, cl_device_integer_dot_product_acceleration_properties_khr, &ClDeviceInfo::integerDotAccelerationProperties4x8BitPacked> {};
|
||||
template<> struct Map<CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT_KHR > : public ClMapBase<CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT_KHR, cl_device_integer_dot_product_acceleration_properties_khr, &ClDeviceInfo::integerDotAccelerationProperties8Bit> {};
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // namespace ClDeviceInfoTable
|
||||
|
||||
Reference in New Issue
Block a user