Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize cluster into yaml #499

Merged
merged 4 commits into from
Feb 25, 2025
Merged

Serialize cluster into yaml #499

merged 4 commits into from
Feb 25, 2025

Conversation

pjanevskiTT
Copy link
Contributor

@pjanevskiTT pjanevskiTT commented Feb 3, 2025

Issue

Solving part of #431

Description

Add a function to serialize cluster to the yaml (reverse of what we were doing so far). Add flag to all Cluster constructors to create mock chips inside Cluster if user wants that. Expose this (de)serializing through the API as mentioned in the issue above. Output yaml look like (note the styling difference than original, but in YAML world it is the same)

arch:
  1: wormhole_b0
  0: wormhole_b0
ethernet_connections:
  -
    - chip: 1
      chan: 1
    - chip: 0
      chan: 9
  -
    - chip: 1
      chan: 0
    - chip: 0
      chan: 8
chips_with_mmio:
  - 0: 0
harvesting:
  1:
    noc_translation: true
    harvest_mask: 513
  0:
    noc_translation: true
    harvest_mask: 129
boardtype:
  1: n300
  0: n300 

List of the changes

  • Add serialize function to Cluster (public)
  • Add serialize function cluste descriptor (not public)
  • Add flag to all Cluster constructors to create mock chips
  • Add a test

Testing

CI + new test

API Changes

Added create_mock_chips to Cluster constuctors, but changes not needed in UMD clients.

@pjanevskiTT pjanevskiTT requested a review from broskoTT February 3, 2025 17:34
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/cluster_yaml branch from e0749a5 to 41c8d58 Compare February 3, 2025 17:42
@pjanevskiTT
Copy link
Contributor Author

@cfjchu can you check whether this API would satisfy your requirements. Next step is going to be expanding cluster yaml with all the info needed. But I think we can fix the API now

@pjanevskiTT pjanevskiTT force-pushed the pjanevski/blackhole_topology branch 3 times, most recently from 6822c66 to cb26441 Compare February 6, 2025 12:47
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/cluster_yaml branch from 6249054 to c43a604 Compare February 6, 2025 13:10
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/blackhole_topology branch from cb26441 to 2e367b4 Compare February 7, 2025 09:34
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/cluster_yaml branch from c43a604 to 9be4d6b Compare February 7, 2025 12:46
@pjanevskiTT
Copy link
Contributor Author

pjanevskiTT commented Feb 7, 2025

@broskoTT fyi, skip_driver_allocs had the same purpose as create_mock_chips. I renamed it and fixed few bugs which we had when creating mock chips. You can take a look at 516d5ec if you want

@pjanevskiTT pjanevskiTT force-pushed the pjanevski/cluster_yaml branch from 516d5ec to 9e28d05 Compare February 7, 2025 14:33
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/blackhole_topology branch from bbd4ed8 to 1ef9383 Compare February 7, 2025 20:41
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/blackhole_topology branch from a145bf6 to add80a7 Compare February 14, 2025 22:47
Base automatically changed from pjanevski/blackhole_topology to main February 14, 2025 23:03
@pjanevskiTT pjanevskiTT force-pushed the pjanevski/cluster_yaml branch from 9e28d05 to 353ed96 Compare February 25, 2025 13:17
@pjanevskiTT pjanevskiTT merged commit 472ef2f into main Feb 25, 2025
17 of 20 checks passed
@pjanevskiTT pjanevskiTT deleted the pjanevski/cluster_yaml branch February 25, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants