[mlir] Fix missing null termination in cuLinkAddData argument.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D95679
This commit is contained in:
Christian Sigg 2021-01-29 14:55:34 +01:00
parent d9b953d84b
commit a4b7d52f3a
1 changed files with 4 additions and 4 deletions

View File

@ -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");