Skip to content

Conversation

@giuseppe
Copy link
Contributor

ggml_vk_create_buffer_temp is not used anywhere, and it is the only caller for ggml_vk_pool_malloc.

There are also these functions that are never used, but they are referenced by a comment:

/* .set_tensor_async        = */ NULL,  // ggml_backend_vk_set_tensor_async,
/* .get_tensor_async        = */ NULL,  // ggml_backend_vk_get_tensor_async,
/* .cpy_tensor_async        = */ NULL,  // ggml_backend_vk_cpy_tensor_async,
/* .synchronize             = */ NULL,  // ggml_backend_vk_synchronize,

So I've not touched them. Should they be removed too?

@giuseppe giuseppe requested a review from 0cc4m as a code owner October 23, 2025 07:56
@github-actions github-actions bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Oct 23, 2025

// Otherwise create new buffer
vk_buffer buf = ggml_vk_pool_malloc(ctx, size);
ctx->gc.temp_buffers.push_back(buf);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you could also remove temp_buffers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, I had missed that. Fixed now

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can also remove buffer_pool, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed as well

@jeffbolznv
Copy link
Collaborator

I think we should keep the async functions, it would be good to eventually enable them, though I think the only practical benefits currently are when using tensor parallelism in the cuda backend.

@giuseppe giuseppe force-pushed the vulkan-drop-dead-code branch from 70c80e4 to ae3fc5e Compare October 23, 2025 16:07
ggml_vk_create_buffer_temp is not used anywhere, and it is the only
caller for ggml_vk_pool_malloc.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the vulkan-drop-dead-code branch from ae3fc5e to edb5db7 Compare October 23, 2025 16:16
Copy link
Collaborator

@0cc4m 0cc4m left a comment

Choose a reason for hiding this comment

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

Thank you.

@0cc4m 0cc4m merged commit f90b4a8 into ggml-org:master Oct 25, 2025
71 of 72 checks passed
wqerrewetw added a commit to wqerrewetw/llama.cpp that referenced this pull request Oct 25, 2025
* model-conversion : add trust_remote_code for orig model run [no ci] (ggml-org#16751)

This commit add the trust_remote_code=True argument when loading models
using AutoConfig, AutoTokenizer, and AutoModelForCausalLM for the run
original model script.

The motivation for this is that some models require custom code to be
loaded properly, and setting trust_remote_code=True avoids a prompt
asking for user confirmation:
```console
(venv) $ make causal-run-original-model
The repository /path/to/model contains custom code which must be
executed to correctly load the model. You can inspect the repository
content at /path/to/model.

Do you wish to run the custom code? [y/N] N
```

Having this as the default seems like a safe choice as we have to clone
or download the models we convert and would be expecting to run any
custom code they have.

* webui: support q URL parameter (ggml-org#16728)

* webui: support q URL parameter

Fixes ggml-org#16722
I’ve checked that it works with Firefox’s AI tools

* webui: apply suggestions from code review

Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>

* chore: update webui static build

---------

Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>

* CUDA: use CUB for arbitary size argsort (ggml-org#16754)

* ggml: fix CUDA grid launch condition for large block_nums.y in binbcast (ggml-org#16742)

* Fix CUDA grid launch condition for large block_nums.y

* add backend ops test

* reduce test  repetitions

* convert : avoid dequantizing mxfp4 for GPT-OSS (ggml-org#16756)

* vulkan: Optimize SSM_SCAN (ggml-org#16645)

* vulkan: delete dead code (ggml-org#16732)

ggml_vk_create_buffer_temp is not used anywhere, and it is the only
caller for ggml_vk_pool_malloc.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

* model : set res->t_embd in PLaMo2 models (ggml-org#16766)

---------

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Co-authored-by: Florian Badie <florianbadie@odrling.xyz>
Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>
Co-authored-by: Aman Gupta <amangupta052@gmail.com>
Co-authored-by: leejet <leejet714@gmail.com>
Co-authored-by: compilade <git@compilade.net>
Co-authored-by: Jeff Bolz <jbolz@nvidia.com>
Co-authored-by: Giuseppe Scrivano <gscrivan@redhat.com>
Co-authored-by: Shunta Saito <shunta.saito@gmail.com>
pwilkin pushed a commit to pwilkin/llama.cpp that referenced this pull request Oct 25, 2025
ggml_vk_create_buffer_temp is not used anywhere, and it is the only
caller for ggml_vk_pool_malloc.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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 Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants