Do not force cl_khr_3d_image_writes extension when compiling kernels

Update usage of SUPPORTED_IMAGES flag and do not use images when disabled.
Use SUPPORTED_2_0 only on fully OCL 2.1 conformant platforms.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-11-25 15:11:11 +01:00
committed by Compute-Runtime-Automation
parent 1792516043
commit 6c4b1f951c
56 changed files with 727 additions and 299 deletions

View File

@@ -209,19 +209,19 @@ TEST(PlatformTestSimple, WhenConvertingCustomOclCFeaturesToCompilerInternalOptio
strcpy_s(feature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "custom_feature");
customOpenclCFeatures.push_back(feature);
auto compilerOption = convertEnabledExtensionsToCompilerInternalOptions("", customOpenclCFeatures);
EXPECT_STREQ(" -cl-ext=-all,+cl_khr_3d_image_writes,+custom_feature ", compilerOption.c_str());
EXPECT_STREQ(" -cl-ext=-all,+custom_feature ", compilerOption.c_str());
strcpy_s(feature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "other_extra_feature");
customOpenclCFeatures.push_back(feature);
compilerOption = convertEnabledExtensionsToCompilerInternalOptions("", customOpenclCFeatures);
EXPECT_STREQ(" -cl-ext=-all,+cl_khr_3d_image_writes,+custom_feature,+other_extra_feature ", compilerOption.c_str());
EXPECT_STREQ(" -cl-ext=-all,+custom_feature,+other_extra_feature ", compilerOption.c_str());
}
TEST(PlatformTestSimple, WhenConvertingOclCFeaturesToCompilerInternalOptionsThenResultIsCorrect) {
UltClDeviceFactory deviceFactory{1, 0};
auto pClDevice = deviceFactory.rootDevices[0];
std::string expectedCompilerOption = " -cl-ext=-all,+cl_khr_3d_image_writes,";
std::string expectedCompilerOption = " -cl-ext=-all,";
for (auto &openclCFeature : pClDevice->deviceInfo.openclCFeatures) {
expectedCompilerOption += "+";
expectedCompilerOption += openclCFeature.name;