Report 64 bit integer atomic extension basing on caps.
Change-Id: Ib4241c082eb03edcb43bb79d2eef3af8b5bbe00d Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
parent
86edfea3bf
commit
db8cd0e575
|
@ -154,6 +154,11 @@ void Device::initializeCaps() {
|
|||
deviceExtensions += "cl_intel_advanced_motion_estimation ";
|
||||
}
|
||||
|
||||
if (hwInfo.capabilityTable.ftrSupportsInteger64BitAtomics) {
|
||||
deviceExtensions += "cl_khr_int64_base_atomics ";
|
||||
deviceExtensions += "cl_khr_int64_extended_atomics ";
|
||||
}
|
||||
|
||||
deviceExtensions += sharingFactory.getExtensions();
|
||||
|
||||
simultaneousInterops = {0};
|
||||
|
|
|
@ -523,6 +523,20 @@ TEST(DeviceGetCapsTest, givenEnableAdvancedVmeSetToTrueAndDeviceSupportsVmeWhenC
|
|||
EXPECT_THAT(caps.builtInKernels, testing::HasSubstr("block_advanced_motion_estimate_bidirectional_check_intel"));
|
||||
}
|
||||
|
||||
TEST(DeviceGetCapsTest, givenDeviceCapsSupportFor64BitAtomicsFollowsHardwareCapabilities) {
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
if (hwInfo.capabilityTable.ftrSupportsInteger64BitAtomics) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr("cl_khr_int64_base_atomics "));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr("cl_khr_int64_extended_atomics "));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr("cl_khr_int64_base_atomics ")));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr("cl_khr_int64_extended_atomics ")));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(DeviceGetCapsTest, givenEnableAdvancedVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(true);
|
||||
|
|
Loading…
Reference in New Issue