mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
As this [XPUGraph RFC](https://github.com/pytorch/pytorch/issues/162143) descripted. This PR enhances `XPUGeneratorImpl` to support XPUGraph. In this PR, we add `XPUGerneratorState` and `PhiloxXpuState`. Which makes XPUGraph update philox state during graph capture and replay correctly XPUGraph PR submission plan: - [ ] 1, Enhance XPUGenerator functionality. Add XPUGeneratorState and philoxState - [ ] 2, implemenet XPUGraph capture_begin/capture_end/instantiate functionality - [ ] 3, implemenet XPUGraph replay/debug_dump/reset functionality - [ ] 4, python APIs: is_current_stream_capturing/graph_pool_handle/graph - [ ] 5, python APIs: make_graphed_callables Pull Request resolved: https://github.com/pytorch/pytorch/pull/163332 Approved by: https://github.com/gujinghui, https://github.com/EikanWang, https://github.com/albanD