Skip to content

Conversation

safranowith
Copy link
Contributor

This PR adds support for the following unary operators in the SYCL backend:

FLOOR, CEIL, ROUND, TRUNC.

Changes include:

Implementation in element_wise.cpp and element_wise.hpp

Header updates in ggml.h

Registration in SYCL.csv

Documentation updates in docs/ops.md

Test coverage in test-backend-ops.cpp

This SYCL implementation was added following the prior addition of the same operators in the CPU backend.

@github-actions github-actions bot added documentation Improvements or additions to documentation testing Everything test related ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Oct 16, 2025
@CISC
Copy link
Collaborator

CISC commented Oct 16, 2025

There's a bad merge or something, you are touching a lot of unrelated code.

@safranowith
Copy link
Contributor Author

safranowith commented Oct 16, 2025 via email

@safranowith
Copy link
Contributor Author

safranowith commented Oct 16, 2025 via email

Copy link
Collaborator

@CISC CISC left a comment

Choose a reason for hiding this comment

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

Just a few more whitespace cleanups.

Copy link
Collaborator

@CISC CISC left a comment

Choose a reason for hiding this comment

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

Let's try again. :)

@safranowith
Copy link
Contributor Author

safranowith commented Oct 16, 2025 via email

Copy link
Collaborator

@NeoZhangJianyu NeoZhangJianyu left a comment

Choose a reason for hiding this comment

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

It's great work!
It's first time that SYCL backend support OP ahead of other backend.

Thank you!

Copy link
Collaborator

@CISC CISC left a comment

Choose a reason for hiding this comment

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

Also, did you rebase, or is the ops.md CI comparing against master?

@safranowith
Copy link
Contributor Author

safranowith commented Oct 19, 2025 via email

@CISC
Copy link
Collaborator

CISC commented Oct 19, 2025

I've rebased on top of latest master and regenerated ops.md using create_ops_docs.py.

You got it the other way around, you need to update your CSVs, Vulkan supports SSM_SCAN/CONV now.

@safranowith
Copy link
Contributor Author

Thanks for the clarification — CSV and docs are now synced.
Is the PR ready for merge, or is anything else still needed?

@CISC
Copy link
Collaborator

CISC commented Oct 19, 2025

Looks good to merge once @ggerganov approves.

Fixed the reason ops.md got out of sync in #16663

Edit: The reason is that #16463 got merged without updated CSV.

@ggerganov ggerganov merged commit 2330de7 into ggml-org:master Oct 20, 2025
70 of 71 checks passed
safranowith added a commit to safranowith/llama.cpp that referenced this pull request Oct 20, 2025
…l-org#16613)

* SYCL: Add support for FLOOR,CEIL,ROUND and TRUNC unary operators

Clean up unrelated changes from previous commit

* Chore: remove empty lines and fix indentation

* Clean up: remove leftover blank lines and fix spacing

* chore: fix trailing whitespace and ensure final newline

* Cleanup: remove redundant declarations already defined in header

* Sync docs/ops.md with updated backend operation support

* docs: update ops.md after rebase

* docs: update ops.md - Vulkan supports SSM_CONV and SSM_SCAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants