mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Add support for queue groups (1/N)
Change-Id: If4763dcb749acc8a6fd68714119808286306410f Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "engine_node.h"
|
||||
|
||||
namespace NEO {
|
||||
class CommandStreamReceiver;
|
||||
@@ -14,9 +15,12 @@ class OsContext;
|
||||
struct EngineControl {
|
||||
EngineControl() = default;
|
||||
EngineControl(CommandStreamReceiver *commandStreamReceiver, OsContext *osContext)
|
||||
: commandStreamReceiver(commandStreamReceiver), osContext(osContext){};
|
||||
: commandStreamReceiver(commandStreamReceiver),
|
||||
osContext(osContext),
|
||||
engineType(aub_stream::EngineType::ENGINE_RCS){};
|
||||
|
||||
CommandStreamReceiver *commandStreamReceiver = nullptr;
|
||||
OsContext *osContext = nullptr;
|
||||
aub_stream::EngineType engineType;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -35,6 +35,13 @@ enum class LocalMemoryAccessMode {
|
||||
CpuAccessDisallowed = 3
|
||||
};
|
||||
|
||||
enum class EngineGroupType : uint32_t {
|
||||
RenderCompute = 0,
|
||||
Compute,
|
||||
Copy,
|
||||
MaxEngineGroups
|
||||
};
|
||||
|
||||
class HwHelper {
|
||||
public:
|
||||
using EngineInstancesContainer = StackVec<aub_stream::EngineType, 32>;
|
||||
@@ -81,6 +88,8 @@ class HwHelper {
|
||||
bool forceNonAuxMode,
|
||||
bool useL1Cache) = 0;
|
||||
virtual const EngineInstancesContainer getGpgpuEngineInstances(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual void addEngineToEngineGroup(std::vector<std::vector<EngineControl>> &engineGroups,
|
||||
EngineControl &engine, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual const StackVec<size_t, 3> getDeviceSubGroupSizes() const = 0;
|
||||
virtual const StackVec<uint32_t, 6> getThreadsPerEUConfigs() const = 0;
|
||||
virtual bool getEnableLocalMemory(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -230,6 +239,9 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
const EngineInstancesContainer getGpgpuEngineInstances(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
void addEngineToEngineGroup(std::vector<std::vector<EngineControl>> &engineGroups,
|
||||
EngineControl &engine, const HardwareInfo &hwInfo) const override;
|
||||
|
||||
const StackVec<size_t, 3> getDeviceSubGroupSizes() const override;
|
||||
|
||||
const StackVec<uint32_t, 6> getThreadsPerEUConfigs() const override;
|
||||
|
||||
@@ -57,6 +57,12 @@ const HwHelper::EngineInstancesContainer HwHelperHw<GfxFamily>::getGpgpuEngineIn
|
||||
aub_stream::ENGINE_RCS}; // internal usage
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void HwHelperHw<GfxFamily>::addEngineToEngineGroup(std::vector<std::vector<EngineControl>> &engineGroups,
|
||||
EngineControl &engine, const HardwareInfo &hwInfo) const {
|
||||
engineGroups[static_cast<uint32_t>(EngineGroupType::RenderCompute)].push_back(engine);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
std::string HwHelperHw<GfxFamily>::getExtensions() const {
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user