mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
fix: global stateless heap creation in heapless path
Related-To: NEO-10681 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b2004979ce
commit
95b035a071
@@ -6,10 +6,12 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include "level_zero/core/source/compiler_interface/l0_reg_path.h"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -93,4 +95,11 @@ std::string ApiSpecificConfig::compilerCacheFileExtension() {
|
||||
int64_t ApiSpecificConfig::compilerCacheDefaultEnabled() {
|
||||
return 1l;
|
||||
}
|
||||
|
||||
bool ApiSpecificConfig::isGlobalStatelessEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
|
||||
auto &l0GfxCoreHelper = rootDeviceEnvironment.getHelper<L0::L0GfxCoreHelper>();
|
||||
return l0GfxCoreHelper.getHeapAddressModel(rootDeviceEnvironment) == HeapAddressModel::globalStateless;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -84,4 +84,9 @@ std::string ApiSpecificConfig::compilerCacheFileExtension() {
|
||||
int64_t ApiSpecificConfig::compilerCacheDefaultEnabled() {
|
||||
return 1l;
|
||||
}
|
||||
|
||||
bool ApiSpecificConfig::isGlobalStatelessEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
class ReleaseHelper;
|
||||
struct RootDeviceEnvironment;
|
||||
|
||||
struct ApiSpecificConfig {
|
||||
enum ApiType { OCL,
|
||||
@@ -26,6 +27,7 @@ struct ApiSpecificConfig {
|
||||
static bool isHostAllocationCacheEnabled();
|
||||
static bool isDeviceUsmPoolingEnabled();
|
||||
static bool isHostUsmPoolingEnabled();
|
||||
static bool isGlobalStatelessEnabled(const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
static ApiType getApiType();
|
||||
static std::string getName();
|
||||
static uint64_t getReducedMaxAllocSize(uint64_t maxAllocSize);
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace NEO {
|
||||
class ReleaseHelper;
|
||||
|
||||
ApiSpecificConfig::ApiType apiTypeForUlts = ApiSpecificConfig::OCL;
|
||||
|
||||
bool globalStatelessL0 = false;
|
||||
bool globalStatelessOcl = false;
|
||||
bool isStatelessCompressionSupportedForUlts = true;
|
||||
|
||||
StackVec<const char *, 4> validUltL0Prefixes = {"NEO_L0_", "NEO_", ""};
|
||||
@@ -113,4 +116,14 @@ int64_t ApiSpecificConfig::compilerCacheDefaultEnabled() {
|
||||
return 1l;
|
||||
}
|
||||
|
||||
bool ApiSpecificConfig::isGlobalStatelessEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
|
||||
if (apiTypeForUlts == ApiSpecificConfig::L0) {
|
||||
return globalStatelessL0;
|
||||
|
||||
} else {
|
||||
return globalStatelessOcl;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user