Commit 8292e2e
committed
Update on "[inductor] CUDAGraph P2P pool handling for symm_mem"
Summary:
When symm_mem P2P tensors (allocated via empty_strided_p2p with alloc_id)
are inputs to a CUDAGraph partition, the cudagraph tree must handle them
specially:
1. p2p_input_idxs: detected during node initialization via
_has_Standard_Deleter check, added to static_input_idxs so they are
passed through without copying into the cudagraph pool (which would
lose the P2P property) and their pointer stability is validated on
replay.
2. check_memory_pool: filters out P2P allocations (non-standard deleter)
before validating against the cudagraph pool, since P2P buffers use
cuMemCreate/cuMemMap and are not managed by the CUDA caching allocator.
3. dealloc_current_path_weakrefs: skips standard-deleter assertion for
P2P storage wrappers.
4. test_external_allocation_fallback updated: now expects success (auto
copy to P2P) instead of RuntimeError, with codegen and runtime
correctness checks.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: https://phabricator.intern.facebook.com/D93914969
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo mlazos
[ghstack-poisoned]3 files changed
Lines changed: 25 additions & 22 deletions
File tree
- test/distributed
- torch
- _inductor
- csrc/distributed/c10d/symm_mem
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
1596 | | - | |
| 1596 | + | |
1597 | 1597 | | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
| 1598 | + | |
| 1599 | + | |
1604 | 1600 | | |
1605 | 1601 | | |
1606 | 1602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
931 | 927 | | |
932 | 928 | | |
933 | 929 | | |
934 | 930 | | |
935 | 931 | | |
936 | | - | |
| 932 | + | |
937 | 933 | | |
938 | 934 | | |
939 | 935 | | |
| |||
1872 | 1868 | | |
1873 | 1869 | | |
1874 | 1870 | | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
1875 | 1882 | | |
1876 | 1883 | | |
1877 | 1884 | | |
| |||
1884 | 1891 | | |
1885 | 1892 | | |
1886 | 1893 | | |
1887 | | - | |
1888 | | - | |
1889 | | - | |
1890 | | - | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
1891 | 1898 | | |
1892 | 1899 | | |
1893 | 1900 | | |
| |||
2731 | 2738 | | |
2732 | 2739 | | |
2733 | 2740 | | |
2734 | | - | |
2735 | | - | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
2736 | 2744 | | |
2737 | 2745 | | |
2738 | 2746 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
0 commit comments