dev-amdgpu,configs,gpu-compute: Add gfx942 version
This is the version for MI300. For the most part, it is the same as MI200 with the exception of architected flat scratch (not yet implemented in gem5) and therefore a new version enum is required. Change-Id: Id18cd7b57c4eebd467c010a3f61e3117beb8d58a
This commit is contained in:
@@ -45,7 +45,7 @@ class PrefetchType(Enum):
|
||||
|
||||
|
||||
class GfxVersion(ScopedEnum):
|
||||
vals = ["gfx900", "gfx902", "gfx908", "gfx90a"]
|
||||
vals = ["gfx900", "gfx902", "gfx908", "gfx90a", "gfx942"]
|
||||
|
||||
|
||||
class PoolManager(SimObject):
|
||||
|
||||
@@ -94,9 +94,10 @@ class HSAQueueEntry
|
||||
// LLVM docs: https://www.llvm.org/docs/AMDGPUUsage.html
|
||||
// #code-object-v3-kernel-descriptor
|
||||
//
|
||||
// Currently, the only supported gfx version in gem5 that computes
|
||||
// VGPR count differently is gfx90a.
|
||||
if (gfx_version == GfxVersion::gfx90a) {
|
||||
// Currently, the only supported gfx versions in gem5 that compute
|
||||
// VGPR count differently are gfx90a and gfx942.
|
||||
if (gfx_version == GfxVersion::gfx90a ||
|
||||
gfx_version == GfxVersion::gfx942) {
|
||||
numVgprs = (akc->granulated_workitem_vgpr_count + 1) * 8;
|
||||
} else {
|
||||
numVgprs = (akc->granulated_workitem_vgpr_count + 1) * 4;
|
||||
@@ -107,7 +108,8 @@ class HSAQueueEntry
|
||||
if (gfx_version == GfxVersion::gfx900 ||
|
||||
gfx_version == GfxVersion::gfx902 ||
|
||||
gfx_version == GfxVersion::gfx908 ||
|
||||
gfx_version == GfxVersion::gfx90a) {
|
||||
gfx_version == GfxVersion::gfx90a ||
|
||||
gfx_version == GfxVersion::gfx942) {
|
||||
numSgprs = ((akc->granulated_wavefront_sgpr_count + 1) * 16)/2;
|
||||
} else {
|
||||
panic("Saw unknown gfx version setting up GPR counts\n");
|
||||
|
||||
@@ -442,7 +442,8 @@ Wavefront::initRegState(HSAQueueEntry *task, int wgSizeInWorkItems)
|
||||
// Default to false and set to true for gem5 supported ISAs.
|
||||
bool packed_work_item_id = false;
|
||||
|
||||
if (task->gfxVersion() == GfxVersion::gfx90a) {
|
||||
if (task->gfxVersion() == GfxVersion::gfx90a ||
|
||||
task->gfxVersion() == GfxVersion::gfx942) {
|
||||
packed_work_item_id = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user