Skip to content

Conversation

Acly
Copy link
Collaborator

@Acly Acly commented Oct 21, 2025

test-thread-safety fails with multiple backends that see the same device (eg. CUDA + Vulkan)

llama_model_load_from_file_impl: skipping device Vulkan0 (NVIDIA GeForce RTX 4070) with id 0000:2b:00.0 - already using device CUDA0 (NVIDIA GeForce RTX 4070) with the same id
llama_model_load_from_file_impl: invalid value for main_gpu: 1 (available devices: 1)
main: failed to load model 'C:\Users\aclys\AppData\Local\llama.cpp\ggml-org_models_tinyllamas_stories15M-q4_0.gguf'

This aligns the test's device enumeration with the one in llama_model_load_from_file to count only unique devices

@Acly Acly requested a review from slaren as a code owner October 21, 2025 09:36
@github-actions github-actions bot added the testing Everything test related label Oct 21, 2025
Copy link
Member

@slaren slaren left a comment

Choose a reason for hiding this comment

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

I think it would be better to set llama_model_params::devices to the device we want to test instead of main_gpu. There is also no reason to skip duplicated devices here, since the goal is to test the backend implementation.

* run one test per backend/device (even if it's the same device)
@Acly Acly force-pushed the test-thread-multi-backend branch from 65e0687 to 16fc747 Compare October 21, 2025 11:48
@Acly
Copy link
Collaborator Author

Acly commented Oct 21, 2025

I think it would be better to set llama_model_params::devices to the device we want to test instead of main_gpu. There is also no reason to skip duplicated devices here, since the goal is to test the backend implementation.

Makes sense, I updated the code.

@slaren slaren merged commit d8eaa26 into ggml-org:master Oct 22, 2025
70 checks passed
FMayran pushed a commit to FMayran/llama.cpp that referenced this pull request Oct 23, 2025
…gml-org#16699)

* run one test per backend/device (even if it's the same device)
pwilkin pushed a commit to pwilkin/llama.cpp that referenced this pull request Oct 23, 2025
…gml-org#16699)

* run one test per backend/device (even if it's the same device)
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