mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 12:42:54 +08:00
refactor: add wrapper for max gfx core
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e0631437fc
commit
a22817200f
@@ -26,7 +26,7 @@
|
||||
#include <sstream>
|
||||
|
||||
namespace NEO {
|
||||
AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
||||
AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename, uint32_t rootDeviceIndex) {
|
||||
std::string hwPrefix = hardwarePrefix[hwInfo.platform.eProductFamily];
|
||||
@@ -75,7 +75,7 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseN
|
||||
filePath.assign(debugManager.flags.AUBDumpCaptureFileName.get());
|
||||
}
|
||||
|
||||
if (hwInfo->platform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
if (hwInfo->platform.eRenderCoreFamily >= NEO::maxCoreEnumValue) {
|
||||
DEBUG_BREAK_IF(!false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
namespace NEO {
|
||||
|
||||
// Global table of CommandStreamReceiver factories for HW and tests
|
||||
CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE] = {};
|
||||
CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue] = {};
|
||||
|
||||
CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <typename BaseCSR>
|
||||
CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(const std::string &baseName,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
||||
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName,
|
||||
bool withAubDump,
|
||||
@@ -24,7 +24,7 @@ CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseN
|
||||
const DeviceBitfield deviceBitfield) {
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
|
||||
if (hwInfo->platform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
if (hwInfo->platform.eRenderCoreFamily >= NEO::maxCoreEnumValue) {
|
||||
DEBUG_BREAK_IF(!false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE] = {};
|
||||
DebugerL0CreateFn debuggerL0Factory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
DebuggerL0::DebuggerL0(NEO::Device *device) : device(device) {
|
||||
const auto deviceCount = std::max(1u, device->getNumSubDevices());
|
||||
|
||||
@@ -25,7 +25,7 @@ constexpr uint32_t AUBCommandStreamReceiverHw<Family>::getMaskAndValueForPollFor
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
|
||||
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ size_t CommandStreamReceiverHw<Family>::getCmdSizeForL3Config() const {
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,7 +18,7 @@ static auto coreFamily = IGFX_GEN12LP_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<DebuggerL0Hw<Family>>() {
|
||||
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||
extern DebugerL0CreateFn debuggerL0Factory[NEO::maxCoreEnumValue];
|
||||
debuggerL0Factory[coreFamily] = DebuggerL0Hw<Family>::allocate;
|
||||
}
|
||||
template class DebuggerL0Hw<Family>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = Gen12LpFamily;
|
||||
static auto gfxFamily = IGFX_GEN12LP_CORE;
|
||||
|
||||
@@ -29,7 +29,7 @@ bool TbxCommandStreamReceiverHw<Family>::getpollNotEqualValueForPollForCompletio
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<TbxCommandStreamReceiverHw<Family>>() {
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory));
|
||||
tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
#include "shared/source/gmm_helper/gmm_callbacks.h"
|
||||
|
||||
namespace NEO {
|
||||
NotifyAubCaptureFunc notifyAubCaptureFuncFactory[IGFX_MAX_CORE]{};
|
||||
WriteL3AddressFunc writeL3AddressFuncFactory[IGFX_MAX_CORE]{};
|
||||
NotifyAubCaptureFunc notifyAubCaptureFuncFactory[NEO::maxCoreEnumValue]{};
|
||||
WriteL3AddressFunc writeL3AddressFuncFactory[NEO::maxCoreEnumValue]{};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace NEO {
|
||||
using NotifyAubCaptureFunc = long(__stdcall *)(void *csrHandle, uint64_t gfxAddress, size_t gfxSize, bool allocate);
|
||||
using WriteL3AddressFunc = int(__stdcall *)(void *queueHandle, uint64_t l3GfxAddress, uint64_t regOffset);
|
||||
|
||||
extern NotifyAubCaptureFunc notifyAubCaptureFuncFactory[IGFX_MAX_CORE];
|
||||
extern WriteL3AddressFunc writeL3AddressFuncFactory[IGFX_MAX_CORE];
|
||||
extern NotifyAubCaptureFunc notifyAubCaptureFuncFactory[NEO::maxCoreEnumValue];
|
||||
extern WriteL3AddressFunc writeL3AddressFuncFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct GmmCallbacks {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace NEO {
|
||||
constexpr GFXCORE_FAMILY xe3pCoreEnumValue = static_cast<GFXCORE_FAMILY>(0x2300); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-16649
|
||||
constexpr GFXCORE_FAMILY xe3pCoreEnumValue = static_cast<GFXCORE_FAMILY>(0x2300); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-16649
|
||||
constexpr GFXCORE_FAMILY maxCoreEnumValue = static_cast<GFXCORE_FAMILY>(xe3pCoreEnumValue + 1); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-16649
|
||||
constexpr PRODUCT_FAMILY maxProductEnumValue = IGFX_MAX_PRODUCT;
|
||||
} // namespace NEO
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE] = {};
|
||||
GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
std::unique_ptr<GfxCoreHelper> GfxCoreHelper::create(const GFXCORE_FAMILY gfxCoreFamily) {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ const char *hardwarePrefix[NEO::maxProductEnumValue] = {
|
||||
};
|
||||
|
||||
// Global table of family names
|
||||
bool familyEnabled[IGFX_MAX_CORE] = {
|
||||
bool familyEnabled[NEO::maxCoreEnumValue] = {
|
||||
false,
|
||||
};
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ struct HardwareInfo { // NOLINT(clang-analyzer-optin.performance.Padding)
|
||||
};
|
||||
|
||||
// Global table of hardware prefixes
|
||||
extern bool familyEnabled[IGFX_MAX_CORE];
|
||||
extern bool familyEnabled[NEO::maxCoreEnumValue];
|
||||
extern const char *hardwarePrefix[NEO::maxProductEnumValue];
|
||||
extern const HardwareInfo *hardwareInfoTable[NEO::maxProductEnumValue];
|
||||
extern void (*hardwareInfoSetup[NEO::maxProductEnumValue])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
|
||||
|
||||
@@ -18,7 +18,7 @@ static auto gfxCore = IGFX_XE2_HPG_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
|
||||
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ template class ImplicitFlushSettings<Family>;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -17,7 +17,7 @@ static auto coreFamily = IGFX_XE2_HPG_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||
extern DebugerL0CreateFn debuggerL0Factory[NEO::maxCoreEnumValue];
|
||||
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||
}
|
||||
template class DebuggerL0Hw<GfxFamily>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = Xe2HpgCoreFamily;
|
||||
static auto gfxFamily = IGFX_XE2_HPG_CORE;
|
||||
|
||||
@@ -20,7 +20,7 @@ static auto gfxCore = IGFX_XE2_HPG_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<TbxCommandStreamReceiverHw<Family>>() {
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory));
|
||||
tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ static auto gfxCore = IGFX_XE3_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
|
||||
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ template class ImplicitFlushSettings<Family>;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ static auto coreFamily = IGFX_XE3_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||
extern DebugerL0CreateFn debuggerL0Factory[NEO::maxCoreEnumValue];
|
||||
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||
}
|
||||
template class DebuggerL0Hw<GfxFamily>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = Xe3CoreFamily;
|
||||
static auto gfxFamily = IGFX_XE3_CORE;
|
||||
|
||||
@@ -18,7 +18,7 @@ static auto gfxCore = IGFX_XE3_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<TbxCommandStreamReceiverHw<Family>>() {
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory));
|
||||
tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ static auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
|
||||
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ template class ImplicitFlushSettings<Family>;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,7 +18,7 @@ static auto coreFamily = IGFX_XE_HPC_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<DebuggerL0Hw<Family>>() {
|
||||
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||
extern DebugerL0CreateFn debuggerL0Factory[NEO::maxCoreEnumValue];
|
||||
debuggerL0Factory[coreFamily] = DebuggerL0Hw<Family>::allocate;
|
||||
}
|
||||
template class DebuggerL0Hw<Family>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = XeHpcCoreFamily;
|
||||
static auto gfxFamily = IGFX_XE_HPC_CORE;
|
||||
|
||||
@@ -20,7 +20,7 @@ static auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<TbxCommandStreamReceiverHw<Family>>() {
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory));
|
||||
tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ static auto gfxCore = IGFX_XE_HPG_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
|
||||
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ template class ImplicitFlushSettings<Family>;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,7 +18,7 @@ static auto coreFamily = IGFX_XE_HPG_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||
extern DebugerL0CreateFn debuggerL0Factory[NEO::maxCoreEnumValue];
|
||||
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||
}
|
||||
template class DebuggerL0Hw<GfxFamily>;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = XeHpgCoreFamily;
|
||||
static auto gfxFamily = IGFX_XE_HPG_CORE;
|
||||
|
||||
@@ -20,7 +20,7 @@ static auto gfxCore = IGFX_XE_HPG_CORE;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<TbxCommandStreamReceiverHw<Family>>() {
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory));
|
||||
tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
|
||||
namespace NEO {
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
template <class MockHelper>
|
||||
class RAIIGfxCoreHelperFactory {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
@@ -41,7 +41,7 @@ CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnviro
|
||||
}
|
||||
}
|
||||
|
||||
auto funcCreate = commandStreamReceiverFactory[IGFX_MAX_CORE + hwInfo->platform.eRenderCoreFamily];
|
||||
auto funcCreate = commandStreamReceiverFactory[NEO::maxCoreEnumValue + hwInfo->platform.eRenderCoreFamily];
|
||||
if (funcCreate) {
|
||||
return funcCreate(false, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,11 +16,11 @@ typedef Gen12LpFamily Family;
|
||||
|
||||
constexpr auto gfxCore = IGFX_GEN12LP_CORE;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
|
||||
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
commandStreamReceiverFactory[NEO::maxCoreEnumValue + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
struct EnableGen12LP {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,11 +15,11 @@ namespace NEO {
|
||||
using Family = Xe2HpgCoreFamily;
|
||||
constexpr auto gfxCore = IGFX_XE2_HPG_CORE;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
|
||||
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
commandStreamReceiverFactory[NEO::maxCoreEnumValue + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
struct EnableXe2HpgCore {
|
||||
|
||||
@@ -15,11 +15,11 @@ namespace NEO {
|
||||
using Family = Xe3CoreFamily;
|
||||
constexpr auto gfxCore = IGFX_XE3_CORE;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
|
||||
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
commandStreamReceiverFactory[NEO::maxCoreEnumValue + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
struct EnableXe3Core {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,11 +16,11 @@ typedef XeHpFamily Family;
|
||||
|
||||
constexpr auto gfxCore = IGFX_XE_HP_CORE;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
|
||||
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
commandStreamReceiverFactory[NEO::maxCoreEnumValue + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
struct enableXeHpCore {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,11 +16,11 @@ typedef XeHpcCoreFamily Family;
|
||||
|
||||
constexpr auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
|
||||
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
commandStreamReceiverFactory[NEO::maxCoreEnumValue + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
struct EnableXeHpcCore {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,11 +16,11 @@ typedef XeHpgCoreFamily Family;
|
||||
|
||||
constexpr auto gfxCore = IGFX_XE_HPG_CORE;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
|
||||
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
commandStreamReceiverFactory[NEO::maxCoreEnumValue + gfxCore] = UltCommandStreamReceiver<Family>::create;
|
||||
}
|
||||
|
||||
struct EnableXeHpgCore {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/test/common/mocks/mock_l0_debugger.h"
|
||||
|
||||
NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[IGFX_MAX_CORE];
|
||||
NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[NEO::maxCoreEnumValue];
|
||||
bool forceCreateNullptrDebugger = false;
|
||||
size_t createDebuggerCallCount = 0;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
using namespace NEO;
|
||||
|
||||
namespace NEO {
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[NEO::maxCoreEnumValue];
|
||||
} // namespace NEO
|
||||
|
||||
struct TbxFixture : public TbxCommandStreamFixture,
|
||||
|
||||
Reference in New Issue
Block a user