mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
sys_ocldev
parent
5a2bff7706
commit
e1755a7079
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user