iree-org / iree-turbine

IREE's PyTorch Frontend, based on Torch Dynamo.
Apache License 2.0
55 stars 25 forks source link

Make transfer_to_logical_device copy the tensor during eager execution #239

Closed sogartar closed 3 weeks ago

sogartar commented 3 weeks ago

Currently eager and generate don't have the same semantics. Generate would create a new value while in eager we return the same tensor. It is desirable to have the same behavior in both paths, this will allow us to catch in-place errors on the torch level and not during IREE execution. The only downside is that during eager it will be slower. This is far less of headache.