-
Notifications
You must be signed in to change notification settings - Fork 989
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
[WIP] Initial metal integration setup #1230
Closed
ivarflakstad
wants to merge
47
commits into
huggingface:main
from
ivarflakstad:initial-metal-integration
Closed
[WIP] Initial metal integration setup #1230
ivarflakstad
wants to merge
47
commits into
huggingface:main
from
ivarflakstad:initial-metal-integration
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
- Most kernels just copy themselfs to get the shapes correct - Matmul works only in 1 case and simply empty allocates otherwise - Logits and randomized to make the demo finish itself. Performance is quite bad (30ms/token), but lot's of prints and allocs and some actual sending to metal. Couln't get it super high by removing the obvious blockers (println + the actual running matmuls). Allocations takes between 1us and 100us and seems very stable, Maybe metal doesn't really have a smart allocator and we'll need to own it.
…ayout offset (like CudaSlice.slice) for candle intergration
- Added proper kernel type check (through modules + macro) - split contiguous and strided into 2 different kernels - Verified on long range + strided values.
Narsil
force-pushed
the
initial-metal-integration
branch
from
November 9, 2023 15:48
16fd771
to
082b922
Compare
It's currently an example, but maybe it is better suited as a integration test and set opt-level=3 in [profile.test]?
ivarflakstad
force-pushed
the
initial-metal-integration
branch
from
November 10, 2023 19:51
9d7556d
to
fc53b41
Compare
Closing since this has been split into several PRs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Initial metal integration
This work has been split into several PRs 😊
#1308
#1309
#1316
#1318
#1323
#1341