Distributed tensors with transforms - #1211
Conversation
ec48c29 to
94285ee
Compare
6aa4036 to
96e6924
Compare
|
/build |
Greptile SummaryAdds block-cyclic distributed matmul and Cholesky through cuBLASMp/cuSOLVERMp, plus single-process multi-GPU FFT execution through cuFFT Xt/Mg.
Confidence Score: 4/5The PR should not merge until MP transform temporaries are made exception-safe, because recoverable backend failures currently leak GPU memory. Both new MP adapters allocate raw stream-ordered device buffers before checked backend calls, while their release logic is reachable only after those calls succeed. Files Needing Attention: include/matx/transforms/distributed/distributed_mp.h Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Distributed tensor expression] --> B{Input distribution}
B -->|Block-cyclic rank 2| C[Distributed MP adapter]
C --> D[Pack local row-major fragment]
D --> E[cuBLASMp or cuSOLVERMp collective]
E --> F[Unpack local result]
B -->|Partitioned rank-1 complex| G[cuFFT Xt/Mg adapter]
G --> H[Gather natural-order host buffer]
H --> I[Multi-GPU FFT]
I --> J[Scatter distributed output]
B -->|Operation dimensions local| K[Existing per-fragment transform]
Reviews (1): Last reviewed commit: "Add configurable multi-process Cholesky ..." | Re-trigger Greptile |
| auto packed_a = detail::PackColumnMajor(a, local_executor); | ||
| auto packed_b = detail::PackColumnMajor(b, local_executor); | ||
| auto packed_c = detail::PackColumnMajor(out, local_executor); |
There was a problem hiding this comment.
Backend errors leak GPU buffers
When a cuBLASMp or cuSOLVERMp buffer-size or execution call fails, the checked call throws before the success-only cleanup runs, leaking the packed buffers and any allocated workspace. Repeated recoverable failures can therefore exhaust GPU memory and cause subsequent operations to fail.
Knowledge Base Used: Transforms
Adds support for distributed tensor with math libraries that support it. cuFFTMg, cuBLASMp, and cuSOLVERMp are supported. Each of these libraries has different layout requirements that are outlined in the documentation. The layout requirements may chance with library updates, and the underlying tensor type should still be flexible enough to allow for this. For the initial commit the following transforms are supported: fft, matmul, cholesky. Ohter transforms may be added in the future.