Skip to content

Commit 930ee57

Browse files
committed
amendment
1 parent 0ff18e0 commit 930ee57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ggml/src/ggml-cann/aclnn_ops.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,14 +2174,16 @@ static void aclnn_cache_init(ggml_backend_cann_context& ctx, ggml_tensor* dst,
21742174

21752175
bool is_q = (std::strncmp(dst->name, "Qcur-", 5) == 0);
21762176
bool is_k = (std::strncmp(dst->name, "Kcur-", 5) == 0);
2177+
2178+
// used for accuracy testing
21772179
bool is_attention = is_q || is_k;
21782180

21792181
if(ctx.init_ptr == nullptr || !is_attention) {
21802182
// theta_scale arange, [0,1,...,ne00/2 - 1]
21812183
if(ctx.init_ptr != nullptr){
21822184
ACL_CHECK(aclrtFree(ctx.init_ptr));
21832185
}
2184-
ACL_CHECK(aclrtMalloc(&ctx.init_ptr,theta_scale_length * sizeof(float_t), ACL_MEM_MALLOC_HUGE_FIRST));
2186+
ACL_CHECK(aclrtMalloc(&ctx.init_ptr, theta_scale_length * sizeof(float_t), ACL_MEM_MALLOC_HUGE_FIRST));
21852187

21862188
aclTensor* acl_theta_scale_tensor =
21872189
ggml_cann_create_tensor(ctx.init_ptr, ACL_FLOAT, sizeof(float_t),

ggml/src/ggml-cann/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ struct ggml_backend_cann_context {
371371
void* init_ptr = nullptr;
372372
void* sin_ptr = nullptr;
373373
void* cos_ptr = nullptr;
374-
int64_t max_position_length = 200000;
374+
int64_t max_prompt_length = 65536;
375375
#ifdef USE_ACL_GRAPH
376376
/// Cached CANN ACL graph used for executing the current ggml computation graph.
377377
std::unique_ptr<ggml_cann_graph> cann_graph;

0 commit comments

Comments
 (0)