Rename OpenCL Platform Name

- Rename "Intel(R) OpenCL HD Graphics" -> "Intel(R) OpenCL Graphics"
- Add and implement new DebugVariable - OverridePlatformName - for
overriding Platform Name in OpenCL

Related-To: NEO-7826
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-04-17 10:09:09 +00:00
committed by Compute-Runtime-Automation
parent e79fb5f39b
commit b909b03b02
5 changed files with 29 additions and 3 deletions

View File

@@ -98,7 +98,27 @@ INSTANTIATE_TEST_CASE_P(OCLVersions,
TEST_F(clGetPlatformInfoTests, GivenClPlatformNameWhenGettingPlatformInfoStringThenCorrectStringIsReturned) {
paramValue = getPlatformInfoString(pPlatform, CL_PLATFORM_NAME);
EXPECT_STREQ(paramValue, "Intel(R) OpenCL HD Graphics");
EXPECT_STREQ(paramValue, "Intel(R) OpenCL Graphics");
}
class clGetPlatformInfoOverridePlatformNameTests : public clGetPlatformInfoTests {
public:
void SetUp() override {
NEO::DebugManager.flags.OverridePlatformName.set(testPlatformName);
clGetPlatformInfoTests::SetUp();
}
void TearDown() override {
clGetPlatformInfoTests::TearDown();
}
DebugManagerStateRestore restorer;
const std::string testPlatformName = "test platform name";
};
TEST_F(clGetPlatformInfoOverridePlatformNameTests, givenDebugVariableOverridePlatformNameSpecifiedWhenGettingPlatformInfoStringThenPlatformNameIsTakenFromDebugVariable) {
paramValue = getPlatformInfoString(pPlatform, CL_PLATFORM_NAME);
EXPECT_STREQ(paramValue, testPlatformName.c_str());
}
TEST_F(clGetPlatformInfoTests, GivenClPlatformVendorWhenGettingPlatformInfoStringThenCorrectStringIsReturned) {