1. 27 Oct, 2021 2 commits
  2. 24 Oct, 2021 1 commit
  3. 22 Oct, 2021 2 commits
    • anj-s's avatar
      modify golden data (#825) · 35f327f3
      anj-s authored
      35f327f3
    • Eugen Hotaj's avatar
      Extend auto shard capabilities to work around torch.fx edge cases. (#817) · 7bdf50a3
      Eugen Hotaj authored
      auto_shard.py currently uses torch.fx to create a symbolic DAG of
      operations and linearizes that DAG into an nn.Sequential so it can later
      be used for model offloading. This works in most cases but runs into
      issues for certain eager mode features, such as dynamic conditionals,
      shape-dependent computation, etc.
      
      This PR extends auto_shard.py to first run a preprocessing step which wraps
      any nn.Module which cannot be traced through. It adds a test for dynamic
      conditionals and updates existing failing test code.
      
      There are some immediate extensions to this approach which are marked as
      TODO in the code.
      7bdf50a3
  4. 21 Oct, 2021 2 commits
  5. 20 Oct, 2021 3 commits
  6. 19 Oct, 2021 1 commit
  7. 28 Sep, 2021 1 commit
  8. 24 Sep, 2021 1 commit
  9. 22 Sep, 2021 1 commit
    • tmarkstrum's avatar
      Switch default branch from master to main (#807) · b09ddb2d
      tmarkstrum authored
      * update master branch to main
      
      * added FAQ about updating the branch from master to main
      
      * fixed some false positive correction
      
      * added what is new section
      
      * fixed the quoted code area
      
      * added release what is new section
      
      * added a step in release.md
      
      * fixed a word
      b09ddb2d
  10. 21 Sep, 2021 1 commit
  11. 20 Sep, 2021 1 commit
  12. 17 Sep, 2021 1 commit
  13. 13 Sep, 2021 1 commit
  14. 12 Sep, 2021 2 commits
    • Min Xu's avatar
      [fix] minor fixes for master branch (#792) · 31e36453
      Min Xu authored
      
      
      * add changelog for previous commit
      
      * add changelog for previous commit
      
      * add changelog for previous commit
      
      * fix a merge induced error
      Co-authored-by: default avatarMin Xu <min.xu.public@gmail.com>
      31e36453
    • Darryl Barnhart's avatar
      [fix] FSDP intra-backwards gradient accumulation. (#784) · 4fa2ab9b
      Darryl Barnhart authored
      * [fix] FSDP intra-backwards gradient accumulation.
      
      Ensure gradient reduction accumulates into the unsharded gradient tensor
      within a backwards pass. This matters when an FSDP module is called
      multiple times within a forward pass, and reduction is _not_ deferred
      using activation checkpoint forward counters, bucketing or some other
      mechanism.
      
      Closes #780
      
      * [refactor] Remove forward counters. Comments.
      
      Removed forward counters from the activation checkpointing utility, now
      that FSDP does not require them for correct operation. Add more detailed
      comment about memory usage behaviour with gradient reduction.
      
      * [refactor] Delete deprecated forward counter usage.
      
      * [refactor] Add state assertion as end of pre-backward hook.
      4fa2ab9b
  15. 11 Sep, 2021 1 commit
    • Alex Xiao's avatar
      [feat] set requires_grad of output tensors of checkpointed modules properly (#787) · 482944d9
      Alex Xiao authored
      
      
      Before this commit, output tensors of checkpointed modules always
      require grad, even if they shouldn't. This commit makes it so that
      the outputs of checkpointed modules only require grad if either
      the input requires grad or if the parameters require grad.
      
      To achieve this, this commit also adds a new _unflattened_param_views
      attribute to modules being flattened. This allows the checkpointing
      to still access the parameters and check if gradients need to be
      computed.
      Co-authored-by: default avatarAlex Xiao <axiao@fb.com>
      482944d9
  16. 10 Sep, 2021 2 commits
  17. 07 Sep, 2021 1 commit
  18. 06 Sep, 2021 2 commits
  19. 05 Sep, 2021 1 commit
  20. 18 Aug, 2021 1 commit
  21. 12 Aug, 2021 4 commits
  22. 10 Aug, 2021 1 commit
    • Rahul Iyer's avatar
      Fix pre-commit hook failures (#756) · 31d600cc
      Rahul Iyer authored
      Pre-commit hook fails when run on all files for three reasons:
      (see trace below)
      
      1. Trailing whitespace on multiple files
      2. mypy fails to load numpy and then subsequently fails to load
      LazyModule from pipe.py
      3. isort sees issues with known_third_party packages
      
      ```
      > pre-commit run --all-files
      
      Trim Trailing Whitespace.................................................Failed
      - hook id: trailing-whitespace
      - exit code: 1
      - files were modified by this hook
      
      Fixing docs/source/conf.py
      Fixing fairscale/experimental/nn/auto_shard.py
      Fixing docs/source/deep_dive/activation_checkpointing.rst
      Fixing docs/source/tutorials/pipe.rst
      Fixing docs/source/installation_instructions.rst
      Fixing docs/source/deep_dive/pipeline_parallelism.rst
      Fixing docs/source/tutorials/activation_checkpointing.rst
      Fixing docs/source/tutorials/offload_model.rst
      Fixing docs/source/deep_dive/oss_sdp_fsdp.rst
      Fixing docs/source/what_is_fairscale.rst
      Fixing CHANGELOG.md
      Fixing fairscale/experimental/nn/offload.py
      Fixing docs/source/index.rst
      Fixing docs/source/deep_dive/adascale.rst
      Fixing README.md
      Fixing docs/source/tutorials/oss.rst
      Fixing docs/source/deep_dive/offload.rst
      
      Check python ast.........................................................Passed
      Check for merge conflicts................................................Passed
      Don't commit to branch...................................................Passed
      Check for added large files..............................................Passed
      Fix End of Files.........................................................Failed
      - hook id: end-of-file-fixer
      - exit code: 1
      - files were modified by this hook
      
      Fixing requirements.txt
      Fixing docs/source/getting_started.rst
      Fixing docs/source/installation_instructions.rst
      Fixing codecov.yml
      Fixing docs/source/deep_dive/adascale.rst
      Fixing docs/source/tutorials/oss.rst
      Fixing docs/source/deep_dive/offload.rst
      
      black....................................................................Passed
      flake8...................................................................Passed
      seed isort known_third_party.............................................Failed
      - hook id: seed-isort-config
      - exit code: 1
      - files were modified by this hook
      isort....................................................................Passed
      mypy.....................................................................Failed
      - hook id: mypy
      - exit code: 2
      
      setup.cfg:45: error: Error importing plugin 'numpy.typing.mypy_plugin': No module named 'numpy'
      Found 1 error in 1 file (checked 197 source files)
      ```
      31d600cc
  23. 02 Aug, 2021 2 commits
  24. 01 Aug, 2021 1 commit
  25. 31 Jul, 2021 1 commit
  26. 30 Jul, 2021 1 commit
    • Yanli Zhao's avatar
      [FSDP] Move final backward callback queueing to pre-backward hook of root instance (#753) · ba7df621
      Yanli Zhao authored
      Move final backward callback to pre-backward hook of root FSDP instance
      
      Summary:
      
      Move final backward callback to pre-backward hook of root FSDP instance,
      so that it is always attached to the outer most backward call and fired
      after all backward calls are completed.
      
      Also added flags to check final backward callback is fired when final
      backward callback is required.
      
      If root FSDP is checkpointed and called multiple times in forward,
      check pointer counter is used to make sure final backward callback is queued inside last inner backward
      call as well.
      
      Test Plan: unit tests
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * reformat
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * nits and unit tests
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * address some comments
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * replace m with self
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * reformat
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * nits
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * remove the fired flag
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * assert state on root only
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * comments
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * comments
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      ba7df621
  27. 27 Jul, 2021 2 commits