mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +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
@@ -15,7 +15,7 @@ L0::L0GfxCoreHelper &NEO::RootDeviceEnvironment::getHelper<L0::L0GfxCoreHelper>(
|
||||
|
||||
namespace L0 {
|
||||
|
||||
createL0GfxCoreHelperFunctionType l0GfxCoreHelperFactory[IGFX_MAX_CORE] = {};
|
||||
createL0GfxCoreHelperFunctionType l0GfxCoreHelperFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
std::unique_ptr<L0GfxCoreHelper> L0GfxCoreHelper::create(GFXCORE_FAMILY gfxCore) {
|
||||
auto createL0GfxCoreHelperFunc = l0GfxCoreHelperFactory[gfxCore];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<L0GfxCoreHelperHw<Family>>() {
|
||||
extern createL0GfxCoreHelperFunctionType l0GfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern createL0GfxCoreHelperFunctionType l0GfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
l0GfxCoreHelperFactory[gfxCore] = L0GfxCoreHelperHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace NEO {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
} // namespace NEO
|
||||
|
||||
namespace L0 {
|
||||
@@ -23,7 +23,7 @@ namespace ult {
|
||||
struct AubCsrFixture : public DeviceFixture {
|
||||
template <typename T>
|
||||
void setUpT() {
|
||||
auto csrCreateFcn = &commandStreamReceiverFactory[IGFX_MAX_CORE + NEO::defaultHwInfo->platform.eRenderCoreFamily];
|
||||
auto csrCreateFcn = &commandStreamReceiverFactory[NEO::maxCoreEnumValue + NEO::defaultHwInfo->platform.eRenderCoreFamily];
|
||||
variableBackup = std::make_unique<VariableBackup<CommandStreamReceiverCreateFunc>>(csrCreateFcn);
|
||||
*csrCreateFcn = UltAubCommandStreamReceiver<T>::create;
|
||||
DeviceFixture::setUp();
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#include <memory>
|
||||
|
||||
namespace NEO {
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
} // namespace NEO
|
||||
|
||||
namespace L0 {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
namespace NEO {
|
||||
|
||||
// Global table of create functions
|
||||
CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE] = {};
|
||||
CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
CommandQueue *CommandQueue::create(Context *context,
|
||||
ClDevice *device,
|
||||
|
||||
@@ -32,7 +32,7 @@ bool CommandQueueHw<GfxFamily>::isCacheFlushCommand(uint32_t commandType) const
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
extern CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ bool GTPinGfxCoreHelperHw<GfxFamily>::canUseSharedAllocation(const HardwareInfo
|
||||
return canUseSharedAllocation;
|
||||
}
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
typedef Gen12LpFamily Family;
|
||||
static const auto gfxFamily = IGFX_GEN12LP_CORE;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE] = {};
|
||||
GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
std::unique_ptr<GTPinGfxCoreHelper> GTPinGfxCoreHelper::create(GFXCORE_FAMILY gfxCore) {
|
||||
auto createFunction = gtpinGfxCoreHelperFactory[gfxCore];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[IGFX_MAX_CORE] = {};
|
||||
createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
std::unique_ptr<ClGfxCoreHelper> ClGfxCoreHelper::create(GFXCORE_FAMILY gfxCore) {
|
||||
auto createClGfxCoreHelperFunc = clGfxCoreHelperFactory[gfxCore];
|
||||
|
||||
@@ -80,6 +80,6 @@ class ClGfxCoreHelperHw : public ClGfxCoreHelper {
|
||||
ClGfxCoreHelperHw() = default;
|
||||
};
|
||||
|
||||
extern createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<ClGfxCoreHelperHw<Family>>() {
|
||||
extern createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
clGfxCoreHelperFactory[gfxCore] = ClGfxCoreHelperHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
BufferFactoryFuncs bufferFactory[IGFX_MAX_CORE] = {};
|
||||
BufferFactoryFuncs bufferFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
namespace BufferFunctions {
|
||||
ValidateInputAndCreateBufferFunc validateInputAndCreateBuffer = Buffer::validateInputAndCreateBuffer;
|
||||
|
||||
@@ -42,7 +42,7 @@ struct BufferFactoryFuncs {
|
||||
BufferCreateFunc createBufferFunction;
|
||||
};
|
||||
|
||||
extern BufferFactoryFuncs bufferFactory[IGFX_MAX_CORE];
|
||||
extern BufferFactoryFuncs bufferFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
namespace BufferFunctions {
|
||||
using ValidateInputAndCreateBufferFunc = std::function<cl_mem(cl_context context,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<BufferHw<Family>>() {
|
||||
extern BufferFactoryFuncs bufferFactory[IGFX_MAX_CORE];
|
||||
extern BufferFactoryFuncs bufferFactory[NEO::maxCoreEnumValue];
|
||||
bufferFactory[gfxCore].createBufferFunction = BufferHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
ImageFactoryFuncs imageFactory[IGFX_MAX_CORE] = {};
|
||||
ImageFactoryFuncs imageFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
namespace ImageFunctions {
|
||||
ValidateAndCreateImageFunc validateAndCreateImage = Image::validateAndCreateImage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,7 +10,7 @@ namespace NEO {
|
||||
template class ImageHw<Family>;
|
||||
template <>
|
||||
void populateFactoryTable<ImageHw<Family>>() {
|
||||
extern ImageFactoryFuncs imageFactory[IGFX_MAX_CORE];
|
||||
extern ImageFactoryFuncs imageFactory[NEO::maxCoreEnumValue];
|
||||
imageFactory[gfxCore].createImageFunction = ImageHw<Family>::create;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
SamplerCreateFunc samplerFactory[IGFX_MAX_CORE] = {};
|
||||
SamplerCreateFunc samplerFactory[NEO::maxCoreEnumValue] = {};
|
||||
|
||||
Sampler::Sampler(Context *context, cl_bool normalizedCoordinates,
|
||||
cl_addressing_mode addressingMode, cl_filter_mode filterMode,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,6 +12,6 @@
|
||||
template struct SamplerHw<Family>;
|
||||
template <>
|
||||
void populateFactoryTable<SamplerHw<Family>>() {
|
||||
extern SamplerCreateFunc samplerFactory[IGFX_MAX_CORE];
|
||||
extern SamplerCreateFunc samplerFactory[NEO::maxCoreEnumValue];
|
||||
samplerFactory[gfxCore] = SamplerHw<Family>::create;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace NEO {
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
extern CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<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 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = Xe2HpgCoreFamily;
|
||||
static const auto gfxFamily = IGFX_XE2_HPG_CORE;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace NEO {
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
extern CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = Xe3CoreFamily;
|
||||
static const auto gfxFamily = IGFX_XE3_CORE;
|
||||
|
||||
@@ -23,7 +23,7 @@ static auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
namespace NEO {
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
extern CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
using Family = XeHpcCoreFamily;
|
||||
static const auto gfxFamily = IGFX_XE_HPC_CORE;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -23,7 +23,7 @@ static auto gfxCore = IGFX_XE_HPG_CORE;
|
||||
namespace NEO {
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
extern CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
typedef XeHpgCoreFamily Family;
|
||||
static const auto gfxFamily = IGFX_XE_HPG_CORE;
|
||||
|
||||
@@ -29,7 +29,7 @@ struct BatchBuffer;
|
||||
template <typename GfxFamily>
|
||||
class MockCommandQueueHw;
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
using BlitAuxTranslationTests = BlitEnqueueTests<1>;
|
||||
|
||||
@@ -1128,7 +1128,7 @@ struct BlitEnqueueFlushTests : public BlitEnqueueTests<1> {
|
||||
|
||||
template <typename T>
|
||||
void setUpT() {
|
||||
auto csrCreateFcn = &commandStreamReceiverFactory[IGFX_MAX_CORE + defaultHwInfo->platform.eRenderCoreFamily];
|
||||
auto csrCreateFcn = &commandStreamReceiverFactory[NEO::maxCoreEnumValue + defaultHwInfo->platform.eRenderCoreFamily];
|
||||
variableBackup = std::make_unique<VariableBackup<CommandStreamReceiverCreateFunc>>(csrCreateFcn);
|
||||
*csrCreateFcn = MyUltCsr<T>::create;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace NEO {
|
||||
|
||||
// Global table of create functions
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
extern CommandQueueCreateFunc commandQueueFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
CommandQueue *CommandQueueHwFixture::createCommandQueue(
|
||||
ClDevice *pDevice,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
|
||||
namespace NEO {
|
||||
extern ImageFactoryFuncs imageFactory[IGFX_MAX_CORE];
|
||||
extern ImageFactoryFuncs imageFactory[NEO::maxCoreEnumValue];
|
||||
|
||||
struct MultipleMapImageTest : public ClDeviceFixture, public ::testing::Test {
|
||||
template <typename T>
|
||||
|
||||
@@ -62,7 +62,7 @@ using namespace gtpin;
|
||||
|
||||
namespace NEO {
|
||||
extern std::deque<gtpinkexec_t> kernelExecQueue;
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
} // namespace NEO
|
||||
|
||||
namespace ULT {
|
||||
|
||||
@@ -926,9 +926,9 @@ TEST_P(NoHostPtr, GivenValidFlagsWhenCreatingBufferThenBufferIsCreated) {
|
||||
}
|
||||
|
||||
TEST_P(NoHostPtr, GivenNoHostPtrWhenHwBufferCreationFailsThenReturnNullptr) {
|
||||
BufferFactoryFuncs bufferFuncsBackup[IGFX_MAX_CORE];
|
||||
BufferFactoryFuncs bufferFuncsBackup[NEO::maxCoreEnumValue];
|
||||
|
||||
for (uint32_t i = 0; i < IGFX_MAX_CORE; i++) {
|
||||
for (uint32_t i = 0; i < NEO::maxCoreEnumValue; i++) {
|
||||
bufferFuncsBackup[i] = bufferFactory[i];
|
||||
bufferFactory[i].createBufferFunction =
|
||||
[](Context *,
|
||||
@@ -954,7 +954,7 @@ TEST_P(NoHostPtr, GivenNoHostPtrWhenHwBufferCreationFailsThenReturnNullptr) {
|
||||
|
||||
EXPECT_EQ(nullptr, buffer);
|
||||
|
||||
for (uint32_t i = 0; i < IGFX_MAX_CORE; i++) {
|
||||
for (uint32_t i = 0; i < NEO::maxCoreEnumValue; i++) {
|
||||
bufferFactory[i] = bufferFuncsBackup[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
using namespace NEO;
|
||||
|
||||
namespace NEO {
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[NEO::maxCoreEnumValue];
|
||||
}
|
||||
|
||||
// Tests for cl_khr_image2d_from_buffer
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_image.h"
|
||||
|
||||
namespace NEO {
|
||||
extern ImageFactoryFuncs imageFactory[IGFX_MAX_CORE];
|
||||
extern ImageFactoryFuncs imageFactory[NEO::maxCoreEnumValue];
|
||||
}
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -292,7 +292,7 @@ TEST_F(IgaWrapperTest, GivenIgcWrapperWhenLoadingLibraryTwiceWithPathChangeInThe
|
||||
|
||||
TEST_F(IgaWrapperTest, GivenIgcWrapperWhenCallingSetGfxCoreMultipleTimesThenFirstValidGfxCoreFamilyIsPreserved) {
|
||||
ASSERT_FALSE(testedIgaWrapper.isKnownPlatform());
|
||||
constexpr auto invalidGfxCoreFamily = IGFX_MAX_CORE;
|
||||
constexpr auto invalidGfxCoreFamily = NEO::maxCoreEnumValue;
|
||||
|
||||
testedIgaWrapper.setGfxCore(invalidGfxCoreFamily);
|
||||
EXPECT_FALSE(testedIgaWrapper.isKnownPlatform());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -32,7 +32,7 @@ namespace SysCalls {
|
||||
extern const wchar_t *currentLibraryPath;
|
||||
}
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
|
||||
@@ -221,7 +221,7 @@ TEST(PlatformTestSimple, WhenConvertingOclCFeaturesToCompilerInternalOptionsThen
|
||||
}
|
||||
|
||||
namespace NEO {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * NEO::maxCoreEnumValue];
|
||||
}
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump,
|
||||
|
||||
@@ -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