Skip to content
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

Upgrade init_tensor API to return a ggml_status #11854

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WilliamTambellini
Copy link
Contributor

To prepare for an 'abort-free' ggml, as agreeed with Diego in the ggml repo, upgrade the backend init_tensor APIs to return a ggml_status.

Make sure to read the contributing guidelines before submitting a PR

@github-actions github-actions bot added testing Everything test related Nvidia GPU Issues specific to Nvidia GPUs Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Feb 14, 2025
@WilliamTambellini
Copy link
Contributor Author

@slaren review please. Tks.

@WilliamTambellini
Copy link
Contributor Author

Tks @slaren
Reready for review.

@WilliamTambellini WilliamTambellini force-pushed the init_tensor branch 3 times, most recently from 29998fc to e2486eb Compare February 18, 2025 22:04
To prepare for an 'abort-free' ggml
(ggml not to abort on OOMs but return a OOM status),
as agreeed with Diego in the ggml repo,
upgrade the init_tensor() and view_init() APIs
to return a ggml_status.
graehl

This comment was marked as outdated.

Copy link

@graehl graehl left a comment

Choose a reason for hiding this comment

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

ok, so ggml_backend_*_buffer_init_tensor can only return success for most backends but since it's called through the interface init_tensor pointer they still need to return success. was the plan to eventually make cuda_init_tensor sometimes return an error?

@WilliamTambellini
Copy link
Contributor Author

Tks @graehl

so ggml_backend_*_buffer_init_tensor can only return success for most backends but since it's called through the interface init_tensor pointer they still need to return success. was the plan to eventually make cuda_init_tensor sometimes return an error?

Yes but that a another PR in the ggml repo

@WilliamTambellini
Copy link
Contributor Author

@slaren reready for review please. Best.

Copy link
Contributor

@matiaslin matiaslin left a comment

Choose a reason for hiding this comment

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

Good step forward towards the goal of returning an error instead of crashing.

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 Nvidia GPU Issues specific to Nvidia GPUs SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language testing Everything test related Vulkan Issues specific to the Vulkan backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants