Skip to content

test-opt: fix backend support check - #15317

Merged
JohannesGaessler merged 2 commits into
ggml-org:masterfrom
JohannesGaessler:test-opt-fix-sycl
Aug 15, 2025
Merged

JohannesGaessler merged 2 commits into
ggml-org:masterfrom
JohannesGaessler:test-opt-fix-sycl

Conversation

@JohannesGaessler

Copy link
Copy Markdown
Contributor

The tests in tests/test-opt were never activated in the llama.cpp repository until #13873 . The problem is that ggml_opt internally tries to allocate AdamW/SGD optimizer steps which are not supported in all backends. So it becomes necessary to check support for these optimizer steps ahead of time (otherwise the intentionally simple function ggml_opt_fit would need to be made overly complicated). This PR allocates simple test tensors for the ops in the test code, if the ops are not supported the tests are skipped.

@github-actions github-actions Bot added the testing Everything test related label Aug 14, 2025
Comment thread tests/test-opt.cpp Resolved
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@JohannesGaessler
JohannesGaessler merged commit b07791a into ggml-org:master Aug 15, 2025
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
MrLordCat referenced this pull request in MrLordCat/llama.cpp-rdna-lab Jul 16, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
* test-opt: fix backend support check

* Update tests/test-opt.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants