Skip to content

Commit

Permalink
FIX-#425: Fix type of shared MPI.buffer (#426)
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill Suvorov <[email protected]>
  • Loading branch information
Retribution98 authored Sep 13, 2024
1 parent 1e2922a commit 1599cca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unidist/core/backends/mpi/core/shared_object_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,17 @@ def _read_from_shared_buffer(self, data_id, shared_info):
first_index = self.service_shared_buffer[service_index + self.FIRST_DATA_INDEX]

s_data_last_index = first_index + s_data_len
s_data = self.shared_buffer[first_index:s_data_last_index].toreadonly()
s_data = (
self.shared_buffer[first_index:s_data_last_index].cast("b").toreadonly()
)
prev_last_index = s_data_last_index
raw_buffers = []
for raw_buffer_len in buffer_lens:
raw_last_index = prev_last_index + raw_buffer_len
raw_buffers.append(
self.shared_buffer[prev_last_index:raw_last_index].toreadonly()
self.shared_buffer[prev_last_index:raw_last_index]
.cast("b")
.toreadonly()
)
prev_last_index = raw_last_index

Expand Down

0 comments on commit 1599cca

Please sign in to comment.