feature(ocl): enable "cl_khr_external_memory" extension

- report extension string
- report supported memory handle types

Related-To: NEO-6757

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-07-18 16:57:32 +00:00
committed by Compute-Runtime-Automation
parent 957aa99f9e
commit e52712b800
8 changed files with 9 additions and 35 deletions

View File

@@ -1750,8 +1750,6 @@ TEST_F(DeviceGetCapsTest, givenRootDeviceWithSubDevicesWhenQueriedForCacheSizeTh
}
TEST_F(DeviceGetCapsTest, givenClKhrExternalMemoryExtensionEnabledWhenCapsAreCreatedThenDeviceInfoReportsSupportOfExternalMemorySharing) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.ClKhrExternalMemoryExtension.set(1);
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
EXPECT_TRUE(device->deviceInfo.externalMemorySharing);
}

View File

@@ -49,8 +49,6 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo
TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenDeviceInfoReportsSupportOfExternalMemorySharing) {
VariableBackup<UltHwConfig> backup(&ultHwConfig);
DebugManagerStateRestore stateRestore;
DebugManager.flags.ClKhrExternalMemoryExtension.set(1);
ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false;
auto hwInfo = defaultHwInfo.get();

View File

@@ -13,17 +13,7 @@
using namespace NEO;
struct GetPlatformInfoLinuxTest : Test<PlatformFixture> {
void SetUp() override {
DebugManager.flags.ClKhrExternalMemoryExtension.set(1);
Test<PlatformFixture>::SetUp();
}
void TearDown() override {
Test<PlatformFixture>::TearDown();
}
DebugManagerStateRestore stateRestore;
};
using GetPlatformInfoLinuxTest = Test<PlatformFixture>;
TEST_F(GetPlatformInfoLinuxTest, GivenPlatformWhenGettingInfoForExternalMemoryThenCorrectHandlesAreReturned) {
size_t retSize = 0;

View File

@@ -46,8 +46,6 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo
TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenDeviceInfoReportsSupportOfExternalMemorySharing) {
VariableBackup<UltHwConfig> backup(&ultHwConfig);
DebugManagerStateRestore stateRestore;
DebugManager.flags.ClKhrExternalMemoryExtension.set(1);
ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false;
auto hwInfo = defaultHwInfo.get();

View File

@@ -13,17 +13,7 @@
using namespace NEO;
struct GetPlatformInfoWindowsTest : Test<PlatformFixture> {
void SetUp() override {
DebugManager.flags.ClKhrExternalMemoryExtension.set(1);
Test<PlatformFixture>::SetUp();
}
void TearDown() override {
Test<PlatformFixture>::TearDown();
}
DebugManagerStateRestore stateRestore;
};
using GetPlatformInfoWindowsTest = Test<PlatformFixture>;
TEST_F(GetPlatformInfoWindowsTest, GivenPlatformWhenGettingInfoForExternalMemoryThenCorrectHandlesAreReturned) {
size_t retSize = 0;