1. 31 Mar, 2021 2 commits
    • Min Xu's avatar
      [fix] FSDP: disable single rank process group for auto_wrap_bn and fixed mixed... · a0458b98
      Min Xu authored
      [fix] FSDP: disable single rank process group for auto_wrap_bn and fixed mixed precision regnet test (#556)
      
      * [fix] disable single rank process group for auto_wrap_bn
      
      - beefed up unit test with regnet-like model
      - found that single-rank process group is causing problem
      - disabled it to enable convergence tests on the vissl side
      - use `raise e from None` to get a better assertion output
        in testing.py.
      
      * [test] fix regnet test for ddp+mixed_precision
      
      - need AMP context in FSDP
      - workaround different between ddp & fsdp when bias=True
      - fixed a bug in input data generation that caused different ranks have
        the same data with wrong iteration count.
      - added TODO for need a better loss and grad_scaler and reduced
        iters so there is no nan.
      - added a (disabled) debugging code
      
      * lint
      
      * lint
      
      * add scaler
      
      * lint
      
      * scaler
      
      * add a real loss
      
      * seeding in the ranks
      
      * blance tests
      
      * run AMP DDP==FSDP test only on cuda version 11 and up
      
      * add relu inplace and comment
      
      * make wrap_bn covers more cases in full precision mode
      a0458b98
    • msbaines's avatar
      acb9ef00
  2. 30 Mar, 2021 1 commit
  3. 26 Mar, 2021 1 commit
  4. 25 Mar, 2021 2 commits
  5. 22 Mar, 2021 1 commit
  6. 20 Mar, 2021 1 commit
  7. 19 Mar, 2021 2 commits
  8. 18 Mar, 2021 4 commits
  9. 17 Mar, 2021 1 commit
  10. 12 Mar, 2021 2 commits
  11. 11 Mar, 2021 1 commit
  12. 09 Mar, 2021 2 commits
  13. 08 Mar, 2021 1 commit
    • Min Xu's avatar
      [fix]: handle inputs with containers in mixed precision (#486) · 2e9a14e7
      Min Xu authored
      * [fix]: handle inputs with containers
      
      - this is an issue surfaces by vissl as well
      - fix seems to be super simple
      - also cleaned up two tests with respect to multiple such tests
        running back to back (they don't do that presently)
      
      * cleanup
      
      * fix
      
      * lint
      2e9a14e7
  14. 06 Mar, 2021 1 commit
  15. 05 Mar, 2021 2 commits
  16. 04 Mar, 2021 2 commits
  17. 03 Mar, 2021 2 commits
  18. 02 Mar, 2021 2 commits
    • Myle Ott's avatar
      d2924670
    • Sean Naren's avatar
      [feat] Add context manager to FSDP for easier child module wrapping (#446) · f3359550
      Sean Naren authored
      This adds a context manager that assists in making child modules with similar defaults.
      Usage:
      ```
      from fairscale.nn.misc import enable_wrap, wrap
      
      with enable_wrap(**handleful_of_important_params):
          layer_1 = wrap(torch.nn.Linear(5, 5))
          layer_2 = wrap(torch.nn.Linear(5, 5), flatten_parameters=True) # Override parameters if you'd like
      
      # without the context manager, creates Linear layer
      layer_1 = wrap(torch.nn.Linear(5, 5))
      ```
      If not within the FSDP context, this would be a no-op. This makes it easier to annotate layers without having to copy any changes in parameters.
      f3359550
  19. 01 Mar, 2021 2 commits
    • Min Xu's avatar
      [chores]: make CI more efficient and update py39 env a bit (#447) · 5eb6b8c7
      Min Xu authored
      * [chores]: CI py39 on GPU and more efficiency
      
      * add test list files
      
      * fix
      
      * add test list files
      
      * split benchmark run into 2 runs
      
      * fix 1.8 version and balance benchmarks
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * recording tests
      
      * py39 install fix
      
      * test again
      
      * move tests
      
      * reorg tests
      
      * skip tests for torch 1.8 due to an upstream bug
      
      * removed __init__.py from tests since it confuses pytest
      
      * Revert "removed __init__.py from tests since it confuses pytest"
      
      This reverts commit 7e156ba33dfaa5ed052031780613ec0cb57a45b0.
      
      * don't include __init__ in file list
      
      * notes on __init__.py and added missing ones
      
      * fixed mypy in a test file
      
      * balance test runtime
      
      * better pip install
      
      * balance more
      
      * pip fix
      
      * balance
      
      * balance more, all test should finish within 20m now
      
      * minor license update
      
      * trying cu102
      
      * more doc and addressed Ben's comments
      
      * debugging
      
      * debugging...
      5eb6b8c7
    • Min Xu's avatar
      [test] FSDP: add the failing test for #421 (#453) · 5ecac15a
      Min Xu authored
      
      
      * [test] FSDP: add the failing test for #421
      
      * skip on 1.5
      
      * better skipping
      
      * Update tests/nn/data_parallel/test_fsdp_grad_scaler.py
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      Co-authored-by: default avatarSam Shleifer <sshleifer@gmail.com>
      5ecac15a
  20. 27 Feb, 2021 1 commit
  21. 26 Feb, 2021 3 commits
  22. 25 Feb, 2021 2 commits
  23. 24 Feb, 2021 1 commit
  24. 23 Feb, 2021 1 commit
    • Min Xu's avatar
      [test]: add peak mem in checkpoint test (#415) · 4b5b4d3d
      Min Xu authored
      * [test]: add peak mem in checkpoint test
      
      * more debugging
      
      * new test
      
      * more fix
      
      * better collection of debug in case of future failures
      
      * update the comment
      
      * typo
      
      * comment
      
      * clarify
      
      * better wording
      4b5b4d3d