Skip to content

Commit dc9544a

Browse files
committed
precommit
1 parent ee4372b commit dc9544a

File tree

1 file changed

+6
-2
lines changed
  • shortfin/python/shortfin_apps/llm/components

1 file changed

+6
-2
lines changed

shortfin/python/shortfin_apps/llm/components/service.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,17 @@ async def run(self):
390390
if self.phase == InferencePhase.DECODE:
391391
start_positions_host = start_positions.for_transfer()
392392
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.
394396
m.items = [req.start_position for req in self.exec_requests]
395397
start_positions_host.copy_to(start_positions)
396398

397399
seq_lens_host = seq_lens.for_transfer()
398400
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.
400404
m.items = [
401405
req.start_position + len(req.input_token_ids)
402406
for req in self.exec_requests

0 commit comments

Comments
 (0)