From d95417a6be4a13b7acb4b53c49a0eb5e55bb5f6e Mon Sep 17 00:00:00 2001 From: Basem Mohammed <95645899+Basemism@users.noreply.github.com> Date: Wed, 2 Sep 2026 11:43:11 +0200 Subject: [PATCH] configs: add configurable dGPU memory interleave locality Add --dgpu-mem-locality to express the number of adjacent cache lines assigned to a dGPU directory before moving to the next directory. Apply the selected granularity consistently to ordinary memory controllers and to both HBMCtrl interfaces. The default remains one cache line, preserving the existing address mapping. --- configs/example/gpufs/runfs.py | 7 +++++++ configs/ruby/GPU_VIPER.py | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 45c042a05f5..0fc3a326a29 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -123,6 +123,13 @@ def addRunFSOptions(parser): default=1, help="Set the number of dGPU directories (memory controllers", ) + parser.add_argument( + "--dgpu-mem-locality", + type=int, + default=1, + help="Interleaving granularity (in cache lines) per dGPU directory; " + "1 stripes memory across directories at cache-line granularity", + ) parser.add_argument( "--dgpu-mem-type", default="HBM_1000_4H_1x128", diff --git a/configs/ruby/GPU_VIPER.py b/configs/ruby/GPU_VIPER.py index 56d01b6d52e..2e465129e4d 100644 --- a/configs/ruby/GPU_VIPER.py +++ b/configs/ruby/GPU_VIPER.py @@ -697,7 +697,7 @@ def construct_gpudirs(options, system, ruby_system, network): gpu_mem_range, 2 * i, int(math.log(options.dgpu_num_dirs, 2)) + 1, - options.cacheline_size, + options.cacheline_size * options.dgpu_mem_locality, xor_low_bit, ) dram_intf_2 = MemConfig.create_mem_intf( @@ -705,7 +705,7 @@ def construct_gpudirs(options, system, ruby_system, network): gpu_mem_range, 2 * i + 1, int(math.log(options.dgpu_num_dirs, 2)) + 1, - options.cacheline_size, + options.cacheline_size * options.dgpu_mem_locality, xor_low_bit, ) else: @@ -714,7 +714,7 @@ def construct_gpudirs(options, system, ruby_system, network): gpu_mem_range, i, int(math.log(options.dgpu_num_dirs, 2)), - options.cacheline_size, + options.cacheline_size * options.dgpu_mem_locality, xor_low_bit, )