openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.39k stars 356 forks source link

[IFRT] Modify ifrt-verify-donation to reject instances when an arg is both donated and not donated. #14265

Closed copybara-service[bot] closed 2 days ago

copybara-service[bot] commented 3 days ago

[IFRT] Modify ifrt-verify-donation to reject instances when an arg is both donated and not donated.

This change modifies the pass to reject cases such as ifrt.Call @f(%arg0, %arg0) {io_aliases=[array<i32: 1, 0>]}. Such cases would previously fail at runtime.

Moreover, the pass now accepts ifrt.Reshard(%arg0, %arg0) {donated=true} which were rejected previously.