Transfer_ops can now work on both buffers and tensor. Right now, lowering of the tensor case is not supported yet.
What does it mean to write to a tensor?! Aren't tensors immutable values wholly? (i.e., you can't change its elements)
Nit: Assign to a variable to prevent a repeated call.