Skip to content

fix(hrx): shut down the device without touching destroyed statics - #800

Merged
zaneni6 merged 1 commit into
ROCm:mainfrom
jtuyls:users/jtuyls/hrx-runtime-exit-shutdown
Oct 16, 2026
Merged

zaneni6 merged 1 commit into
ROCm:mainfrom
jtuyls:users/jtuyls/hrx-runtime-exit-shutdown

Conversation

@jtuyls

@jtuyls jtuyls commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #787. ~Runtime() entered the executable-cache and coherence-map function-local statics after they had already been destroyed.

Release this instance's stream. The instance whose hrx_gpu_initialize() succeeded then calls hrx_gpu_shutdown(), which destroys the device and its heap. A module that saw HRX_STATUS_ALREADY_EXISTS releases only its own stream.

~Runtime() locked the executable cache and cleared the coherence map after those function-local statics had already been destroyed. Release this instance's stream, and call hrx_gpu_shutdown() only from the instance whose hrx_gpu_initialize() succeeded.
@jtuyls
jtuyls force-pushed the users/jtuyls/hrx-runtime-exit-shutdown branch from dab4895 to 542da51 Compare October 16, 2026 09:33
@zaneni6
zaneni6 merged commit 5681850 into ROCm:main Oct 16, 2026
29 checks passed
@jtuyls
jtuyls deleted the users/jtuyls/hrx-runtime-exit-shutdown branch October 16, 2026 17:06
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.

2 participants