Skip to content

Bypass accelerate#1955

Merged
Qubitium merged 2 commits into
mainfrom
bypass-accelerate
Oct 1, 2025
Merged

Bypass accelerate#1955
Qubitium merged 2 commits into
mainfrom
bypass-accelerate

Conversation

@Qubitium

@Qubitium Qubitium commented Oct 1, 2025

Copy link
Copy Markdown
Collaborator

@avtc This Pr will fix your PVML env crash. I reproduced it on my system and now bypassing the thread safety in Accelerate entirely. Core issue is accelerate.utils.modeling.clear_device_cache is thread unsafe due to:

  1. calls device level torch.cuda.empty_cache() without proper thread ctx and not checking if ops (call paths) are actually cuda related
  2. mutates os.environ without locks

Signed-off-by: Qubitium <Qubitium@modelcloud.ai>
Signed-off-by: Qubitium <Qubitium@modelcloud.ai>
@Qubitium Qubitium marked this pull request as ready for review October 1, 2025 01:41
@Qubitium Qubitium merged commit 32dbaf0 into main Oct 1, 2025
5 checks passed
@Qubitium Qubitium deleted the bypass-accelerate branch October 1, 2025 02:22
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.

1 participant