Skip to content

Commit 55c8039

Browse files
committed
Unload module when done with it
1 parent 583f7f1 commit 55c8039

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cuda_bindings/cuda/bindings/cyruntime.pyx.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,11 @@ cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCa
19151915
cdef cudaError_t err = cudaSuccess
19161916
err = (<cudaError_t (*)(int*) except ?cudaErrorCallRequiresNewerDriver nogil> __cudaRuntimeGetVersion)(runtimeVersion)
19171917

1918+
{{if 'Windows' != platform.system()}}
1919+
with gil:
1920+
dlfcn.dlclose(handle)
1921+
{{endif}}
1922+
19181923
# Return
19191924
return err
19201925
{{endif}}

0 commit comments

Comments
 (0)