-
Notifications
You must be signed in to change notification settings - Fork 28
1D Matrix Multiplication example for HAT #276
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
base: code-reflection
Are you sure you want to change the base?
Conversation
Hi @jjfumero, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user jjfumero" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
@jjfumero This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. ➡️ To flag this PR as ready for integration with the above commit message, type |
/signed |
Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
@jjfumero This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Still waiting for the OCA approval. |
@jjfumero This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Still waiting for the OCA approval |
You might want to contact [email protected] regarding your OCA approval status. Not sure what's up there, but it shouldn't take that long. |
@jjfumero This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Pending for review |
@jjfumero This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@jjfumero Hi, can use Babylon to implement operations to do llama inference now? Babylon has all the basic ops for at least one platform ie. cuda now? |
Hi @SidneyLann , I am not the core maintainer of Babylon. Probably Gary Frost can help you with your questions. From my view, I think you need to access shared memory and some synchronisation primitives to be able to perform reductions. I am not sure if this is implemented in HAT yet. |
Hi Sidney
As Juan mentioned, I don't think we are there yet. But we have plans.
We need to add low level primitives to HAT for matrix mul/scans etc to
allow us to handoff to the vendor backends (GPU drivers) without
unnecessary copies.
Gary
…On Mon, Apr 7, 2025 at 5:20 PM Juan Fumero ***@***.***> wrote:
Hi @SidneyLann <https://github.com/SidneyLann> , I am not the core
maintainer of Babylon. Probably Gary Frost can help you with your
questions. From my view, I think you need to access shared memory and some
synchronisation primitives to be able to perform reductions. I am not sure
if this is implemented in HAT yet.
—
Reply to this email directly, view it on GitHub
<#276 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBKEN35FIKYUTUIYRDYC5D2YKQWRAVCNFSM6AAAAABSBW7YWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBTHEYTMNJZGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: jjfumero]*jjfumero* left a comment (openjdk/babylon#276)
<#276 (comment)>
Hi @SidneyLann <https://github.com/SidneyLann> , I am not the core
maintainer of Babylon. Probably Gary Frost can help you with your
questions. From my view, I think you need to access shared memory and some
synchronisation primitives to be able to perform reductions. I am not sure
if this is implemented in HAT yet.
—
Reply to this email directly, view it on GitHub
<#276 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBKEN35FIKYUTUIYRDYC5D2YKQWRAVCNFSM6AAAAABSBW7YWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBTHEYTMNJZGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@grfrost |
@jjfumero this pull request can not be integrated into git checkout dev/examples
git fetch https://git.openjdk.org/babylon.git code-reflection
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge code-reflection"
git push |
@jjfumero This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
openjdk/valhalla#1478 (comment)
@grfrost |
No Babylon is not waiting for Valhalla. We don't use it at present, but its possible that we might down the line. |
@SidneyLann Sorry just saw your Q above regarding 'why not finish CUDA version first?' The reason we have multiple backends, at various stages of development is because we want to ensure that HAT can be implemented on the widest possible set of backends (CUDA/HIP/OpenCL/SPIRV), so we are building 'reference' implementations of each. I am attempting to provide 'reference' (i.e. almost definitely not maximally performant :) ) multiple backends to make sure this is plausible, and to ensure the program model scales. Our eventual hope is to persuade CUDA/OpenCL/HIP experts (maybe the vendor runtime owners themselves) to eventually help us build out more robust implementations. OpenCL is probably more thouroughly tested and complete, just because I am more familiar with OpenCL. |
Conflicts solved. It works with the latest tip: 5bdc8ff |
Add new example for 1D Matrix Multiplication in HAT.
How to test?
Note that the generated kernel for OpenCL contains a race condition:
After applying a patch provided by Gary Frost to solve the race condition, it works.
Patch:
Note: this PR does not provide this path, only the example and the runner extension to run the matrix multiplication.
Progress
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/276/head:pull/276
$ git checkout pull/276
Update a local copy of the PR:
$ git checkout pull/276
$ git pull https://git.openjdk.org/babylon.git pull/276/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 276
View PR using the GUI difftool:
$ git pr show -t 276
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/276.diff
Using Webrev
Link to Webrev Comment