Skip to content

Commit 8bb698c

Browse files
committed
fix copy op
1 parent ad320ed commit 8bb698c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

python/jittor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# This file is subject to the terms and conditions defined in
88
# file 'LICENSE.txt', which is part of this source code package.
99
# ***************************************************************
10-
__version__ = '1.1.6.3'
10+
__version__ = '1.1.6.4'
1111
from . import lock
1212
with lock.lock_scope():
1313
from . import compiler

src/ops/copy_op.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
#include "var.h"
99
#include "ops/op_register.h"
1010
#include "ops/copy_op.h"
11+
#ifdef HAS_CUDA
12+
#include <cuda_runtime.h>
13+
#include <helper_cuda.h>
14+
#endif
1115

1216
namespace jittor {
1317

@@ -37,7 +41,7 @@ void CopyOp::run() {
3741
}
3842
#ifdef HAS_CUDA
3943
else {
40-
std::cudaMemcpyAsync(y_ptr, x_ptr, size, cudaMemcpyDefault, 0);
44+
checkCudaErrors(cudaMemcpyAsync(y_ptr, x_ptr, size, cudaMemcpyDefault, 0));
4145
}
4246
#endif
4347
}

0 commit comments

Comments
 (0)