Question
In the nvshmemi_common_init function, nvshmemi_get_cucontext is called first. Toward the end of nvshmemi_get_cucontext, a CUDA stream is already created and assigned to state->my_stream. Immediately afterward—still within nvshmemi_common_init—the function nvshmemi_setup_stream_priorities is invoked, which creates another stream and overwrites state->my_stream.
Does this sequence result in redundant stream creation, thereby introducing a potential resource leak?
Question
In the
nvshmemi_common_initfunction,nvshmemi_get_cucontextis called first. Toward the end ofnvshmemi_get_cucontext, a CUDA stream is already created and assigned tostate->my_stream. Immediately afterward—still withinnvshmemi_common_init—the functionnvshmemi_setup_stream_prioritiesis invoked, which creates another stream and overwritesstate->my_stream.Does this sequence result in redundant stream creation, thereby introducing a potential resource leak?