Skip to content

Commit

Permalink
easy: sort dictionary keys for inductor config when publishing (#143307)
Browse files Browse the repository at this point in the history
Summary:
This means we should get consistent logging strings for the same
config on different ranks

X-link: pytorch/pytorch#143307
Approved by: https://github.com/xmfan

Reviewed By: clee2000

Differential Revision: D67985940

Pulled By: c00w

fbshipit-source-id: 0754fcc6d49b5768ffc34f12b1e693c65624cda8
  • Loading branch information
c00w authored and facebook-github-bot committed Jan 10, 2025
1 parent af94f0e commit e7f85d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,10 @@ def default(self, o):
del inductor_config_copy[key]
# Stringify Inductor config
inductor_conf_str = json.dumps(
inductor_config_copy, cls=TypeSafeSerializer, skipkeys=True
inductor_config_copy,
cls=TypeSafeSerializer,
skipkeys=True,
sort_keys=True,
)
except Exception:
# Don't crash because of runtime logging errors
Expand Down

0 comments on commit e7f85d2

Please sign in to comment.