fix: report sync dispatch extension only if implicit scaling enabled
Related-To: NEO-8171 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
parent
d0fd62a98f
commit
d3f28b92c9
|
@ -153,7 +153,7 @@ ze_result_t DriverHandleImp::getExtensionProperties(uint32_t *pCount,
|
|||
}
|
||||
devices[0]->getL0GfxCoreHelper().appendPlatformSpecificExtensions(additionalExtensions, devices[0]->getProductHelper(), devices[0]->getHwInfo());
|
||||
|
||||
if (devices[0]->getL0GfxCoreHelper().synchronizedDispatchSupported()) {
|
||||
if (devices[0]->getL0GfxCoreHelper().synchronizedDispatchSupported() && devices[0]->isImplicitScalingCapable()) {
|
||||
additionalExtensions.emplace_back(ZE_SYNCHRONIZED_DISPATCH_EXP_NAME, ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_CURRENT);
|
||||
}
|
||||
|
||||
|
|
|
@ -4217,6 +4217,23 @@ HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingKernelSplitWithEve
|
|||
alignedFree(alignedPtr);
|
||||
}
|
||||
|
||||
HWTEST2_F(InOrderCmdListTests, givenImplicitScalingEnabledWhenAskingForExtensionsThenReturnSyncDispatchExtension, IsAtLeastXeHpCore) {
|
||||
uint32_t count = 0;
|
||||
ze_result_t res = driverHandle->getExtensionProperties(&count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
std::vector<ze_driver_extension_properties_t> extensionProperties(count);
|
||||
|
||||
res = driverHandle->getExtensionProperties(&count, extensionProperties.data());
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
auto it = std::find_if(extensionProperties.begin(), extensionProperties.end(), [](const auto ¶m) {
|
||||
return (strcmp(param.name, ZE_SYNCHRONIZED_DISPATCH_EXP_NAME) == 0);
|
||||
});
|
||||
|
||||
EXPECT_EQ(extensionProperties.end(), it);
|
||||
}
|
||||
|
||||
struct MultiTileInOrderCmdListTests : public InOrderCmdListTests {
|
||||
void SetUp() override {
|
||||
NEO::debugManager.flags.CreateMultipleSubDevices.set(partitionCount);
|
||||
|
@ -4308,6 +4325,27 @@ HWTEST2_F(MultiTileInOrderCmdListTests, givenStandaloneEventAndKernelSplitWhenCa
|
|||
context->freeMem(hostAddress);
|
||||
}
|
||||
|
||||
HWTEST2_F(MultiTileInOrderCmdListTests, givenImplicitScalingEnabledWhenAskingForExtensionsThenReturnSyncDispatchExtension, IsAtLeastXeHpCore) {
|
||||
uint32_t count = 0;
|
||||
ze_result_t res = driverHandle->getExtensionProperties(&count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
std::vector<ze_driver_extension_properties_t> extensionProperties(count);
|
||||
|
||||
res = driverHandle->getExtensionProperties(&count, extensionProperties.data());
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
auto it = std::find_if(extensionProperties.begin(), extensionProperties.end(), [](const auto ¶m) {
|
||||
return (strcmp(param.name, ZE_SYNCHRONIZED_DISPATCH_EXP_NAME) == 0);
|
||||
});
|
||||
|
||||
if (device->getL0GfxCoreHelper().synchronizedDispatchSupported()) {
|
||||
EXPECT_NE(extensionProperties.end(), it);
|
||||
} else {
|
||||
EXPECT_EQ(extensionProperties.end(), it);
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(MultiTileInOrderCmdListTests, givenStandaloneEventAndCopyOnlyCmdListWhenCallingAppendThenSuccess, IsAtLeastXeHpCore) {
|
||||
uint64_t counterValue = 2;
|
||||
auto hostAddress = reinterpret_cast<uint64_t *>(allocHostMem(sizeof(uint64_t)));
|
||||
|
|
|
@ -118,7 +118,7 @@ TEST_F(DriverVersionTest, givenCallToGetExtensionPropertiesThenSupportedExtensio
|
|||
std::vector<std::pair<std::string, uint32_t>> additionalExtensions;
|
||||
device->getL0GfxCoreHelper().appendPlatformSpecificExtensions(additionalExtensions, device->getProductHelper(), device->getHwInfo());
|
||||
|
||||
if (device->getL0GfxCoreHelper().synchronizedDispatchSupported()) {
|
||||
if (device->getL0GfxCoreHelper().synchronizedDispatchSupported() && device->isImplicitScalingCapable()) {
|
||||
additionalExtensions.emplace_back(ZE_SYNCHRONIZED_DISPATCH_EXP_NAME, ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_CURRENT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue