From 24187fcded8a41691ba28ff32d567d27b6fae25e Mon Sep 17 00:00:00 2001 From: Empyreus Date: Thu, 18 Jun 2026 00:01:41 +0000 Subject: [PATCH] use .to_dict() --- python/mscclpp/language/channel.py | 4 ++-- python/mscclpp/language/internal/operations.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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} ]