configs: Add option for mem type for GPUFS

The user will likely want to be able to specify a different type of
memory for the GPU rather than using the same default for the CPU. Add
the option to do that.

Change-Id: I62c22f6283335c3ca3df355f8ecc4bbffa751a73
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58390
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Matthew Poremba
2022-03-30 12:20:26 -05:00
parent 4387321bed
commit c353b0522a
2 changed files with 4 additions and 2 deletions

View File

@@ -82,7 +82,9 @@ def addRunFSOptions(parser):
" size")
parser.add_argument("--dgpu-num-dirs", type=int, default=1, help="Set "
"the number of dGPU directories (memory controllers")
parser.add_argument("--dgpu-mem-type", default="HBM_1000_4H_1x128",
choices=ObjectList.mem_list.get_names(),
help="type of memory to use")
def runGpuFSSystem(args):
'''

View File

@@ -518,7 +518,7 @@ def construct_gpudirs(options, system, ruby_system, network):
dir_cntrl.responseFromMemory = MessageBuffer()
# Create memory controllers too
mem_type = ObjectList.mem_list.get(options.mem_type)
mem_type = ObjectList.mem_list.get(options.dgpu_mem_type)
dram_intf = MemConfig.create_mem_intf(mem_type, gpu_mem_range, i,
int(math.log(options.dgpu_num_dirs, 2)), options.cacheline_size,
xor_low_bit)