Update setting platform version

Related-To: NEO-4368

Change-Id: Id328d69809cd4333973bd6c6e2ee9dd9c0946af9
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-05-14 17:36:42 +02:00
committed by sys_ocldev
parent 5a2bff7706
commit e1755a7079
2 changed files with 7 additions and 1 deletions

View File

@@ -128,6 +128,9 @@ bool Platform::initialize(std::vector<std::unique_ptr<Device>> devices) {
this->platformInfo->extensions = pClDevice->getDeviceInfo().deviceExtensions;
switch (pClDevice->getEnabledClVersion()) {
case 30:
this->platformInfo->version = "OpenCL 3.0 ";
break;
case 21:
this->platformInfo->version = "OpenCL 2.1 ";
break;

View File

@@ -63,6 +63,9 @@ TEST_P(clGetPlatformInfoParameterizedTests, GivenClPlatformVersionWhenGettingPla
paramValue = getPlatformInfoString(pPlatform, CL_PLATFORM_VERSION);
std::string deviceVer;
switch (GetParam()) {
case 30:
deviceVer = "OpenCL 3.0 ";
break;
case 21:
deviceVer = "OpenCL 2.1 ";
break;
@@ -76,7 +79,7 @@ TEST_P(clGetPlatformInfoParameterizedTests, GivenClPlatformVersionWhenGettingPla
INSTANTIATE_TEST_CASE_P(OCLVersions,
clGetPlatformInfoParameterizedTests,
::testing::Values(12, 21));
::testing::Values(12, 21, 30));
TEST_F(clGetPlatformInfoTests, GivenClPlatformNameWhenGettingPlatformInfoStringThenCorrectStringIsReturned) {
paramValue = getPlatformInfoString(pPlatform, CL_PLATFORM_NAME);