diff --git a/shortfin/examples/python/mobilenet_server/inference_system.py b/shortfin/examples/python/mobilenet_server/inference_system.py index e42f4cef7..4ba0aba4f 100644 --- a/shortfin/examples/python/mobilenet_server/inference_system.py +++ b/shortfin/examples/python/mobilenet_server/inference_system.py @@ -40,7 +40,9 @@ async def run(self): # just writing to the backing storage is the best we have API # support for. Generally, APIs on storage should be mirrored onto # the array. - self.host_staging.storage.data = request.raw_image_data + # TODO: Easier to use API for writing into the storage + with self.host_staging.storage.map(write=True, discard=True) as m: + m.fill(request.raw_image_data) print("host_staging =", self.host_staging) self.device_input.copy_from(self.host_staging)