Skip to content

Commit

Permalink
fixing scratch buffer index
Browse files Browse the repository at this point in the history
  • Loading branch information
caiomcbr committed Dec 3, 2024
1 parent 02c2a46 commit 5f38d15
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions msccl/language/mscclpp/instruction_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5f38d15

Please sign in to comment.