[AMDGPU] Scope hsaco tmp dir per-user to avoid collisions.#484
Merged
[AMDGPU] Scope hsaco tmp dir per-user to avoid collisions.#484
Conversation
45634d8 to
aa977dc
Compare
gpinkert
pushed a commit
to ROCm/quadrants
that referenced
this pull request
Apr 28, 2026
…mbodied-AI#484) (cherry picked from commit 9f7e43b)
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.
Description
Scopes the AMDGPU JIT's hsaco temp directory per user (
/tmp/quadrants_hsaco_<uid>/instead of/tmp/quadrants_hsaco/), so the first user on a shared host doesn't lock everyone else out with aPermission deniedwhen creating subdirectories. Also treats an emptyQD_TMP_DIRenv var the same as unset, removing a pre-existing UB (tmp_dir_[SIZE_MAX]) the first commit was sitting next to.Good points
mkdir /tmp/quadrants_hsaco/by user A madeqd.init(arch=qd.amdgpu)crash for every other user on the box until someonechmod'd or removed the directory.QD_TMP_DIRto a real path.Bad points
getuid()is POSIX-only, so the patch is Linux-only by construction.cmake/QuadrantsCore.cmakealready forcesQD_WITH_AMDGPUoff on Windows and macOS, so this matches the existing build matrix rather than narrowing it.