Skip to content

Commit 2d0442b

Browse files
committed
CANN: fix acl_tensor memory alloc.
1 parent 90172d5 commit 2d0442b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cann/acl_tensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ aclTensor* ggml_cann_create_tensor(const ggml_tensor* tensor, int64_t* ne,
6969
}
7070

7171
int64_t final_dims = (dims == 0 ? GGML_MAX_DIMS : dims);
72-
int64_t acl_storage_len = ggml_element_size(tensor);
72+
int64_t acl_storage_len = 1;
7373
for (int i = 0; i < final_dims; i++) {
7474
acl_storage_len += (acl_ne[i] - 1) * acl_stride[i];
7575
}

0 commit comments

Comments
 (0)