Skip to content

Commit bae8df6

Browse files
committed
Add missing THCudaCheck around cudaMemcpy
1 parent dfca8df commit bae8df6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

THCReduceAll.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ bool THC_reduceAll(THCState* state,
331331
// If our destination is not on the device, copy the value back to
332332
// the host (synchronous!)
333333
if (!outOnDevice) {
334-
cudaMemcpy(out, devOut, sizeof(AccT), cudaMemcpyDeviceToHost);
334+
THCudaCheck(cudaMemcpy(out, devOut, sizeof(AccT), cudaMemcpyDeviceToHost));
335335
}
336336

337337
if (freeDevOut) {

generic/THCTensorMath.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void THCTensor_(catArray)(THCState *state, THCTensor *result,
223223
// update offset
224224
offset += dimSize;
225225
}
226-
cudaMemcpy(d_inputs, stackInputs, j * sizeof(CatArrInputTensor<real, unsigned int>), cudaMemcpyHostToDevice);
226+
THCudaCheck(cudaMemcpy(d_inputs, stackInputs, j * sizeof(CatArrInputTensor<real, unsigned int>), cudaMemcpyHostToDevice));
227227

228228
// Next, let's consider how we set our kernel launch parameters.
229229
// We borrow from THCApply, which the kernel's internal indexing

0 commit comments

Comments
 (0)