mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Disable sharing extensions on specific configs
Change-Id: Ib2be6e797095bf771c618ba3515236e3f3eb16c6 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Resolves: NEO-4010
This commit is contained in:
@ -181,7 +181,10 @@ void Device::initializeCaps() {
|
||||
deviceExtensions += "cl_intel_media_block_io ";
|
||||
}
|
||||
|
||||
deviceExtensions += sharingFactory.getExtensions();
|
||||
auto sharingAllowed = (HwHelper::getSubDevicesCount(&hwInfo) == 1u);
|
||||
if (sharingAllowed) {
|
||||
deviceExtensions += sharingFactory.getExtensions();
|
||||
}
|
||||
|
||||
deviceExtensions += hwHelper.getExtensions();
|
||||
|
||||
|
@ -366,6 +366,24 @@ TEST_F(DeviceGetCapsTest, DISABLED_givenDeviceWhenCapsAreCreateThenClGLSharingIs
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_gl_sharing ")));
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenEnableSharingFormatQuerySetTrueAndDisabledMultipleSubDevicesWhenDeviceCapsAreCreatedThenSharingFormatQueryIsReported) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableFormatQuery.set(true);
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(0);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_sharing_format_query ")));
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenEnableSharingFormatQuerySetTrueAndEnabledMultipleSubDevicesWhenDeviceCapsAreCreatedThenSharingFormatQueryIsNotReported) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableFormatQuery.set(true);
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(2);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_THAT(caps.deviceExtensions, ::testing::Not(::testing::HasSubstr(std::string("cl_intel_sharing_format_query "))));
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenOpenCLVersion21WhenCapsAreCreatedThenDeviceReportsClKhrSubgroupsExtension) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
|
Reference in New Issue
Block a user