Skip to content

Commit

Permalink
Delete CUDA context after linking device code.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D95857
  • Loading branch information
chsigg committed Feb 3, 2021
1 parent 62ce4b0 commit 4a35941
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4a35941

Please sign in to comment.