Commit 4301818
[SymmMem] Back symm_mem.emtpy() with implicit pool (pytorch#172292)
Resolves pytorch#172050
Two motivations:
- Give better UX and perf to users who explicitly use `symm_mem.empty()`.
- Simplify the code generated by Inductor, i.e. `symm_mem.empty()` would automatically reuse memory, rather than requiring Inductor to bookkeep it.
The MemPool infra for all CUDA backends (`CUDA`, `NVSHMEM`, `NCCL`) has been built previously.
Pull Request resolved: pytorch#172292
Approved by: https://github.com/ngimel, https://github.com/dzmitry-huba
ghstack dependencies: pytorch#1721631 parent 4c2c83b commit 4301818
1 file changed
Lines changed: 33 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1879 | 1879 | | |
1880 | 1880 | | |
1881 | 1881 | | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1882 | 1902 | | |
1883 | 1903 | | |
1884 | 1904 | | |
| |||
1927 | 1947 | | |
1928 | 1948 | | |
1929 | 1949 | | |
| 1950 | + | |
| 1951 | + | |
1930 | 1952 | | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
1937 | 1964 | | |
1938 | 1965 | | |
1939 | 1966 | | |
| |||
0 commit comments