small fix sum cuda
This commit is contained in:
parent
718a4c9823
commit
950cde13f7
4 changed files with 1 additions and 2 deletions
BIN
build/cuda.cu.o
BIN
build/cuda.cu.o
Binary file not shown.
|
|
@ -194,7 +194,7 @@ __host__ void sum_tensor_cuda(Tensor* tensor, float* result_data, int axis) {
|
|||
}
|
||||
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
|
||||
} else {
|
||||
int axis_size = tensor->shape[axis];
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,6 @@ extern "C" {
|
|||
|
||||
float* result_data;
|
||||
cudaMalloc((void**)&result_data, size * sizeof(float));
|
||||
cudaMemset(result_data, 0, size * sizeof(float));
|
||||
sum_tensor_cuda(tensor, result_data, axis);
|
||||
|
||||
if (keepdim) {
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue