This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
general code cleanup to allow faster broadcasting implementations #86
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avik-pal
force-pushed
the
ap/patches
branch
19 times, most recently
from
July 15, 2024 04:49
d765b03
to
5c287fd
Compare
avik-pal
force-pushed
the
ap/patches
branch
2 times, most recently
from
July 15, 2024 06:07
10298c6
to
86b4475
Compare
avik-pal
force-pushed
the
ap/patches
branch
3 times, most recently
from
July 20, 2024 22:38
80363da
to
27d1475
Compare
avik-pal
force-pushed
the
ap/patches
branch
4 times, most recently
from
July 21, 2024 01:21
f3840f8
to
8b23dbe
Compare
avik-pal
force-pushed
the
ap/patches
branch
5 times, most recently
from
July 21, 2024 05:02
5311500
to
a7de3f9
Compare
avik-pal
force-pushed
the
ap/patches
branch
2 times, most recently
from
July 21, 2024 19:24
b4d1ab8
to
0ec4ecd
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main Description
This doesn't really attempt to make things faster. We do see speed improvements from:
broadcast
-ing rewritten as loops for CPUs for uniform broadcastingMostly to check why #85 is stalling CUDA-- fixed now.We get rid of FastBroadcast.jl (for now) and replace it with loops for the CPU case. The idea here is to bring it back in a later PR, which solely focuses on performance in cases where we cannot use LoopVectorization.
My intuition was Enzyme would be great for loops but current Zygote with rrules absolutely destroys it for some of the operations -- at least
dropout
I checked. We need to add rules to help out enzyme here (especially now that it is the recommended autodiff backend).TODOs
batchnorm-- deferred to laterinstancenorm-- deferred to latersome refactorget_device_type
to minimize code in extensions.Before Merging
-g2
from downstream testing