[Mlir-commits] [mlir] a4b7d52 - [mlir] Fix missing null termination in cuLinkAddData argument.
Christian Sigg
llvmlistbot at llvm.org
Mon Feb 1 00:33:01 PST 2021
Author: Christian Sigg
Date: 2021-02-01T09:32:50+01:00
New Revision: a4b7d52f3a219e7726edc8c3805c1d6dc7bd97a5
URL: https://github.com/llvm/llvm-project/commit/a4b7d52f3a219e7726edc8c3805c1d6dc7bd97a5
DIFF: https://github.com/llvm/llvm-project/commit/a4b7d52f3a219e7726edc8c3805c1d6dc7bd97a5.diff
LOG: [mlir] Fix missing null termination in cuLinkAddData argument.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D95679
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 6f2db9bceb2f..ba70d438010e 100644
--- a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
+++ b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
@@ -83,10 +83,10 @@ OwnedBlob compilePtxToCubin(const std::string ptx, Location loc,
RETURN_ON_CUDA_ERROR(
cuLinkAddData(linkState, CUjitInputType::CU_JIT_INPUT_PTX,
const_cast<void *>(static_cast<const void *>(ptx.c_str())),
- ptx.length(), name.data(), /* kernel name */
- 0, /* number of jit options */
- nullptr, /* jit options */
- nullptr /* jit option values */
+ ptx.length(), name.str().data(), /* kernel name */
+ 0, /* number of jit options */
+ nullptr, /* jit options */
+ nullptr /* jit option values */
),
"cuLinkAddData");
More information about the Mlir-commits
mailing list