Skip to content

opencl: ref count ggml_backend_opencl_context and refactor profiling #14254

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 1 commit into
base: master
Choose a base branch
from

Conversation

lhez
Copy link
Contributor

@lhez lhez commented Jun 18, 2025

This PR adds reference counter to ggml_backend_opencl_context to properly track the references to the backend. In multimodal models, there are usually two references to the backend, one for the language part and one for the vision part.

In addition,

  • Move profiling info into ggml_backend_opencl_context
  • Add enqueue_ndrange_kernel to launch kernel

Make sure to read the contributing guidelines before submitting a PR

* Move profiling info into `ggml_backend_opencl_context`
* Add `enqueue_ndrange_kernel` to launch kernel
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jun 18, 2025
@lhez lhez marked this pull request as ready for review June 18, 2025 16:16
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant