mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Fix ocloc -device option
Related-To: NEO-4782 Change-Id: I2e7752a4f9f1bdf4cc1c45549e39139d8e77b89f Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
d712a015b4
commit
0ca7e5b5ae
@ -89,22 +89,22 @@ TEST(OclocFatBinaryAsProductId, GivenDisabledPlatformNameThenReturnsUnknownPlatf
|
||||
}
|
||||
}
|
||||
|
||||
TEST(OclocFatBinaryAsGfxCoreId, GivenEnabledGfxCoreNameThenReturnsProperGfxCoreId) {
|
||||
TEST(OclocFatBinaryAsGfxCoreIdList, GivenEnabledGfxCoreNameThenReturnsNonEmptyList) {
|
||||
for (unsigned int coreId = 0; coreId < IGFX_MAX_CORE; ++coreId) {
|
||||
if (nullptr != NEO::familyName[coreId]) {
|
||||
EXPECT_NE(IGFX_UNKNOWN_CORE, NEO::asGfxCoreId(ConstStringRef(NEO::familyName[coreId], strlen(NEO::familyName[coreId]))));
|
||||
EXPECT_FALSE(NEO::asGfxCoreIdList(ConstStringRef(NEO::familyName[coreId], strlen(NEO::familyName[coreId]))).empty());
|
||||
std::string caseInsesitive = NEO::familyName[coreId];
|
||||
caseInsesitive[0] = 'g';
|
||||
EXPECT_NE(IGFX_UNKNOWN_CORE, NEO::asGfxCoreId(caseInsesitive));
|
||||
EXPECT_FALSE(NEO::asGfxCoreIdList(caseInsesitive).empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST(OclocFatBinaryAsGfxCoreId, GivenDisabledGfxCoreNameThenReturnsProperGfxCoreId) {
|
||||
EXPECT_EQ(IGFX_UNKNOWN_CORE, NEO::asGfxCoreId(ConstStringRef("genA")));
|
||||
EXPECT_EQ(IGFX_UNKNOWN_CORE, NEO::asGfxCoreId(ConstStringRef("gen0")));
|
||||
EXPECT_EQ(IGFX_UNKNOWN_CORE, NEO::asGfxCoreId(ConstStringRef("gen1")));
|
||||
EXPECT_EQ(IGFX_UNKNOWN_CORE, NEO::asGfxCoreId(ConstStringRef("gen2")));
|
||||
TEST(OclocFatBinaryAsGfxCoreIdList, GivenDisabledGfxCoreNameThenReturnsEmptyList) {
|
||||
EXPECT_TRUE(NEO::asGfxCoreIdList(ConstStringRef("genA")).empty());
|
||||
EXPECT_TRUE(NEO::asGfxCoreIdList(ConstStringRef("gen0")).empty());
|
||||
EXPECT_TRUE(NEO::asGfxCoreIdList(ConstStringRef("gen1")).empty());
|
||||
EXPECT_TRUE(NEO::asGfxCoreIdList(ConstStringRef("gen2")).empty());
|
||||
}
|
||||
|
||||
TEST(OclocFatBinaryAppendPlatformsForGfxCore, GivenCoreIdThenAppendsEnabledProductIdsThatMatch) {
|
||||
|
Reference in New Issue
Block a user