Skip to content

Commit

Permalink
Introduce to_gangs helper (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbalioglu authored Jan 24, 2025
1 parent d5f688a commit cf5f7bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ jobs:
release_type: ${{ inputs.release_type }}
version_override: ${{ needs.process_version.outputs.version_override }}

build_doc:
name: Build documentation
needs: [process_version]
uses: ./.github/workflows/_build_doc.yaml
with:
version_override: ${{ needs.process_version.outputs.version_override }}
# build_doc:
# name: Build documentation
# needs: [process_version]
# uses: ./.github/workflows/_build_doc.yaml
# with:
# version_override: ${{ needs.process_version.outputs.version_override }}

publish:
name: Publish
needs: [build_wheels, build_doc]
needs: [build_wheels]
# needs: [build_wheels, build_doc]
uses: ./.github/workflows/_publish.yaml
with:
release_type: ${{ inputs.release_type }}
6 changes: 6 additions & 0 deletions src/fairseq2/gang.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,12 @@ def fake_gangs(device: Device) -> Gangs:
return Gangs(gang, gang, gang)


def to_gangs(gang: Gang) -> Gangs:
fake_gang = FakeGang(device=gang.device)

return Gangs(gang, gang, fake_gang)


def _setup_2D_mesh_gangs(
root_gang: Gang,
*,
Expand Down

0 comments on commit cf5f7bb

Please sign in to comment.