Repository navigation
Add --list-devices-format json for --list-devices - #23676
gaugarg-nv wants to merge 1 commit into
Conversation
Produce a more detailed, machine-readable GGML device list that includes devices, backend names, props, caps, memory, and backend feature flags. CUDA/ROCm also exposes per-device attributes such as compute capability or gfx target via a new optional backend-attribute hook. This can be extended further to include other important device attributes.
|
What's the intended downstream use-case for this? If it's for humans then something apart from JSON would be preferred perhaps |
The primary use case is for bug reporting, for which a human-readable string is fine too. I'd imagine this will also be useful for 3rd party apps, which are written on top of Llama.cpp, to filter or prioritize the right devices based on available memory and compute capability. This will also enable filtering of models if a model is too large to fit in the available memory. |
|
My opinion is that something like this should be added when there is a concrete use case, otherwise I don't think we can justify the opportunity cost. |
|
I think there are concrete use cases for this functionality, and I expect downstream projects to adopt it once it becomes available.
IMO, the change is also fairly simple and isolated and shouldn't have much maintenance overhead. |
|
We had a discussion internally last month about the same feature but at broader level, a --json that allow reporting multiple outputs as json I think it should better be a generic feature than something specific to one use case. So I think we can temporarily close this PR for now and wait until we can refactor the code a bit to generalize it. cc @julien-c for visibility |
|
FYI, I implemented a more flexible version of this idea in #28586 it can be extended to log anything that an external application might want to use |
Produce a more detailed, machine-readable GGML device list that includes devices, backend names, props, caps, memory, and backend feature flags.
CUDA/ROCm also exposes per-device attributes such as compute capability or gfx target via a new optional backend-attribute hook. This can be extended further to include other important device attributes.
This is helpful to get all the important runtime device information and compile flags with a single command.
The new output looks like this-
Requirements