Skip to content

Commit

Permalink
[shortfin] Fix example Program signature due to API drift.
Browse files Browse the repository at this point in the history
  • Loading branch information
stellaraccident committed Nov 6, 2024
1 parent 8ed90d2 commit 280d06c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shortfin/examples/python/mobilenet_server/inference_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ async def run(self):
# Simple call. Note that the await here is merely awaiting the
# result being *available* (i.e. that the VM coroutine has
# completed) but does not indicate that the result is ready.
(result1,) = await self.main_function(self.device_input)
(result2,) = await self.main_function(self.device_input)
(result1,) = await self.main_function(self.device_input, fiber=self.fiber)
(result2,) = await self.main_function(self.device_input, fiber=self.fiber)

# TODO: Implement await on individual results. The accounting is
# there but currently we can only await on the device itself.
Expand Down Expand Up @@ -95,7 +95,7 @@ async def start_fiber(self, fiber):
# in a task so we can await it in the future and let program loads
# overlap.
for _ in range(self.processes_per_worker):
program = sf.Program([self.program_module], fiber=fiber)
program = sf.Program([self.program_module], devices=fiber.raw_devices)
self.processes.append(
InferenceProcess(program, self.request_queue, fiber=fiber).launch()
)
Expand Down

0 comments on commit 280d06c

Please sign in to comment.