Add minimal DBuffer implementation
Summary
- Add a minimal Megatron-FSDP DBuffer implementation following http://nv/mfsdp-design
- Add global flat-buffer layout computation with row-aligned offsets and padded global size.
- Add unit coverage for construction, tensor views, DTensor conversion, scatter/allgather, allreduce/reduce-scatter, and 2D mesh cases.
For broader context on how DBuffer will be used, refer to https://github.com/NVIDIA/Megatron-LM/pull/4976.
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.
Contributors can view more details about this message here.
/ok to test
/ok to test
@greptile
/claude review
@greptile review with strictness 2
Reviews (1): Last reviewed commit: "Improve DBuffer out validation errors" | Re-trigger Greptile
@greptileai
Reviews (2): Last reviewed commit: "Improve DBuffer out validation errors" | Re-trigger Greptile
@greptileai review entire pr
Reviews (3): Last reviewed commit: "Improve DBuffer out validation errors" | Re-trigger Greptile
particularly around the design and usage of
GlobalLayout. It would be very helpful to have some form of usage guide or documentation that explains how to obtain the desired element slices usingGlobalLayoutandDBuffer.
GlobalLayout is an internal data structure. Users never create a DBuffer with GlobalLayout. Currently, only unit tests read it for sanity check. Maybe I should make it _layout instead and remove all uses of it from the tests?
cc @shjwudp
Thanks for the review!
/ok to test
/ok to test
/ok to test
This pull request requires additional validation before any workflows can run on NVIDIA's runners.
Pull request vetters can view their responsibilities here.
Contributors can view more details about this message here.
/ok to test
/ok to test
@wujingyue, there was an error processing your request: E1
See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/
/ok to test
🔄 Merge queue validation started!
You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/27655533140