pymc-devs / pymc-devs/pytensor
Torch: Investigate if `set_default_device/with_device` is a deal-breaker
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
Description
The easiest way to give PyTensor users global (not fine-grained) control over CPU/GPU for the PyTorch backend would be the set_default_device/with_device. However, this may bee too slow, according to: https://github.com/pytorch/pytorch/issues/92701
We should benchmark to see if it is a problem. If yes, we may want to use a PyTensor config flag to get the same control without the PyTorch overhead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the PyTorch issue linked in the description and design benchmarks for set_default_device/with_device overhead in the PyTorch backend. Compare the results with the control needed by PyTensor users. Done means documenting whether the overhead is a deal-breaker and whether a PyTensor config flag is warranted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100