Skip to content

Unify pick_device between C++ and Python#209

Open
PicoCentauri wants to merge 1 commit intomainfrom
unify_pick_device
Open

Unify pick_device between C++ and Python#209
PicoCentauri wants to merge 1 commit intomainfrom
unify_pick_device

Conversation

@PicoCentauri
Copy link
Copy Markdown
Contributor

@PicoCentauri PicoCentauri commented Apr 23, 2026

Fixes #176

pick_device now returns a torch::Device (allowing for a user supplied index) in both C++ and Python, instead of a bare DeviceType in C++ and a reconstructed string in Python.

The pick_device_pywrapper in C++ is removed.

📚 Download documentation for this pull-request

@PicoCentauri PicoCentauri requested a review from Luthaf April 23, 2026 13:25
@Luthaf
Copy link
Copy Markdown
Member

Luthaf commented Apr 24, 2026

I'm a bit concerned by this being a breaking change, and requiring again to scramble and update all engines … Maybe we should keep this open for now and bundle it together with other breaking changes later?

@PicoCentauri
Copy link
Copy Markdown
Contributor Author

I'm a bit concerned by this being a breaking change, and requiring again to scramble and update all engines … Maybe we should keep this open for now and bundle it together with other breaking changes later?

Agree! But I think it is cleaner and better now.

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.

pick_device has different semantics in C++ and Python

2 participants