Commit dc9544a 1 parent ee4372b commit dc9544a Copy full SHA for dc9544a
File tree 1 file changed +6
-2
lines changed
shortfin/python/shortfin_apps/llm/components
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -390,13 +390,17 @@ async def run(self):
390
390
if self .phase == InferencePhase .DECODE :
391
391
start_positions_host = start_positions .for_transfer ()
392
392
with start_positions_host .map (discard = True ) as m :
393
- m .fill (1 ) # Pad unused requests. Must pad with nonzero value because division by 0 floods clobber page (page 0) in cache with NaN values.
393
+ m .fill (
394
+ 1
395
+ ) # Pad unused requests. Must pad with nonzero value because division by 0 floods clobber page (page 0) in cache with NaN values.
394
396
m .items = [req .start_position for req in self .exec_requests ]
395
397
start_positions_host .copy_to (start_positions )
396
398
397
399
seq_lens_host = seq_lens .for_transfer ()
398
400
with seq_lens_host .map (discard = True ) as m :
399
- m .fill (1 ) # Pad unused requests. Must pad with nonzero value because division by 0 floods clobber page (page 0) in cache with NaN values.
401
+ m .fill (
402
+ 1
403
+ ) # Pad unused requests. Must pad with nonzero value because division by 0 floods clobber page (page 0) in cache with NaN values.
400
404
m .items = [
401
405
req .start_position + len (req .input_token_ids )
402
406
for req in self .exec_requests
You can’t perform that action at this time.
0 commit comments