Skip to content

Commit

Permalink
Fix tensor transfer for dynamic shape specialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rsuderman committed Oct 21, 2024
1 parent 6d6f117 commit 916ab3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iree/turbine/ops/iree.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ class transfer_to_logical_device(CustomOp):
def select(self, ksel: KernelSelection):
ksel.attr_str(0)
ta = ksel.arg_tensor(1)
ta.specialize_all_dims()
ksel.return_tensor(ta.t).specialize_all_dims()
spec = [i for i, s in enumerate(ta.t.shape) if isinstance(s, int)]

ta.specialize_dims(*spec)
ksel.return_tensor(ta.t).specialize_dims(*spec)

def eager_execute(self, device_moniker, tensor):
return tensor
Expand Down

0 comments on commit 916ab3a

Please sign in to comment.