gpu-compute, mem-ruby, configs: Add GCN3 ISA support to GPU model
Change-Id: Ibe46970f3ba25d62ca2ade5cbc2054ad746b2254 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29912 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Anthony Gutierrez
parent
b0eac7857a
commit
b8da9abba7
@@ -3728,7 +3728,7 @@ namespace Gcn3ISA
|
||||
DPRINTF(GPUExec, "CU%d: decrease ref ctr WG[%d] to [%d]\n",
|
||||
wf->computeUnit->cu_id, wf->wgId, refCount);
|
||||
|
||||
wf->computeUnit->registerManager.freeRegisters(wf);
|
||||
wf->computeUnit->registerManager->freeRegisters(wf);
|
||||
wf->computeUnit->completedWfs++;
|
||||
wf->computeUnit->activeWaves--;
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Gcn3ISA
|
||||
*/
|
||||
bool misaligned_acc = split_addr > vaddr;
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, req_size, 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr, req_size, 0,
|
||||
gpuDynInst->computeUnit()->masterId(), 0,
|
||||
gpuDynInst->wfDynId);
|
||||
|
||||
@@ -208,7 +208,6 @@ namespace Gcn3ISA
|
||||
pkt2->dataStatic(gpuDynInst->scalar_data + req1->getSize());
|
||||
gpuDynInst->computeUnit()->sendScalarRequest(gpuDynInst, pkt1);
|
||||
gpuDynInst->computeUnit()->sendScalarRequest(gpuDynInst, pkt2);
|
||||
delete req;
|
||||
} else {
|
||||
gpuDynInst->numScalarReqs = 1;
|
||||
gpuDynInst->setRequestFlags(req);
|
||||
@@ -243,7 +242,7 @@ namespace Gcn3ISA
|
||||
*/
|
||||
bool misaligned_acc = split_addr > vaddr;
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, req_size, 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr, req_size, 0,
|
||||
gpuDynInst->computeUnit()->masterId(), 0,
|
||||
gpuDynInst->wfDynId);
|
||||
|
||||
@@ -259,7 +258,6 @@ namespace Gcn3ISA
|
||||
pkt2->dataStatic(gpuDynInst->scalar_data + req1->getSize());
|
||||
gpuDynInst->computeUnit()->sendScalarRequest(gpuDynInst, pkt1);
|
||||
gpuDynInst->computeUnit()->sendScalarRequest(gpuDynInst, pkt2);
|
||||
delete req;
|
||||
} else {
|
||||
gpuDynInst->numScalarReqs = 1;
|
||||
gpuDynInst->setRequestFlags(req);
|
||||
@@ -574,7 +572,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, sizeof(T), 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr,
|
||||
sizeof(T), 0,
|
||||
gpuDynInst->computeUnit()->masterId(), 0,
|
||||
gpuDynInst->wfDynId);
|
||||
|
||||
@@ -600,7 +599,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, sizeof(T), 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr,
|
||||
sizeof(T), 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
|
||||
@@ -619,7 +619,7 @@ namespace Gcn3ISA
|
||||
{
|
||||
// create request and set flags
|
||||
gpuDynInst->statusBitVector = VectorMask(1);
|
||||
Request *req = new Request(0, 0, 0, 0,
|
||||
RequestPtr req = std::make_shared<Request>(0, 0, 0,
|
||||
gpuDynInst->computeUnit()->
|
||||
masterId(), 0,
|
||||
gpuDynInst->wfDynId);
|
||||
@@ -777,7 +777,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, sizeof(T), 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr,
|
||||
sizeof(T), 0,
|
||||
gpuDynInst->computeUnit()->masterId(), 0,
|
||||
gpuDynInst->wfDynId);
|
||||
|
||||
@@ -802,7 +803,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, req_size, 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr, req_size,
|
||||
0,
|
||||
gpuDynInst->computeUnit()->masterId(), 0,
|
||||
gpuDynInst->wfDynId);
|
||||
|
||||
@@ -826,7 +828,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, sizeof(T), 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr,
|
||||
sizeof(T), 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
|
||||
@@ -851,7 +854,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, req_size, 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr, req_size,
|
||||
0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
|
||||
@@ -875,7 +879,8 @@ namespace Gcn3ISA
|
||||
if (gpuDynInst->exec_mask[lane]) {
|
||||
Addr vaddr = gpuDynInst->addr[lane];
|
||||
|
||||
RequestPtr req = new Request(0, vaddr, sizeof(T), 0,
|
||||
RequestPtr req = std::make_shared<Request>(vaddr,
|
||||
sizeof(T), 0,
|
||||
gpuDynInst->computeUnit()->masterId(), 0,
|
||||
gpuDynInst->wfDynId,
|
||||
gpuDynInst->makeAtomicOpFunctor<T>(
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace Gcn3ISA
|
||||
ComputeUnit *cu = _gpuDynInst->computeUnit();
|
||||
|
||||
for (auto i = 0; i < NumDwords; ++i) {
|
||||
int vgprIdx = cu->registerManager.mapVgpr(wf, _opIdx + i);
|
||||
int vgprIdx = cu->registerManager->mapVgpr(wf, _opIdx + i);
|
||||
vrfData[i] = &cu->vrf[wf->simdId]->readWriteable(vgprIdx);
|
||||
|
||||
DPRINTF(GPUVRF, "Read v[%d]\n", vgprIdx);
|
||||
@@ -207,7 +207,7 @@ namespace Gcn3ISA
|
||||
? _gpuDynInst->exec_mask : wf->execMask();
|
||||
|
||||
if (NumDwords == 1) {
|
||||
int vgprIdx = cu->registerManager.mapVgpr(wf, _opIdx);
|
||||
int vgprIdx = cu->registerManager->mapVgpr(wf, _opIdx);
|
||||
vrfData[0] = &cu->vrf[wf->simdId]->readWriteable(vgprIdx);
|
||||
assert(vrfData[0]);
|
||||
auto reg_file_vgpr = vrfData[0]->template as<VecElemU32>();
|
||||
@@ -223,8 +223,8 @@ namespace Gcn3ISA
|
||||
DPRINTF(GPUVRF, "Write v[%d]\n", vgprIdx);
|
||||
cu->vrf[wf->simdId]->printReg(wf, vgprIdx);
|
||||
} else if (NumDwords == 2) {
|
||||
int vgprIdx0 = cu->registerManager.mapVgpr(wf, _opIdx);
|
||||
int vgprIdx1 = cu->registerManager.mapVgpr(wf, _opIdx + 1);
|
||||
int vgprIdx0 = cu->registerManager->mapVgpr(wf, _opIdx);
|
||||
int vgprIdx1 = cu->registerManager->mapVgpr(wf, _opIdx + 1);
|
||||
vrfData[0] = &cu->vrf[wf->simdId]->readWriteable(vgprIdx0);
|
||||
vrfData[1] = &cu->vrf[wf->simdId]->readWriteable(vgprIdx1);
|
||||
assert(vrfData[0]);
|
||||
@@ -605,16 +605,16 @@ namespace Gcn3ISA
|
||||
|
||||
if (_opIdx == REG_VCC_LO) {
|
||||
sgprIdx = cu->registerManager
|
||||
.mapSgpr(wf, wf->reservedScalarRegs - 2 + dword);
|
||||
->mapSgpr(wf, wf->reservedScalarRegs - 2 + dword);
|
||||
} else if (_opIdx == REG_FLAT_SCRATCH_HI) {
|
||||
sgprIdx = cu->registerManager
|
||||
.mapSgpr(wf, wf->reservedScalarRegs - 3 + dword);
|
||||
->mapSgpr(wf, wf->reservedScalarRegs - 3 + dword);
|
||||
} else if (_opIdx == REG_FLAT_SCRATCH_LO) {
|
||||
assert(NumDwords == 1);
|
||||
sgprIdx = cu->registerManager
|
||||
.mapSgpr(wf, wf->reservedScalarRegs - 4 + dword);
|
||||
->mapSgpr(wf, wf->reservedScalarRegs - 4 + dword);
|
||||
} else {
|
||||
sgprIdx = cu->registerManager.mapSgpr(wf, _opIdx + dword);
|
||||
sgprIdx = cu->registerManager->mapSgpr(wf, _opIdx + dword);
|
||||
}
|
||||
|
||||
assert(sgprIdx > -1);
|
||||
|
||||
Reference in New Issue
Block a user