Skip to content

Commit

Permalink
Reshape model visibility chunks to correct shape
Browse files Browse the repository at this point in the history
THe pinned arrays produced in _enqueue_array_slice may
have singleton dimension squeezed out. This change reintroduces
these dimensions in a reshape prior to writing the visibilities out.
  • Loading branch information
sjperkins committed Aug 2, 2016
1 parent f7df353 commit 5ee6e54
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion montblanc/impl/rime/v5/CompositeRimeSolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,13 @@ def _sync_wait(future):
model_vis_idx = [cpu[s] if s in cpu else ALL_SLICE
for s in model_vis_sshape]

# Infer proper model visibility shape, this may
# have been squeezed when enqueueing the slice
model_vis_shape = tuple(cpu[s].stop - cpu[s].start
if s in cpu else s for s in model_vis_sshape)

X2 = pinned_X2.copy()
model_vis = pinned_model_vis.copy()
model_vis = pinned_model_vis.copy().reshape(model_vis_shape)

_free_pool_allocs(pool_refs, pool_lock)

Expand Down

0 comments on commit 5ee6e54

Please sign in to comment.