From 5f38d15c78653bd90586730caa989531db09b1c9 Mon Sep 17 00:00:00 2001 From: Caio Date: Tue, 3 Dec 2024 20:37:55 +0000 Subject: [PATCH] fixing scratch buffer index --- msccl/language/mscclpp/instruction_dag.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/msccl/language/mscclpp/instruction_dag.py b/msccl/language/mscclpp/instruction_dag.py index ada856e..749587a 100644 --- a/msccl/language/mscclpp/instruction_dag.py +++ b/msccl/language/mscclpp/instruction_dag.py @@ -487,11 +487,7 @@ def is_scratch(buffer): return buffer != Buffer.input and buffer != Buffer.output def get_new_index(rank, buffer, index, size, i): - # Scratch buffers always use batched - if is_scratch(buffer): - buf_instance_len = self.buffers[rank][buffer].instance_size() - return buf_instance_len * i + index - elif replication_policy == ReplicationPolicy.interleaved: + if replication_policy == ReplicationPolicy.interleaved: return index * instances + i * size return len(self.buffers[rank][buffer]) * i + index