Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move all kernels into a dedicated cuda stream #448

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ngc92
Copy link
Contributor

@ngc92 ngc92 commented May 22, 2024

In preparation for #361, this restores the existence of a single "main stream" cuda stream.
To make reasoning about parallelism easier, at least in the near future, this change also makes each gpt2_* function explicitly synchronous.
Move the loss calculation from forward to backward, because that gives us a better opportunity to overlap things.
It also enables a slight optimization, in that we now no longer update dlogits in the validation code path.

@ngc92 ngc92 force-pushed the stream branch 2 times, most recently from c728993 to e619cf7 Compare May 23, 2024 09:41
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.

None yet

1 participant