Skip to content

Commit 0b4ee3a

Browse files
committed
Adding Compute-Context-Length(CCL)
Signed-off-by: Vahid Janfaza <vjanfaza@qti.qualcomm.com>
1 parent 35e3d1b commit 0b4ee3a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

QEfficient/utils/check_ccl_specializations.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77

88
from typing import List, Optional
99

10-
def process_ccl_specializations(ccl_prefill: Optional[List[int]]=None, ccl_decode: Optional[List[int]]=None, ctx_len: Optional[int]=None):
10+
11+
def process_ccl_specializations(
12+
ccl_prefill: Optional[List[int]] = None, ccl_decode: Optional[List[int]] = None, ctx_len: Optional[int] = None
13+
):
1114
if ctx_len is None:
1215
raise TypeError("`ctx_len` is required when loading the model.")
1316
if ccl_prefill is None:
1417
ccl_prefill = [ctx_len]
1518
if ccl_decode is None:
1619
ccl_decode = [ctx_len]
17-
20+
1821
# Step 1: Cap values to ctx_len
1922
ccl_prefill = [min(x, ctx_len) for x in ccl_prefill]
2023
ccl_decode = [min(x, ctx_len) for x in ccl_decode]
@@ -37,4 +40,4 @@ def process_ccl_specializations(ccl_prefill: Optional[List[int]]=None, ccl_decod
3740
updated_prefill.sort()
3841
ccl_decode.sort()
3942

40-
return updated_prefill, ccl_decode
43+
return updated_prefill, ccl_decode

0 commit comments

Comments
 (0)