Skip to content

Conversation

mgorny
Copy link
Collaborator

@mgorny mgorny commented Oct 13, 2025

No description provided.

Signed-off-by: Michał Górny <[email protected]>
@konstin
Copy link

konstin commented Oct 14, 2025

Can we do this with json or toml too instead of introducing a third format?

@mgorny
Copy link
Collaborator Author

mgorny commented Oct 14, 2025

Sure. My thinking was that it's "user-readable output that happens to be valid YAML" but I'm fine with a true machine-readable format. Perhaps we should modify other plugin commands to use the same format too.

@mgorny
Copy link
Collaborator Author

mgorny commented Oct 14, 2025

TOML output isn't particularly pleasing:

[[amd]]
name = "rocm_version"
multi_value = false
values = [
    "7.10",
    "7.9",
    "7.8",
    "7.7",
    "7.6",
    "7.5",
    "7.4",
    "7.3",
    "7.2",
    "7.1",
    "7.0",
    "6.4",
    "6.3",
]

[[amd]]
name = "gfx_arch"
multi_value = true
values = [
    "gfx900",
    "gfx906",
    "gfx908",
    "gfx90a",
    "gfx942",
    "gfx1030",
    "gfx1100",
    "gfx1101",
    "gfx1102",
    "gfx1200",
    "gfx1201",
]
[[x86_64]]
name = "level"
multi_value = false
values = [
    "v4",
    "v3",
    "v2",
    "v1",
]

[[x86_64]]
name = "avx_vnni"
multi_value = false
values = [
    "on",
]

[[x86_64]]
name = "cppc"
multi_value = false
values = [
    "on",
]

...

JSON:

{
  "amd": [
    {
      "name": "rocm_version",
      "values": [
        "7.10",
        "7.9",
        "7.8",
        "7.7",
        "7.6",
        "7.5",
        "7.4",
        "7.3",
        "7.2",
        "7.1",
        "7.0",
        "6.4",
        "6.3"
      ],
      "multi_value": false
    },
    {
      "name": "gfx_arch",
      "values": [
        "gfx900",
        "gfx906",
        "gfx908",
        "gfx90a",
        "gfx942",
        "gfx1030",
        "gfx1100",
        "gfx1101",
        "gfx1102",
        "gfx1200",
        "gfx1201"
      ],
      "multi_value": true
    }
  ],
  "x86_64": [
    {
      "name": "level",
      "values": [
        "v4",
        "v3",
        "v2",
        "v1"
      ],
      "multi_value": false
    },
    {
      "name": "avx_vnni",
      "values": [
        "on"
      ],
      "multi_value": false
    },
    {
      "name": "cppc",
      "values": [
        "on"
      ],
      "multi_value": false
    },
    {
      "name": "ibrs_enhanced",
      "values": [
        "on"
      ],
      "multi_value": false
    },
...

Which poison do you choose?

@konstin
Copy link

konstin commented Oct 14, 2025

idk, TOML looks well diff-able.

@DEKHTIARJonathan
Copy link
Member

I honestly don't mind. All 3 are fine with me.

@mgorny approved you can merged when you made your decision.

@mgorny
Copy link
Collaborator Author

mgorny commented Oct 17, 2025

I really don't know which one to do! Technically, JSON is less code and I haven't figured out how to fix weird spacing in TOML (i.e. empty lines between AoT elements but not between AoTs).

@konstin
Copy link

konstin commented Oct 17, 2025

Yeah merge at your disgression.

@DEKHTIARJonathan
Copy link
Member

If JSON is less code then do JSON ;)
Let's make our life easy

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