Skip to content

Commit 89bd365

Browse files
committed
fix typo
Signed-off-by: noemotiovon <[email protected]>
1 parent 1e7ff8d commit 89bd365

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ggml/src/ggml-cann/aclnn_ops.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,7 @@ static void aclnn_cache_init(ggml_backend_cann_context& ctx, ggml_tensor* dst,
23442344
// return MIN(1, MAX(0, y)) - 1;
23452345
yarn_ramp_allocator.alloc(theta_scale_length * sizeof(float));
23462346
void* yarn_ramp_buffer = yarn_ramp_allocator.get();
2347-
acl_yarn_ramp_tensor = ggml_cann_create_tensor(yarn_ramp_buffer, ACL_FLOAT, sizeof(float_t),
2347+
acl_yarn_ramp_tensor = ggml_cann_create_tensor(yarn_ramp_buffer, ACL_FLOAT, sizeof(float),
23482348
theta_scale_ne, theta_scale_nb, GGML_MAX_DIMS);
23492349
float zero_value = 0, one_value = 1;
23502350
float denom_safe_value = MAX(0.001f, corr_dims[1] - corr_dims[0]);
@@ -2423,8 +2423,8 @@ static void aclnn_cache_init(ggml_backend_cann_context& ctx, ggml_tensor* dst,
24232423
ACL_CHECK(aclrtFree(ctx.rope_cache.cos_cache));
24242424
}
24252425
int64_t repeat_theta_length = theta_scale_length * position_length * 2;
2426-
ACL_CHECK(aclrtMalloc(&ctx.rope_cache.sin_cache, repeat_theta_length * sizeof(float_t), ACL_MEM_MALLOC_HUGE_FIRST));
2427-
ACL_CHECK(aclrtMalloc(&ctx.rope_cache.cos_cache, repeat_theta_length * sizeof(float_t), ACL_MEM_MALLOC_HUGE_FIRST));
2426+
ACL_CHECK(aclrtMalloc(&ctx.rope_cache.sin_cache, repeat_theta_length * sizeof(float), ACL_MEM_MALLOC_HUGE_FIRST));
2427+
ACL_CHECK(aclrtMalloc(&ctx.rope_cache.cos_cache, repeat_theta_length * sizeof(float), ACL_MEM_MALLOC_HUGE_FIRST));
24282428
}
24292429

24302430
// position
@@ -2478,10 +2478,10 @@ static void aclnn_cache_init(ggml_backend_cann_context& ctx, ggml_tensor* dst,
24782478
sin_reshape_nb[i] = sin_reshape_nb[i - 1] * sin_reshape_ne[i - 1];
24792479
}
24802480
aclTensor* acl_sin_repeat_tensor =
2481-
ggml_cann_create_tensor(ctx.rope_cache.sin_cache, ACL_FLOAT, sizeof(float_t),
2481+
ggml_cann_create_tensor(ctx.rope_cache.sin_cache, ACL_FLOAT, sizeof(float),
24822482
sin_reshape_ne, sin_reshape_nb, GGML_MAX_DIMS);
24832483
aclTensor* acl_cos_repeat_tensor =
2484-
ggml_cann_create_tensor(ctx.rope_cache.cos_cache, ACL_FLOAT, sizeof(float_t),
2484+
ggml_cann_create_tensor(ctx.rope_cache.cos_cache, ACL_FLOAT, sizeof(float),
24852485
sin_reshape_ne, sin_reshape_nb, GGML_MAX_DIMS);
24862486

24872487
// repeat
@@ -2570,10 +2570,10 @@ void ggml_cann_rope(ggml_backend_cann_context& ctx, ggml_tensor* dst) {
25702570
sin_reshape_nb[i] = sin_reshape_nb[i - 1] * sin_reshape_ne[i - 1];
25712571
}
25722572
aclTensor* acl_sin_reshape_tensor =
2573-
ggml_cann_create_tensor(ctx.rope_cache.sin_cache, ACL_FLOAT, sizeof(float_t),
2573+
ggml_cann_create_tensor(ctx.rope_cache.sin_cache, ACL_FLOAT, sizeof(float),
25742574
sin_reshape_ne, sin_reshape_nb, GGML_MAX_DIMS);
25752575
aclTensor* acl_cos_reshape_tensor =
2576-
ggml_cann_create_tensor(ctx.rope_cache.cos_cache, ACL_FLOAT, sizeof(float_t),
2576+
ggml_cann_create_tensor(ctx.rope_cache.cos_cache, ACL_FLOAT, sizeof(float),
25772577
sin_reshape_ne, sin_reshape_nb, GGML_MAX_DIMS);
25782578

25792579
aclTensor* acl_src = ggml_cann_create_tensor(src0);

0 commit comments

Comments
 (0)