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

opencl: Fix not enough space in the buffer #12197

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

linehill
Copy link
Contributor

@linehill linehill commented Mar 5, 2025

Fix the following error:

ggml-alloc.c:99: not enough space in the buffer
ggml_tallocr_alloc: not enough space in the buffer to allocate blk.17.ffn_down.weight (needed 27525120, available 27521024)

which occurs when ggml_backend_opencl_context::alignment is larger than cl_ptr_base (hard-coded to 0x1000).

Also, fix ggml_backend_opencl_context::alignment was set to CL_DEVICE_MEM_BASE_ADDR_ALIGN which was treated as bytes but the value is reported in bits.

Fix the following error:

```
ggml-alloc.c:99: not enough space in the buffer
ggml_tallocr_alloc: not enough space in the buffer to allocate blk.17.ffn_down.weight (needed 27525120, available 27521024)
```

which occurs when `ggml_backend_opencl_context::alignment` is larger
than `cl_ptr_base` (hard-coded to `0x1000`).

Also, fix `ggml_backend_opencl_context::alignment` was set to
`CL_DEVICE_MEM_BASE_ADDR_ALIGN` which was treated as bytes but the
value is reported in bits.
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Mar 5, 2025
@slaren slaren merged commit 94bb63e into ggml-org:master Mar 6, 2025
47 checks passed
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.

2 participants