Skip to content

SYCL: Add all missing unary kernels #13074

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

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

Conversation

qnixsynapse
Copy link
Collaborator

@qnixsynapse qnixsynapse commented Apr 23, 2025

Added missing absolute, ELU and SGN kernels.

test-backend-ops is passing with this change.

Note: Instead of doing item_ct1.get_local_range(2) * item_ct1.get_group(2) + item_ct1.get_local_id(2); as with how it has been for rest of it, I did item_ct1.get_global_id(2) for getting the idx position of an element here since operation of each element is independent of each other. Will be happy to hear thoughts about this.

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Apr 23, 2025
@qnixsynapse qnixsynapse force-pushed the sycl/unary_all branch 3 times, most recently from dd0b15f to beed9b3 Compare April 25, 2025 01:47
Comment on lines 4 to 7
#include <sycl/detail/builtins/builtins.hpp>
#include <sycl/nd_item.hpp>
#include <sycl/nd_range.hpp>
#include <sycl/range.hpp>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the first header used? We should avoid relying on detail includes if possible.
It is more common to just include <sycl/sycl.hpp>. They could also all be removed if you're happy to rely on previous includes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. These includes gets auto imported by neovim editor. I need to disable autoimport in nvim-lsp.

Will remove it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants