[Mlir-commits] [mlir] 4a35941 - Delete CUDA context after linking device code.

Christian Sigg llvmlistbot at llvm.org
Wed Feb 3 11:10:21 PST 2021


Author: Christian Sigg
Date: 2021-02-03T20:10:12+01:00
New Revision: 4a35941dbde63964240d30309e2b72d8be8fabb6

URL: https://github.com/llvm/llvm-project/commit/4a35941dbde63964240d30309e2b72d8be8fabb6
DIFF: https://github.com/llvm/llvm-project/commit/4a35941dbde63964240d30309e2b72d8be8fabb6.diff

LOG: Delete CUDA context after linking device code.

Differential Revision: https://reviews.llvm.org/D95857

Added: 
    

Modified: 
    mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
index ba70d438010ec..8707910e5a152 100644
--- a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
+++ b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
@@ -101,6 +101,7 @@ OwnedBlob compilePtxToCubin(const std::string ptx, Location loc,
 
   // This will also destroy the cubin data.
   RETURN_ON_CUDA_ERROR(cuLinkDestroy(linkState), "cuLinkDestroy");
+  RETURN_ON_CUDA_ERROR(cuCtxDestroy(context), "cuCtxDestroy");
 
   return result;
 }


        


More information about the Mlir-commits mailing list