Skip to content

Fix HIP device UUID handling for integrated GPUs - #427

Merged
benvanwerkhoven merged 1 commit into
KernelTuner:masterfrom
kjwierenga:fix_hip_uuid_on_igpu
Nov 16, 2026
Merged

benvanwerkhoven merged 1 commit into
KernelTuner:masterfrom
kjwierenga:fix_hip_uuid_on_igpu

Conversation

@kjwierenga

Copy link
Copy Markdown
Contributor

Some HIP devices, such as integrated GPUs, report an incomplete UUID buffer. Previously, this would lead to an error when attempting to construct a uuid.UUID object from the truncated data.

This change modifies the HipFunctions backend to check the length of the reported UUID buffer. If the buffer is not the expected full size, the device's UUID environment variable is now set to None, gracefully handling devices that do not provide a valid UUID. A new test case has been added to verify this behavior.

This fixes #426

Some HIP devices, such as integrated GPUs, report an incomplete UUID buffer. Previously, this would lead to an error when attempting to construct a `uuid.UUID` object from the truncated data.

This change modifies the `HipFunctions` backend to check the length of the reported UUID buffer. If the buffer is not the expected full size, the device's UUID environment variable is now set to `None`, gracefully handling devices that do not provide a valid UUID. A new test case has been added to verify this behavior.
@kjwierenga
kjwierenga marked this pull request as ready for review November 16, 2026 14:13
@sonarqubecloud

Copy link
Copy Markdown

@benvanwerkhoven

Copy link
Copy Markdown
Collaborator

Thanks @kjwierenga! I've tested it on a machine with an AMD GPU (not an integrated one though) and there this works.

@benvanwerkhoven
benvanwerkhoven merged commit 6c8e367 into KernelTuner:master Nov 16, 2026
4 checks passed
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.

HIP backend crashes on GPUs without a UUID (bytes is not a 16-char string)

2 participants