Skip to content

Commit 7322a71

Browse files
committed
Fix length of ptx when compilation succeeded
1 parent 6c5611e commit 7322a71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gpuarray_buffer_cuda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,10 +1116,10 @@ static int call_compiler(cuda_context *ctx, strb *src, strb *ptx, strb *log) {
11161116
if (strb_ensure(ptx, buflen) == 0) {
11171117
err = nvrtcGetPTX(prog, ptx->s+ptx->l);
11181118
if (err != NVRTC_SUCCESS) {
1119-
ptx->l += buflen;
11201119
nvrtcDestroyProgram(&prog);
11211120
return error_nvrtc(ctx->err, "nvrtcGetPTX", err);
11221121
}
1122+
ptx->l += buflen;
11231123
}
11241124

11251125
return GA_NO_ERROR;

0 commit comments

Comments
 (0)