Skip to content

[Fix][cuDNN] Avoid thread-local workspace pool for ConvEntry - #20362

Merged
tqchen merged 1 commit into
apache:mainfrom
PengYoun9:fix_cudnn_cleanworkspace
Sep 17, 2026
Merged

tqchen merged 1 commit into
apache:mainfrom
PengYoun9:fix_cudnn_cleanworkspace

Conversation

@PengYoun9

@PengYoun9 PengYoun9 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Fix a core dump during process shutdown when using CUDA contrib operators.

The issue is caused by the CUDA thread-local workspace pool being destroyed
before contrib thread-local objects that still retain workspace.

Initialize the workspace pool when the CUDA device API is requested so that
it remains valid when retained workspace is released during thread teardown.

Fixes #20361

Comment thread src/backend/cuda/runtime/cuda_device_api.cc Outdated
@PengYoun9
PengYoun9 force-pushed the fix_cudnn_cleanworkspace branch from e0af088 to 5c2ff6b Compare September 16, 2026 12:58
@PengYoun9 PengYoun9 changed the title [CUDA] Fix workspace pool destruction order [cuDNN] Avoid thread-local workspace pool for ConvEntry Sep 16, 2026
@PengYoun9
PengYoun9 force-pushed the fix_cudnn_cleanworkspace branch from 5c2ff6b to 48e02a8 Compare September 17, 2026 02:17
@PengYoun9 PengYoun9 changed the title [cuDNN] Avoid thread-local workspace pool for ConvEntry [Fix][cuDNN] Avoid thread-local workspace pool for ConvEntry Sep 17, 2026
…20361)

Use AllocDataSpace and FreeDataSpace instead of AllocWorkspace and
FreeWorkspace for cuDNN convolution workspace allocation.

This avoids the lifetime dependency on the thread-local workspace pool during
process teardown and fixes the shutdown crash.
@tqchen
tqchen merged commit 5bbad79 into apache:main Sep 17, 2026
8 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.

[Bug] [Relax][cuDNN] CoreDump When cuDNN ConvEntry CleanWorkspace

2 participants