Report cl_khr_integer_dot_product extension

Related-To: NEO-6206

With this commit 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:
Maciej Plewka
2022-07-04 12:03:50 +00:00
committed by Compute-Runtime-Automation
parent aa3dfbf90e
commit 730578112f
38 changed files with 266 additions and 16 deletions

View File

@@ -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

View File

@@ -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();

View File

@@ -405,8 +405,26 @@ void ClDevice::initializeCaps() {
deviceInfo.crossDeviceSharedMemCapabilities = productHelper.getCrossDeviceSharedMemCapabilities();
deviceInfo.sharedSystemMemCapabilities = productHelper.getSharedSystemMemCapabilities(&hwInfo);
if (compilerProductHelper.isDotIntegerProductExtensionSupported()) {
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);
getOpenclCFeaturesList(hwInfo, deviceInfo.openclCFeatures, getDevice().getCompilerProductHelper());
}
void ClDevice::initializeExtensionsWithVersion() {
@@ -416,7 +434,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);
}

View File

@@ -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)) {

View File

@@ -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

View File

@@ -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

View File

@@ -5,6 +5,7 @@
*
*/
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "opencl/source/helpers/cl_gfx_core_helper.h"
@@ -454,4 +455,55 @@ INSTANTIATE_TEST_CASE_P(
GetDeviceInfoVectorWidth,
testing::ValuesIn(devicePreferredVector));
TEST_F(clGetDeviceInfoTests, givenClDeviceWhenGetInfoForIntegerDotCapsThenCorrectValuesAreSet) {
size_t paramRetSize = 0;
cl_device_integer_dot_product_capabilities_khr integerDotCapabilities{};
clGetDeviceInfo(
testedClDevice,
CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR,
sizeof(integerDotCapabilities),
&integerDotCapabilities,
&paramRetSize);
auto &compilerHelper = pDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ(((integerDotCapabilities & CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR) && (integerDotCapabilities & CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED_KHR)), compilerHelper.isDotIntegerProductExtensionSupported());
}
TEST_F(clGetDeviceInfoTests, givenClDeviceWhenGetInfoForIntegerDot8BitPropertiesThenCorrectValuesAreSet) {
size_t paramRetSize = 0;
cl_device_integer_dot_product_acceleration_properties_khr integerDotAccelerationProperties8Bit{};
clGetDeviceInfo(
testedClDevice,
CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT_KHR,
sizeof(integerDotAccelerationProperties8Bit),
&integerDotAccelerationProperties8Bit,
&paramRetSize);
auto &compilerHelper = pDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ(integerDotAccelerationProperties8Bit.accumulating_saturating_mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8Bit.accumulating_saturating_signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8Bit.accumulating_saturating_unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8Bit.mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8Bit.signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8Bit.unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
}
TEST_F(clGetDeviceInfoTests, givenClDeviceWhenGetInfoForIntegerDot8BitPackedPropertiesThenCorrectValuesAreSet) {
size_t paramRetSize = 0;
cl_device_integer_dot_product_acceleration_properties_khr integerDotAccelerationProperties8BitPacked{};
clGetDeviceInfo(
testedClDevice,
CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED_KHR,
sizeof(integerDotAccelerationProperties8BitPacked),
&integerDotAccelerationProperties8BitPacked,
&paramRetSize);
auto &compilerHelper = pDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ(integerDotAccelerationProperties8BitPacked.accumulating_saturating_mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8BitPacked.accumulating_saturating_signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8BitPacked.accumulating_saturating_unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8BitPacked.mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8BitPacked.signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(integerDotAccelerationProperties8BitPacked.unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
}
} // namespace ULT

View File

@@ -204,7 +204,11 @@ TEST_F(clGetPlatformInfoTests, WhenCheckingPlatformExtensionsWithVersionThenThey
std::string allExtensions;
for (size_t i = 0; i < extensionsCount; i++) {
EXPECT_EQ(CL_MAKE_VERSION(1u, 0u, 0u), platformExtensionsWithVersion[i].version);
if (strcmp(platformExtensionsWithVersion[i].name, "cl_khr_integer_dot_product") == 0) {
EXPECT_EQ(CL_MAKE_VERSION(2u, 0, 0), platformExtensionsWithVersion[i].version);
} else {
EXPECT_EQ(CL_MAKE_VERSION(1u, 0, 0), platformExtensionsWithVersion[i].version);
}
allExtensions += platformExtensionsWithVersion[i].name;
allExtensions += " ";
}

View File

@@ -10,6 +10,7 @@
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/bit_helpers.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/memory_manager/os_agnostic_memory_manager.h"
#include "shared/source/os_interface/os_interface.h"
@@ -118,6 +119,10 @@ struct DeviceGetCapsTest : public ::testing::Test {
EXPECT_STREQ("__opencl_c_ext_fp64_local_atomic_min_max", (++openclCFeatureIterator)->name);
}
}
if (clDevice.getDevice().getCompilerProductHelper().isDotIntegerProductExtensionSupported()) {
EXPECT_STREQ("__opencl_c_integer_dot_product_input_4x8bit", (++openclCFeatureIterator)->name);
EXPECT_STREQ("__opencl_c_integer_dot_product_input_4x8bit_packed", (++openclCFeatureIterator)->name);
}
EXPECT_EQ(clDevice.getDeviceInfo().openclCFeatures.end(), ++openclCFeatureIterator);
}
@@ -965,7 +970,11 @@ TEST_F(DeviceGetCapsTest, givenDefaultDeviceWhenQueriedForExtensionsWithVersionT
EXPECT_FALSE(pClDevice->getDeviceInfo().extensionsWithVersion.empty());
for (auto extensionWithVersion : pClDevice->getDeviceInfo().extensionsWithVersion) {
EXPECT_EQ(CL_MAKE_VERSION(1u, 0u, 0u), extensionWithVersion.version);
if (strcmp(extensionWithVersion.name, "cl_khr_integer_dot_product") == 0) {
EXPECT_EQ(CL_MAKE_VERSION(2u, 0, 0), extensionWithVersion.version);
} else {
EXPECT_EQ(CL_MAKE_VERSION(1u, 0, 0), extensionWithVersion.version);
}
allExtensions += extensionWithVersion.name;
allExtensions += " ";
}
@@ -973,6 +982,74 @@ TEST_F(DeviceGetCapsTest, givenDefaultDeviceWhenQueriedForExtensionsWithVersionT
EXPECT_STREQ(pClDevice->deviceExtensions.c_str(), allExtensions.c_str());
}
TEST_F(DeviceGetCapsTest, givenClDeviceWhenGetExtensionsVersionCalledThenCorrectVersionIsSet) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
pClDevice->getDeviceInfo(CL_DEVICE_EXTENSIONS_WITH_VERSION, 0, nullptr, nullptr);
for (auto extensionWithVersion : pClDevice->getDeviceInfo().extensionsWithVersion) {
if (strcmp(extensionWithVersion.name, "cl_khr_integer_dot_product") == 0) {
EXPECT_EQ(CL_MAKE_VERSION(2u, 0, 0), pClDevice->getExtensionVersion(std::string(extensionWithVersion.name)));
} else {
EXPECT_EQ(CL_MAKE_VERSION(1u, 0, 0), pClDevice->getExtensionVersion(std::string(extensionWithVersion.name)));
}
}
}
TEST_F(DeviceGetCapsTest, givenClDeviceWhenCapsInitializedThenIntegerDotInput4xBitCapIsSet) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
pClDevice->initializeCaps();
auto &compilerHelper = pClDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ((pClDevice->deviceInfo.integerDotCapabilities & CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR) != 0, compilerHelper.isDotIntegerProductExtensionSupported());
}
TEST_F(DeviceGetCapsTest, givenClDeviceWhenCapsInitializedThenIntegerDotInput4xBitPackedCapIsSet) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
pClDevice->initializeCaps();
auto &compilerHelper = pClDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ((pClDevice->deviceInfo.integerDotCapabilities & CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED_KHR) != 0, compilerHelper.isDotIntegerProductExtensionSupported());
}
TEST_F(DeviceGetCapsTest, givenClDeviceWhenCapsInitializedThenAllFieldsInIntegerDotAccPropertiesAreTrue) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
pClDevice->initializeCaps();
auto &compilerHelper = pClDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties8Bit.accumulating_saturating_mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties8Bit.accumulating_saturating_signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties8Bit.accumulating_saturating_unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties8Bit.mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties8Bit.signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties8Bit.unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
}
TEST_F(DeviceGetCapsTest, givenClDeviceWhenCapsInitializedThenAllFieldsInIntegerDotAccPackedPropertiesAreTrue) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
pClDevice->initializeCaps();
auto &compilerHelper = pClDevice->getDevice().getCompilerProductHelper();
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties4x8BitPacked.accumulating_saturating_mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties4x8BitPacked.accumulating_saturating_signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties4x8BitPacked.accumulating_saturating_unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties4x8BitPacked.mixed_signedness_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties4x8BitPacked.signed_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
EXPECT_EQ(pClDevice->deviceInfo.integerDotAccelerationProperties4x8BitPacked.unsigned_accelerated, compilerHelper.isDotIntegerProductExtensionSupported());
}
TEST_F(DeviceGetCapsTest, givenClDeviceWhenEnableIntegerDotExtensionEnalbedThenDotIntegerExtensionIsInExtensionString) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
pClDevice->initializeCaps();
auto &compilerHelper = pClDevice->getDevice().getCompilerProductHelper();
static const char *const supportedExtensions[] = {
"cl_khr_integer_dot_product "};
for (auto extension : supportedExtensions) {
auto foundOffset = pClDevice->deviceExtensions.find(extension);
EXPECT_EQ(foundOffset != std::string::npos, compilerHelper.isDotIntegerProductExtensionSupported());
}
}
TEST_F(DeviceGetCapsTest, givenFp64SupportForcedWhenCheckingFp64SupportThenFp64IsCorrectlyReported) {
DebugManagerStateRestore dbgRestorer;
int32_t overrideDefaultFP64SettingsValues[] = {-1, 0, 1};

View File

@@ -1748,7 +1748,8 @@ TEST_F(OfflineCompilerTests, givenVariousClStdValuesWhenCompilingSourceThenCorre
}
OpenClCFeaturesContainer openclCFeatures;
getOpenclCFeaturesList(mockOfflineCompiler->hwInfo, openclCFeatures);
auto compilerProductHelper = CompilerProductHelper::create(mockOfflineCompiler->hwInfo.platform.eProductFamily);
getOpenclCFeaturesList(mockOfflineCompiler->hwInfo, openclCFeatures, *compilerProductHelper.get());
for (auto &feature : openclCFeatures) {
if (clStdOptionValue == "-cl-std=CL3.0") {
EXPECT_TRUE(hasSubstr(internalOptions, std::string{feature.name}));

View File

@@ -278,7 +278,7 @@ TEST_F(PlatformTest, givenSupportingCl21WhenPlatformSupportsFp64ThenFillMatching
hwInfo = defaultHwInfo.get();
std::string extensionsList = compilerProductHelper->getDeviceExtensions(*hwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*hwInfo, features);
getOpenclCFeaturesList(*hwInfo, features, *compilerProductHelper.get());
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), features);
EXPECT_TRUE(hasSubstr(compilerExtensions, std::string(" -cl-ext=-all,+cl")));
@@ -317,7 +317,7 @@ TEST_F(PlatformTest, givenNotSupportingCl21WhenPlatformNotSupportFp64ThenNotFill
std::string extensionsList = compilerProductHelper->getDeviceExtensions(testHwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*defaultHwInfo, features);
getOpenclCFeaturesList(*defaultHwInfo, features, *compilerProductHelper.get());
if (testHwInfo.capabilityTable.supportsImages) {
EXPECT_TRUE(hasSubstr(extensionsList, std::string("cl_khr_3d_image_writes")));
}
@@ -335,7 +335,7 @@ TEST_F(PlatformTest, givenFtrSupportAtomicsWhenCreateExtentionsListThenGetMatchi
hwInfo = defaultHwInfo.get();
std::string extensionsList = compilerProductHelper->getDeviceExtensions(*hwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*hwInfo, features);
getOpenclCFeaturesList(*hwInfo, features, *compilerProductHelper.get());
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), features);
if (hwInfo->capabilityTable.ftrSupportsInteger64BitAtomics) {
@@ -354,7 +354,7 @@ TEST_F(PlatformTest, givenSupportedMediaBlockAndClVersion21WhenCreateExtentionsL
hwInfo.capabilityTable.supportsOcl21Features = true;
std::string extensionsList = compilerProductHelper->getDeviceExtensions(hwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*defaultHwInfo, features);
getOpenclCFeaturesList(*defaultHwInfo, features, *compilerProductHelper.get());
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), features);
EXPECT_TRUE(hasSubstr(compilerExtensions, std::string("cl_intel_spirv_media_block_io")));
@@ -366,7 +366,7 @@ TEST_F(PlatformTest, givenNotSupportedMediaBlockAndClVersion21WhenCreateExtentio
hwInfo.capabilityTable.clVersionSupport = 21;
std::string extensionsList = compilerProductHelper->getDeviceExtensions(hwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*defaultHwInfo, features);
getOpenclCFeaturesList(*defaultHwInfo, features, *compilerProductHelper.get());
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), features);
EXPECT_FALSE(hasSubstr(compilerExtensions, std::string("cl_intel_spirv_media_block_io")));
@@ -377,7 +377,7 @@ TEST_F(PlatformTest, givenSupportedImagesWhenCreateExtentionsListThenDeviceNotRe
hwInfo.capabilityTable.supportsImages = true;
std::string extensionsList = compilerProductHelper->getDeviceExtensions(hwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*defaultHwInfo, features);
getOpenclCFeaturesList(*defaultHwInfo, features, *compilerProductHelper.get());
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), features);
EXPECT_TRUE(hasSubstr(compilerExtensions, std::string("cl_khr_3d_image_writes")));
@@ -388,7 +388,7 @@ TEST_F(PlatformTest, givenNotSupportedImagesWhenCreateExtentionsListThenDeviceNo
hwInfo.capabilityTable.supportsImages = false;
std::string extensionsList = compilerProductHelper->getDeviceExtensions(hwInfo);
OpenClCFeaturesContainer features;
getOpenclCFeaturesList(*defaultHwInfo, features);
getOpenclCFeaturesList(*defaultHwInfo, features, *compilerProductHelper.get());
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), features);
EXPECT_FALSE(hasSubstr(compilerExtensions, std::string("cl_khr_3d_image_writes")));