Add 'amd-ctk gpu list' command to display GPU info#117
Merged
sgopinath1 merged 1 commit intoROCm:mainfrom Apr 26, 2026
Merged
Conversation
Introduces a new 'gpu list' subcommand that shows AMD GPU device index, UUID (from KFD topology), and DRM device paths. This provides a first-party alternative to rocm-smi/amd-smi for discovering GPU UUIDs needed for AMD_VISIBLE_DEVICES container configurations. Updates README to document the new command and clarify UUID source. Made-with: Cursor
3fe36d5 to
966f284
Compare
bhatturu
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #116
Summary
Adds a new
amd-ctk gpu listCLI command that displays AMD GPU information including device index, UUID, and DRM device paths. This provides a first-party way to discover GPU UUIDs needed for container configurations (AMD_VISIBLE_DEVICES), replacing the previous dependency on external tools likerocm-smioramd-smi.Changes
cmd/amd-ctk/gpu/gpu.go— Newgpusubcommand group underamd-ctk.cmd/amd-ctk/gpu/list/list.go— Implementsamd-ctk gpu list. Discovers GPUs viainternal/amdgpu, maps KFD topology UUIDs to device indices, and prints a formatted table of GPU Id, UUID (0xhex), and render device paths.cmd/amd-ctk/main.go— Registers the newgpucommand.README.md— Replacesrocm-smi/amd-smiUUID discovery instructions withamd-ctk gpu list. Adds a note clarifying UUID source (KFD topology) vsASIC_SERIAL/Unique IDfrom other tools.Testing
Validated on an Ubuntu machine with 1 AMD GPU and the
amdDocker runtime configured:amd-ctk --helplists the newgpucommandamd-ctk gpu --helplists thelistsubcommandamd-ctk gpu listexits with code 0Found 1 AMD GPU device)renderDdevice paths0xD8D3E250FF726FB0)gpu listworks withAMD_VISIBLE_DEVICES=<UUID>for container GPU injectiongpu listmatches the device injected into the container