Skip to content

Commit

Permalink
do nothing for nd array (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
FanhaiLu1 authored Apr 24, 2024
1 parent a0df320 commit ee90d08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jetstream/engine/engine_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class ResultTokens(abc.ABC):

def copy_to_host_async(self: "ResultTokens") -> None:
"""Copy to host asynchronously."""
# Do nothing for np array
if isinstance(self.data, np.ndarray):
return
self.data.copy_to_host_async()

def convert_to_numpy(self: "ResultTokens") -> "ResultTokens":
Expand Down

0 comments on commit ee90d08

Please sign in to comment.