mirror of https://github.com/AlexeyAB/darknet.git
Compile fix
This commit is contained in:
parent
c89482c39b
commit
25a3d79a7a
|
@ -428,7 +428,7 @@ int *cuda_make_int_array_new_api(int *x, size_t n)
|
||||||
cudaError_t status = cudaMalloc((void **)&x_gpu, size);
|
cudaError_t status = cudaMalloc((void **)&x_gpu, size);
|
||||||
CHECK_CUDA(status);
|
CHECK_CUDA(status);
|
||||||
if (x) {
|
if (x) {
|
||||||
//status = cudaMemcpy(x_gpu, x, size, cudaMemcpyHostToDevice, get_cuda_stream());
|
//status = cudaMemcpy(x_gpu, x, size, cudaMemcpyHostToDevice);
|
||||||
cudaError_t status = cudaMemcpyAsync(x_gpu, x, size, cudaMemcpyHostToDevice, get_cuda_stream());
|
cudaError_t status = cudaMemcpyAsync(x_gpu, x, size, cudaMemcpyHostToDevice, get_cuda_stream());
|
||||||
CHECK_CUDA(status);
|
CHECK_CUDA(status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ layer make_shortcut_layer(int batch, int n, int *input_layers, int* input_sizes,
|
||||||
if (train) l.delta_gpu = cuda_make_array(l.delta, l.outputs*batch);
|
if (train) l.delta_gpu = cuda_make_array(l.delta, l.outputs*batch);
|
||||||
l.output_gpu = cuda_make_array(l.output, l.outputs*batch);
|
l.output_gpu = cuda_make_array(l.output, l.outputs*batch);
|
||||||
|
|
||||||
l.input_sizes_gpu = cuda_make_array(input_sizes, l.n);
|
l.input_sizes_gpu = cuda_make_int_array_new_api(input_sizes, l.n);
|
||||||
l.layers_output_gpu = cuda_make_array_pointers(layers_output_gpu, l.n);
|
l.layers_output_gpu = cuda_make_array_pointers(layers_output_gpu, l.n);
|
||||||
l.layers_delta_gpu = cuda_make_array_pointers(layers_delta_gpu, l.n);
|
l.layers_delta_gpu = cuda_make_array_pointers(layers_delta_gpu, l.n);
|
||||||
#endif // GPU
|
#endif // GPU
|
||||||
|
|
Loading…
Reference in New Issue