tenstorrent / model-explorer

A modern model graph visualizer and debugger
Apache License 2.0
0 stars 0 forks source link

Prototype for optimization policy feature #7

Closed madcampos closed 2 weeks ago

madcampos commented 3 weeks ago

To show optimization policies, the backend has to send, along with the graphs for the get_extensions command the settings property, containing the optimizationPolicies list.

Like this:

[
  {
    "id": "tt_adapter",
    "name": "Tenstorrent Adapter",
    "description": "Prototype adapter from TT BUDA to Model Explorer",
    "source_repo": "https://github.com/vprajapati-tt/tt-explorer",
    "fileExts": [
      "ttir",
      "mlir"
    ],
    "type": "adapter",
    "settings": {
      "optimizationPolicies": ["a", "b", "c"]
    }
  }
]

Then the UI will list that close to the execute button along with a dropdown with the existing execution policies.

image

The selected policy will be sent with the execute command, on the settings property with the name executionPolicy.

Like this:

{
    "cmdId": "execute",
    "extensionId": "tt_adapter",
    "modelPath": "/var/folders/zy/_y6qtvgx19sfz9s1509g6mp40000gp/T/tmptpmouo6a/test_layout.ttir",
    "settings": {
        "optimizationPolicy": "Foo"
    },
    "deleteAfterConversion": false
}

This resolves #4

odjuricicTT commented 2 weeks ago

Looks good! Cannot test it yet, since we don't have the functionality on the backend. Feel free to merge and we can open followup issues after.