Skip to content

test-opt: fix backend support check#15317

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

test-opt: fix backend support check#15317
JohannesGaessler merged 2 commits intoggml-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
Co-authored-by: Georgi Gerganov <[email protected]>
@JohannesGaessler JohannesGaessler merged commit b07791a into ggml-org:master Aug 15, 2025
46 of 47 checks passed
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 <[email protected]>

---------

Co-authored-by: Georgi Gerganov <[email protected]>
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