Skip to content

Ring allreduce try 2#3852

Merged
chenyuxyz merged 32 commits intotinygrad:masterfrom
uuuvn:ring_allreduce_v2
Mar 21, 2024
Merged

Ring allreduce try 2#3852
chenyuxyz merged 32 commits intotinygrad:masterfrom
uuuvn:ring_allreduce_v2

Conversation

@uuuvn
Copy link
Contributor

@uuuvn uuuvn commented Mar 21, 2024

No description provided.

@uuuvn uuuvn marked this pull request as ready for review March 21, 2024 17:20
@github-actions
Copy link
Contributor

Changes

Name                          Lines    Diff    Tokens/Line    Diff
--------------------------  -------  ------  -------------  ------
tinygrad/helpers.py             184      +0           15.6    +0.0
tinygrad/features/multi.py      128     +21           22.4    -0.4
tinygrad/lazy.py                122      +0           19.1    +0.1


total lines changes: +21

@chenyuxyz
Copy link
Collaborator

Tested hlb_cifar for 30 rounds with different seeds. The lowest acc is 93.32 with similar average number. I think it's well within the noisy variance.

@chenyuxyz
Copy link
Collaborator

tested with llama 7B and 70B, outputs are correct and slower with RING=2 as expected. Resnet performs similarly. I think this is good to merge

@chenyuxyz chenyuxyz merged commit 6729f20 into tinygrad:master Mar 21, 2024
@uuuvn uuuvn deleted the ring_allreduce_v2 branch March 22, 2024 19:54
jaredeh pushed a commit to jaredeh/tinygrad that referenced this pull request Mar 24, 2024
* Ring allreduce v3

* Configurable size, number of gpus and jit in benchmark

* ScheduleBarrier v0

* GB/s that make sense

* ScheduleBarrier v0.1

* Fallback on 2 GPUs

* ScheduleBarrier v0.2

* ScheduleBarrier v0.3

* ScheduleBarrier v0.3.1

* ScheduleBarrier v0.3.2

* Replace ScheduleBarrier with automatic optimization

* unused import

* fix comment

* typing

* better fallback

* python 3.8

* RING=2 and use ContextVar

* DEBUG >= 2 and change name

* linter

* type

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
Co-authored-by: chenyu <chenyu@fastmail.com>
Co-authored-by: nimlgen <138685161+nimlgen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants