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

Use device duck typing for empty device lists #22667

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Feb 13, 2025

Use device duck typing for empty device lists

We are soon going to require all IFRT users to use Client::MakeDeviceList() to create a device list instead of calling BasicDeviceList::Create(). PyDeviceList(nb::tuple py_device_assignment) with an empty device assignment cannot infer the IFRT client to use, so it seems the simplest to fall back to device duck typing like we already do for device lists with devices from multiple clients.

@copybara-service copybara-service bot force-pushed the test_726233342 branch 5 times, most recently from c36995b to cb3998b Compare February 13, 2025 14:34
We are soon going to require all IFRT users to use `Client::MakeDeviceList()` to create a device list instead of calling `BasicDeviceList::Create()`. `PyDeviceList(nb::tuple py_device_assignment)` with an empty device assignment cannot infer the IFRT client to use, so it seems the simplest to fall back to device duck typing like we already do for device lists with devices from multiple clients.

PiperOrigin-RevId: 726470637
@copybara-service copybara-service bot merged commit b195247 into main Feb 13, 2025
@copybara-service copybara-service bot deleted the test_726233342 branch February 13, 2025 15:16
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.

1 participant