36#include "config/the_gpu_isa.hh"
37#include "debug/GPURename.hh"
43#include "params/RegisterManager.hh"
52 if (
p.policy ==
"static") {
53 policy = new StaticRegisterManagerPolicy();
55 fatal(
"Unimplemented Register Manager Policy");
84 "Min SGPR allocation is not multiple of VRF size\n");
89 "Min VGPG allocation is not multiple of VRF size\n");
97 return policy->mapVgpr(
w, vgprIndex);
104 return policy->mapSgpr(
w, sgprIndex);
111 return policy->canAllocateVgprs(simdId, nWfs, demandPerWf);
117 return policy->canAllocateSgprs(simdId, nWfs, demandPerWf);
125 policy->allocateRegisters(
w, vectorDemand, scalarDemand);
int mapVgpr(Wavefront *w, int vgprIndex)
RegisterManager(const RegisterManagerParams ¶ms)
void allocateRegisters(Wavefront *w, int vectorDemand, int scalarDemand)
void freeRegisters(Wavefront *w)
std::vector< PoolManager * > vrfPoolMgrs
RegisterManagerPolicy * policy
int mapSgpr(Wavefront *w, int sgprIndex)
ComputeUnit * computeUnit
bool canAllocateSgprs(int simdId, int nWfs, int demandPerWf)
std::vector< PoolManager * > srfPoolMgrs
bool canAllocateVgprs(int simdId, int nWfs, int demandPerWf)
void setParent(ComputeUnit *cu)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
SimObject(const Params &p)
Copyright (c) 2024 Arm Limited All rights reserved.