-
Notifications
You must be signed in to change notification settings - Fork 25.1k
[Distributed] Add check to verify if local shards in FSDP have tensors before accessing #157275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
syedshahbaaz
wants to merge
62
commits into
pytorch:main
from
daisyden:syedshahbaaz/fsdp_local_shard_ut_fix
Closed
[Distributed] Add check to verify if local shards in FSDP have tensors before accessing #157275
syedshahbaaz
wants to merge
62
commits into
pytorch:main
from
daisyden:syedshahbaaz/fsdp_local_shard_ut_fix
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit f5cbd50.
This reverts commit c791db9.
This reverts commit d0d8271.
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
…into distributed_2.8
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
…into distributed_2.8
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
…equires_nccl_or and requires_nccl_version_or to replace requires_nccl and requires_nccl_version when xccl test is enabled on a test
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng Penghui <penghui.cheng@intel.com>
…into distributed_2.8
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
…into distributed_2.8
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
…into distributed_2.8
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
…-power-of-two for XPU and XCCL backend. The skip test relies on WORLD_SIZE being set. If WORLD_SIZE is not set, the test case is skipped. Used this skip-test for test/distributed/fsdp/test_fsdp_tp_integration.py as it is not designed when non-power-of-two, e.g., 12, ranks is used as WORLD_SIZE. The test case is not skipped when 4 or 8 ranks are used for XPU devices. The test case is not skipped for a non-XPU device.
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
[XPU] Added a new skip test to detect if the world size is set to non-power of 2
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157275
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit c3f9fc0 with merge base 53d06e1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: dynamo
module: inductor
oncall: distributed
Add this issue/PR to distributed oncall triage queue
release notes: distributed (fsdp)
release notes category
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #PYTORCHDGQ-6374. The existing test accesses
local_shards[0]
in FSDP for all ranks by default. Based on the ranks and data, not all ranks will have local shards with tensor every time. This throws alist index out of range
error. Adding a check before accessing elements resolves this for all cases.cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov