mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add VME support to device caps
Change-Id: I5af819c24f2361b81ee614b2007bde7fa2a84713
This commit is contained in:

committed by
sys_ocldev

parent
ce75767ca3
commit
df4c6c7507
@ -138,6 +138,7 @@ void Device::initializeCaps() {
|
||||
deviceInfo.platformLP = (hwInfo.capabilityTable.clVersionSupport == 12) ? true : false;
|
||||
deviceInfo.cpuCopyAllowed = true;
|
||||
deviceInfo.spirVersions = spirVersions.c_str();
|
||||
auto supportsVme = hwInfo.capabilityTable.supportsVme;
|
||||
|
||||
if (enabledClVersion >= 21) {
|
||||
deviceInfo.independentForwardProgress = true;
|
||||
@ -159,11 +160,11 @@ void Device::initializeCaps() {
|
||||
deviceExtensions += "cl_intel_packed_yuv ";
|
||||
deviceInfo.packedYuvExtension = true;
|
||||
}
|
||||
if (DebugManager.flags.EnableIntelVme.get()) {
|
||||
if (DebugManager.flags.EnableIntelVme.get() && supportsVme) {
|
||||
deviceExtensions += "cl_intel_motion_estimation ";
|
||||
deviceInfo.vmeExtension = true;
|
||||
}
|
||||
if (DebugManager.flags.EnableIntelAdvancedVme.get()) {
|
||||
if (DebugManager.flags.EnableIntelAdvancedVme.get() && supportsVme) {
|
||||
deviceExtensions += "cl_intel_advanced_motion_estimation ";
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ const RuntimeCapabilityTable CNL::capabilityTable{0,
|
||||
true, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Cnl,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo CNL_2x5x8::hwInfo = {
|
||||
|
@ -63,6 +63,7 @@ const RuntimeCapabilityTable BDW::capabilityTable{0,
|
||||
false, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Bdw,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo BDW_1x2x6::hwInfo = {
|
||||
|
@ -60,6 +60,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{0,
|
||||
true, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Bxt,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo BXT_1x2x6::hwInfo = {
|
||||
|
@ -55,6 +55,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{0,
|
||||
true, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Cfl,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo CFL_1x2x6::hwInfo = {
|
||||
|
@ -55,6 +55,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{0,
|
||||
true, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Glk,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo GLK_1x3x6::hwInfo = {
|
||||
|
@ -55,6 +55,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{0,
|
||||
true, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Kbl,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo KBL_1x2x6::hwInfo = {
|
||||
|
@ -63,6 +63,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{0,
|
||||
true, // sourceLevelDebuggerSupported
|
||||
CmdServicesMemTraceVersion::DeviceValues::Skl,
|
||||
0, // extraQuantityThreadsPerEU
|
||||
true, // SupportsVme
|
||||
MemoryConstants::max48BitAddress}; // gpuAddressSpace
|
||||
|
||||
const HardwareInfo SKL_1x2x6::hwInfo = {
|
||||
|
@ -64,6 +64,7 @@ struct RuntimeCapabilityTable {
|
||||
uint32_t aubDeviceId;
|
||||
|
||||
uint32_t extraQuantityThreadsPerEU;
|
||||
bool supportsVme;
|
||||
uint64_t gpuAddressSpace;
|
||||
};
|
||||
|
||||
|
@ -425,9 +425,11 @@ TEST(Device_GetCaps, givenEnablePackedYuvsetToTrueWhenCapsAreCreatedThenDeviceRe
|
||||
DebugManager.flags.EnablePackedYuv.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableVmeSetToTrueWhenCapsAreCreatedThenDeviceReportsVmeExtensionAndBuiltins) {
|
||||
TEST(Device_GetCaps, givenEnableVmeSetToTrueAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceReportsVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelVme.set(true);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_motion_estimation")));
|
||||
@ -438,9 +440,11 @@ TEST(Device_GetCaps, givenEnableVmeSetToTrueWhenCapsAreCreatedThenDeviceReportsV
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableVmeSetToFalseWhenCapsAreCreatedThenDeviceDoesNotReportsVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
TEST(Device_GetCaps, givenEnableVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelVme.set(true);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_motion_estimation"))));
|
||||
@ -451,9 +455,41 @@ TEST(Device_GetCaps, givenEnableVmeSetToFalseWhenCapsAreCreatedThenDeviceDoesNot
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableAdvancedVmeSetToTrueWhenCapsAreCreatedThenDeviceReportsAdvancedVmeExtensionAndBuiltins) {
|
||||
TEST(Device_GetCaps, givenEnableVmeSetToFalseAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_motion_estimation"))));
|
||||
EXPECT_FALSE(caps.vmeExtension);
|
||||
|
||||
EXPECT_THAT(caps.builtInKernels, testing::Not(testing::HasSubstr("block_motion_estimate_intel")));
|
||||
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableVmeSetToFalseAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_motion_estimation"))));
|
||||
EXPECT_FALSE(caps.vmeExtension);
|
||||
|
||||
EXPECT_THAT(caps.builtInKernels, testing::Not(testing::HasSubstr("block_motion_estimate_intel")));
|
||||
|
||||
DebugManager.flags.EnableIntelVme.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableAdvancedVmeSetToTrueAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceReportsAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(true);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_advanced_motion_estimation")));
|
||||
@ -464,9 +500,41 @@ TEST(Device_GetCaps, givenEnableAdvancedVmeSetToTrueWhenCapsAreCreatedThenDevice
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableAdvancedVmeSetToFalseWhenCapsAreCreatedThenDeviceDoesNotReportsAdvancedVmeExtensionAndBuiltins) {
|
||||
TEST(Device_GetCaps, givenEnableAdvancedVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(true);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_advanced_motion_estimation"))));
|
||||
|
||||
EXPECT_THAT(caps.builtInKernels, testing::Not(testing::HasSubstr("block_advanced_motion_estimate_check_intel")));
|
||||
EXPECT_THAT(caps.builtInKernels, testing::Not(testing::HasSubstr("block_advanced_motion_estimate_bidirectional_check_intel")));
|
||||
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(false);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableAdvancedVmeSetToFalseAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(false);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_advanced_motion_estimation"))));
|
||||
|
||||
EXPECT_THAT(caps.builtInKernels, testing::Not(testing::HasSubstr("block_advanced_motion_estimate_check_intel")));
|
||||
EXPECT_THAT(caps.builtInKernels, testing::Not(testing::HasSubstr("block_advanced_motion_estimate_bidirectional_check_intel")));
|
||||
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(false);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenEnableAdvancedVmeSetToFalseAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(false);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_advanced_motion_estimation"))));
|
||||
|
Reference in New Issue
Block a user