feature: return experimental sync queue extension if supported

Related-To: NEO-8171

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-04-15 17:02:54 +00:00
committed by Compute-Runtime-Automation
parent 4e6b8a2c90
commit 4f52fd504a
8 changed files with 46 additions and 3 deletions

View File

@@ -23,6 +23,7 @@
#include "shared/source/os_interface/os_interface.h"
#include "shared/source/os_interface/os_library.h"
#include "level_zero/api/driver_experimental/public/zex_common.h"
#include "level_zero/core/source/builtin/builtin_functions_lib.h"
#include "level_zero/core/source/context/context_imp.h"
#include "level_zero/core/source/device/device_imp.h"
@@ -152,6 +153,10 @@ ze_result_t DriverHandleImp::getExtensionProperties(uint32_t *pCount,
}
devices[0]->getL0GfxCoreHelper().appendPlatformSpecificExtensions(additionalExtensions, devices[0]->getProductHelper());
if (devices[0]->getL0GfxCoreHelper().synchronizedDispatchSupported()) {
additionalExtensions.emplace_back(ZE_SYNCHRONIZED_DISPATCH_EXP_NAME, ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_CURRENT);
}
auto extensionCount = static_cast<uint32_t>(this->extensionsSupported.size() + additionalExtensions.size());
if (nullptr == pExtensionProperties) {

View File

@@ -97,6 +97,7 @@ class L0GfxCoreHelper : public NEO::ApiGfxCoreHelper {
virtual void stallSumIpDataToTypedValues(uint64_t ip, void *sumIpData, std::vector<zet_typed_value_t> &ipDataValues) = 0;
virtual bool stallIpDataMapUpdate(std::map<uint64_t, void *> &stallSumIpDataMap, const uint8_t *pRawIpData) = 0;
virtual void stallIpDataMapDelete(std::map<uint64_t, void *> &stallSumIpDataMap) = 0;
virtual bool synchronizedDispatchSupported() const = 0;
protected:
L0GfxCoreHelper() = default;
@@ -143,6 +144,7 @@ class L0GfxCoreHelperHw : public L0GfxCoreHelper {
void stallSumIpDataToTypedValues(uint64_t ip, void *sumIpData, std::vector<zet_typed_value_t> &ipDataValues) override;
bool stallIpDataMapUpdate(std::map<uint64_t, void *> &stallSumIpDataMap, const uint8_t *pRawIpData) override;
void stallIpDataMapDelete(std::map<uint64_t, void *> &stallSumIpDataMap) override;
bool synchronizedDispatchSupported() const override;
protected:
L0GfxCoreHelperHw() = default;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -102,4 +102,9 @@ bool L0GfxCoreHelperHw<Family>::isResumeWARequired() {
return false;
}
template <typename Family>
bool L0GfxCoreHelperHw<Family>::synchronizedDispatchSupported() const {
return true;
}
} // namespace L0

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -83,4 +83,9 @@ bool L0GfxCoreHelperHw<Family>::isResumeWARequired() {
return false;
}
template <typename Family>
bool L0GfxCoreHelperHw<Family>::synchronizedDispatchSupported() const {
return false;
}
} // namespace L0

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -111,4 +111,9 @@ bool L0GfxCoreHelperHw<Family>::isResumeWARequired() {
return true;
}
template <typename Family>
bool L0GfxCoreHelperHw<Family>::synchronizedDispatchSupported() const {
return false;
}
} // namespace L0