Skip to content

Conversation

AdUhTkJm
Copy link
Contributor

This is Part 3 of registration function generation.

This generates __cuda_module_dtor. It cannot be placed in global dtors list, as treating it as a normal destructor will result in double-free in recent CUDA versions (see comments in OG). Rather, the function is passed as callback of atexit, which is called at the end of __cuda_module_ctor.

@bcardosolopes bcardosolopes merged commit fa5b07c into llvm:main Mar 12, 2025
7 checks passed
lanza pushed a commit that referenced this pull request Mar 18, 2025
This is Part 3 of registration function generation.

This generates `__cuda_module_dtor`. It cannot be placed in global dtors
list, as treating it as a normal destructor will result in double-free
in recent CUDA versions (see comments in OG). Rather, the function is
passed as callback of `atexit`, which is called at the end of
`__cuda_module_ctor`.
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
This is Part 3 of registration function generation.

This generates `__cuda_module_dtor`. It cannot be placed in global dtors
list, as treating it as a normal destructor will result in double-free
in recent CUDA versions (see comments in OG). Rather, the function is
passed as callback of `atexit`, which is called at the end of
`__cuda_module_ctor`.
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