- 12 May, 2021 2 commits
-
-
anj-s authored
* rename files * add newly renamed file * rename and move checkpoint activations related files * add test files to ci list * fix lint errors * modify docs * add changelog * retain old path for now * fix lint errors * add another import test case * fix merge conflict * add missing test file
-
anj-s authored
* add pragma * add mypy ignore comments * fix comment * add more no cover comments * add comments
-
- 11 May, 2021 1 commit
-
-
Min Xu authored
* [fix] FSDP forward pass overlap between compute and all-gather - much thanks for @cyanguwa for report and @QuentinDuval for debugging it - a new unit test is added to check for this and ensure we detect issue with overlapping and cpu/gpu blocking wait calls * fix * fix * fix * better assertion outputs * fix format and tune all_gather mb for CI * more tuning with non_flatten * undo an accidental change * tuning all gather mb and del model * Update + fix overlapping test to use patched all_gather w/ delay (#672) * fixing get_cycles_per_ms * add get_smi_memory * update the docstring Co-authored-by:
Min Xu <min.xu@acm.org> Co-authored-by:
Myle Ott <myleott@fb.com>
-
- 10 May, 2021 2 commits
-
-
Min Xu authored
* [chore] Updating PR template Add N/A (Not Applicable) options to some of the questions in the PR template * Update PULL_REQUEST_TEMPLATE.md * Update PULL_REQUEST_TEMPLATE.md
-
Min Xu authored
- we do have a use case of empty params inside a FSDP -- for the overlapping fsdp unit test, we use it to measure timing of compute when no params is needed for all_gather - therefore, I updated the comment to be more correct there. - fixes #661
-
- 08 May, 2021 5 commits
-
-
msbaines authored
Co-authored-by: @myleott
-
msbaines authored
Co-authored-by: @myleott
-
anj-s authored
* add license file headers for all files * fix lint
-
Sam Shleifer authored
-
anj-s authored
* rename and move optim/utils.py * attach the new file
-
- 07 May, 2021 3 commits
-
-
msbaines authored
Workaround for https://github.com/pytorch/pytorch/issues/55579 Co-authored-by: @shruti-bh, @myleott
-
Min Xu authored
* [test]: add a more general test case - also rebalance the tests a bit * added missing arg * balance * better checking * balance * make test smaller and faster * make ddp results cached and enable sync_bn * clean up * fix tests * changelog * blance * fix * addressing comments Co-authored-by:Min Xu <min.xu@acm.org>
-
msbaines authored
* [feat] experimental.nn.SyncBatchNorm: initial commit Fast/simple re-implementation of SyncBatchNorm. When profiling SSL Vision, I was seeing a majority of cycles spent in SyncBatchNorm. With this change, I see a 10% to 20% speedup on the model I was profiling. When running benchmarks/experimental/sync_batchnorm.py on 8 x V100, I get a 6x speedup: <class 'torch.nn.modules.batchnorm.BatchNorm2d'> Elapsed time is 0.08709120750427246 Elapsed time is 0.12632274627685547 Elapsed time is 0.14095258712768555 Elapsed time is 0.16529417037963867 Elapsed time is 0.1419970989227295 Elapsed time is 0.15166854858398438 Elapsed time is 0.12000870704650879 Elapsed time is 0.17534875869750977 <class 'torch.nn.modules.batchnorm.SyncBatchNorm'> Elapsed time is 2.5087168216705322 Elapsed time is 2.497001886367798 Elapsed time is 2.5204885005950928 Elapsed time is 2.526789903640747 Elapsed time is 2.5080230236053467 Elapsed time is 2.524489641189575 Elapsed time is 2.513214588165283 Elapsed time is 2.5359973907470703 <class 'fairscale.experimental.nn.sync_batchnorm.SyncBatchNorm'> Elapsed time is 0.4126114845275879 Elapsed time is 0.39051294326782227 Elapsed time is 0.40685415267944336 Elapsed time is 0.4159870147705078 Elapsed time is 0.42383885383605957 Elapsed time is 0.4080159664154053 Elapsed time is 0.41202712059020996 Elapsed time is 0.42400121688842773
-
- 05 May, 2021 6 commits
-
-
Min Xu authored
* [fix] better assert and better test for frozen weights - the precise condition should have been check m.parameters(), not m.params. - fixes #643 * add changelog * use enum is so much better Co-authored-by:Min Xu <min.xu@acm.org>
-
anj-s authored
* fix infinite loop in docstring * fix docstring
-
Benjamin Lefaudeux authored
* increasing the code coverage, good practice and raising bugs. hopefully getting to 100% * small bugfix
-
anj-s authored
* rename files * add newly renamed file
-
anj-s authored
Co-authored-by:Anjali Sridhar <anj@devfair0443.h2.fair>
-
Min Xu authored
* [fix] add clear_autocast_cache flag - when training in AMP model with weight dtype32, FSDP may need to optionally clear the autocast cache to avoid GPU OOM - this flag is default false, automatically doing it is a future TODO - also added a verbose flag to make print(fsdp_model) a bit shorter - updated the memory test to cover those new code - added a couple of useful functions in parallel.py and testing.py * minor * address comments * format * improve the test Co-authored-by:Min Xu <min.xu@acm.org>
-
- 04 May, 2021 1 commit
-
-
tmarkstrum authored
* dynamic loss scaler * isort * black * flake8 * comments * added the test to ci file, added a line to catch the overflow error, fixed some formatting errors * adding type annotation * added todo for adding more test cases for handling Nan gradients * fix some doc string and comments, add more tods * fix two doc strings
-
- 03 May, 2021 2 commits
-
-
Benjamin Lefaudeux authored
* fix + unit test * changelog update
-
Min Xu authored
* [minor] not creating a temp file on import * address review * Revert "address review" This reverts commit f65eb9bc7f7ea8829b1ac0a369ef9a3e6b56420a. Co-authored-by:Min Xu <min.xu@acm.org>
-
- 30 Apr, 2021 1 commit
-
-
msbaines authored
-
- 29 Apr, 2021 2 commits
-
-
Benjamin Lefaudeux authored
-
Benjamin Lefaudeux authored
* Improving test coverage on SDP * using pytest exception catcher
-
- 28 Apr, 2021 4 commits
-
-
Min Xu authored
* [test] improve BN test coverage - Added sync_bn on/off cases - Added conv and linear bias on/off cases - clarified when sync_bn is off, when is BN wrapping needed with the test * adding a comment Co-authored-by:Min Xu <min.xu@acm.org>
-
Mehdi Mirzazadeh authored
* adding auto graph generation for distributed pipeline * ignore trace.py for my for now, since it needs pytorch 1.8 * fixing tests * simplifying graph api * remove unused debug utilities * use inspect to find argument lists * use sharded linear layer * flkae8 * comment * polishing * polishing
-
msbaines authored
-
Min Xu authored
* [feat] save memory by using bucket buffer only in backward - this fixes bug #627 - added documentation to clarify the buffer's cost and speed/memory tradeoff - added setup/teardown calls so that the buffer is only allocated during the backward pass, saving more memory for forward and stepping so that they can be used for things like activations. - added a unit test that assert the memory is in range. Comparing with DDP: 1. buffer size scales with # of FSDP not model size 2. buffer is only allocated during backward 3. buffer is used for small tensors only to reduce overhead 4. overlapping of compute-reduction is very different * add PR number to changelog * filled in with memory number on 1.9 * addressed comments * update comments * fix for 1.6 * add a todo Co-authored-by:Min Xu <min.xu@acm.org>
-
- 27 Apr, 2021 1 commit
-
-
Benjamin Lefaudeux authored
-
- 26 Apr, 2021 4 commits
-
-
Benjamin Lefaudeux authored
* adding the labels * longer labels, following aten::
-
Benjamin Lefaudeux authored
-
Min Xu authored
* [chore] 0.3.6 release * try redo the caches Co-authored-by:Min Xu <min.xu@acm.org>
-
Min Xu authored
* [fix]: let FSDP handle model with multiple forward pass and checkpoint * try CI again * save * save * fixed case with bn * minor * add the new file * minor * added test of a single case, runtime is about 50s * enable all 8 test cases * cleanup * cleanup * skip flatten case with 1.6 and 1.7 * minor Co-authored-by:Min Xu <min.xu@acm.org>
-
- 23 Apr, 2021 2 commits
-
-
Min Xu authored
- this function is being removed in pytorch - we only need to call it in case we are working with older pytorch Co-authored-by:Min Xu <min.xu@acm.org>
-
shuyingsunshine21 authored
* relax checking root condition * formatting * add unittest * add unittest to ci test list * isort for import of unittest * format black . * move test to list 1 * add skip no cuda * black and isort
-
- 22 Apr, 2021 3 commits
-
-
Min Xu authored
* [fix] mypy and flaky test - CI didn't seem to catch this or maybe I merged incorrectly yesterday - this should fix the mypy error on master - also updated a test that seems to be flaky due to tcp port conflict * another flaky test, hopefully more determinism helps * CR * skip 1.6 * fix * minor Co-authored-by:Min Xu <min.xu@acm.org>
-
Benjamin Lefaudeux authored
-
girifb authored
* Changing FSDP init to by pass pg validation for freshly minted pgs inside of init. * Addressing Min's review comments. * Changing logging in init to debug from info * Changing logging in init to debug from info Co-authored-by:Giri Anantharaman <giriman@devfair0439.h2.fair>
-
- 21 Apr, 2021 1 commit
-
-
girifb authored
* Changing FSDP init to by pass pg validation for freshly minted pgs inside of init. * Addressing Min's review comments. Co-authored-by:Giri Anantharaman <giriman@devfair0439.h2.fair>
-