diff --git a/python/mscclpp/language/channel.py b/python/mscclpp/language/channel.py index 34aa3efb..6f54c587 100644 --- a/python/mscclpp/language/channel.py +++ b/python/mscclpp/language/channel.py @@ -984,10 +984,10 @@ class SwitchChannel: self.src_rank = rank if src_chunk.rank not in self.rank_group.ranks: raise RuntimeError( - f"Destination chunk rank {src_chunk.rank} is not part of the rank group {self.rank_group.ranks}." + f"Source chunk rank {src_chunk.rank} is not part of the rank group {self.rank_group.ranks}." ) if src_chunk.size != size: - raise RuntimeError(f"Destination chunk size {src_chunk.size} does not match the required size {size}.") + raise RuntimeError(f"Source chunk size {src_chunk.size} does not match the required size {size}.") for rank in self.rank_group.ranks: if self.buffer_type == BufferType.scratch: diff --git a/python/mscclpp/language/internal/operations.py b/python/mscclpp/language/internal/operations.py index f1079345..9526e28b 100644 --- a/python/mscclpp/language/internal/operations.py +++ b/python/mscclpp/language/internal/operations.py @@ -926,7 +926,7 @@ class GroupStore(BaseOperation): def to_dict(self): result = {"name": self.name.value} - result["src_buff"] = [{"type": self.src_chunk.buffer.value, "index": self.src_chunk.index, "size": self.size}] + result["src_buff"] = [self.src_chunk.to_dict()] result["dst_buff"] = [ {"switch_channel_id": self.channel_ids[0], "index": self.buffer_offset, "size": self.size} ] @@ -958,7 +958,7 @@ class GroupStorePacket(BaseOperation): def to_dict(self): result = {"name": self.name.value} - result["src_buff"] = [{"type": self.src_chunk.buffer.value, "index": self.src_chunk.index, "size": self.size}] + result["src_buff"] = [self.src_chunk.to_dict()] result["dst_buff"] = [ {"switch_channel_id": self.channel_ids[0], "index": self.buffer_offset, "size": self.size} ]