Skip to content

Commit f18ef65

Browse files
committed
remove randomness when generating json file
1 parent e786c9c commit f18ef65

File tree

1 file changed

+3
-1
lines changed
  • python/mscclpp/language

1 file changed

+3
-1
lines changed

Diff for: python/mscclpp/language/ir.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ class _NopConverter(_OpConverter):
331331
def to_json(self, op: Op, tb_channel_dict: dict) -> _JsonInstruction:
332332
return _JsonInstruction(
333333
name=op.inst.value,
334-
deps=list(map(lambda dep: {"tb": dep.tb, "step": dep.step}, op.depends)),
334+
deps=sorted(
335+
list(map(lambda dep: {"tb": dep.tb, "step": dep.step}, op.depends)), key=lambda x: (x["tb"], x["step"])
336+
),
335337
)
336338

337339

0 commit comments

Comments
 (0)