refactor: move builtinOpsBuilders from ClExecutionEnvironment to ClDevice

Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwoliński
2025-11-07 09:36:19 +00:00
committed by Compute-Runtime-Automation
parent 48c11c24ff
commit 5abdcc045e
23 changed files with 82 additions and 126 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -7,7 +7,6 @@
#include "opencl/source/execution_environment/cl_execution_environment.h"
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
#include "opencl/source/event/async_events_handler.h"
namespace NEO {
@@ -25,9 +24,5 @@ ClExecutionEnvironment::~ClExecutionEnvironment() {
};
void ClExecutionEnvironment::prepareRootDeviceEnvironments(uint32_t numRootDevices) {
ExecutionEnvironment::prepareRootDeviceEnvironments(numRootDevices);
builtinOpsBuilders.resize(numRootDevices);
for (auto i = 0u; i < numRootDevices; i++) {
builtinOpsBuilders[i] = std::make_unique<BuilderT[]>(EBuiltInOps::count);
}
}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -23,11 +23,8 @@ class ClExecutionEnvironment : public ExecutionEnvironment {
AsyncEventsHandler *getAsyncEventsHandler() const;
~ClExecutionEnvironment() override;
void prepareRootDeviceEnvironments(uint32_t numRootDevices) override;
using BuilderT = std::pair<std::unique_ptr<BuiltinDispatchInfoBuilder>, std::once_flag>;
BuilderT *peekBuilders(uint32_t rootDeviceIndex) { return builtinOpsBuilders[rootDeviceIndex].get(); }
protected:
std::vector<std::unique_ptr<BuilderT[]>> builtinOpsBuilders;
std::unique_ptr<AsyncEventsHandler> asyncEventsHandler;
};
} // namespace NEO