File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,19 @@ CUDA C/C++ source code will be compiled with the `NVIDIA Runtime Compiler
160160kernel as either PTX or LTOIR, depending on whether LTO is enabled. Other files
161161will be passed directly to the CUDA Linker.
162162
163+ For cumodules linked to a linkable code object, additional setup
164+ and teardown callbacks are available. Setup functions are invoked once for
165+ every new module loaded. Teardown functions are invoked before the module is
166+ garbage collected by python. These callbacks are defined as follows:
167+
168+ .. code ::
169+
170+ def setup_callback(
171+ mod: cuda.driver.CtypeModule, stream: cuda.driver.Stream
172+ )
173+
174+ The `stream ` argument is the same stream user passes in to launch the kernel.
175+
163176:class: `LinkableCode <numba.cuda.LinkableCode> ` objects are initialized using
164177the parameters of their base class:
165178
You can’t perform that action at this time.
0 commit comments