Expose cl_intel_mem_force_host_memory

Change-Id: I99029457628fbf13f740464bfed7dec47f46686f
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2020-09-17 08:52:08 +02:00
committed by sys_ocldev
parent 9bd6530a33
commit da6377da07
2 changed files with 9 additions and 2 deletions

View File

@@ -14,7 +14,6 @@
#include <string>
namespace NEO {
const char *deviceExtensionsList = "cl_khr_byte_addressable_store "
"cl_khr_fp16 "
"cl_khr_global_int32_base_atomics "
@@ -33,7 +32,8 @@ const char *deviceExtensionsList = "cl_khr_byte_addressable_store "
"cl_khr_create_command_queue "
"cl_intel_subgroups_char "
"cl_intel_subgroups_long "
"cl_khr_il_program ";
"cl_khr_il_program "
"cl_intel_mem_force_host_memory ";
std::string getExtensionsList(const HardwareInfo &hwInfo) {
std::string allExtensionsList;

View File

@@ -889,6 +889,13 @@ TEST_F(DeviceGetCapsTest, GivenAnyDeviceWhenCheckingExtensionsThenSupportSubgrou
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_subgroups_long")));
}
TEST_F(DeviceGetCapsTest, GivenAnyDeviceWhenCheckingExtensionsThenSupportForceHostMemory) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
const auto &caps = device->getDeviceInfo();
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_mem_force_host_memory")));
}
TEST_F(DeviceGetCapsTest, givenAtleastOCL21DeviceThenExposesMipMapAndUnifiedMemoryExtensions) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.ForceOCLVersion.set(21);