Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IFRT] Allow kReuseInput in RemapArrays if the number of input arrays is 1 #67763

Merged
merged 1 commit into from
May 17, 2024

Conversation

copybara-service[bot]
Copy link

[IFRT] Allow kReuseInput in RemapArrays if the number of input arrays is 1

xla::ifrt::Client::RemapArrays() allows kReuseInput for projection (view).
Previously, it expected the number of input arrays and output arrays is both 1.
This restriction has been relaxed to expecting only the number of input arrays
to be 1 because each of output arrays can be considered a projection of the
input arrays. In theory, the user could run N RemapArrays() for 1:1 remapping
to get 1:N remapping anyway to bypass the previous restriction, making the
restriction not effective.

@copybara-service copybara-service bot force-pushed the exported_pr_634485955 branch 8 times, most recently from 6f91735 to f5fc884 Compare May 17, 2024 17:24
… is 1

`xla::ifrt::Client::RemapArrays()` allows `kReuseInput` for projection (view).
Previously, it expected the number of input arrays and output arrays is both 1.
This restriction has been relaxed to expecting only the number of input arrays
to be 1 because each of output arrays can be considered a projection of the
input arrays. In theory, the user could run N `RemapArrays()` for 1:1 remapping
to get 1:N remapping anyway to bypass the previous restriction, making the
restriction not effective.

PiperOrigin-RevId: 634818012
@copybara-service copybara-service bot closed this May 17, 2024
@copybara-service copybara-service bot deleted the exported_pr_634485955 branch May 17, 2024 18:05
@copybara-service copybara-service bot merged commit e116891 into master May 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant