Skip to content

Add info about CUDA_VISIBLE_DEVICES #1682

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 3, 2023
Merged

Add info about CUDA_VISIBLE_DEVICES #1682

merged 1 commit into from
Jun 3, 2023

Conversation

SlyEcho
Copy link
Collaborator

@SlyEcho SlyEcho commented Jun 3, 2023

Add a sentence about GPU selection on CUDA.

Relevant: #1546

@SlyEcho SlyEcho merged commit d8bd001 into master Jun 3, 2023
@SlyEcho SlyEcho deleted the docs-update branch June 3, 2023 13:35
@roperscrossroads
Copy link

@SlyEcho

Does this actually work? I struggled with this a few days ago using a slightly older version of llama.cpp. It kept loading into my internal mobile 1050ti and running out of memory instead of using my 3090 (egpu). I was doing something like this:

CUDA_VISIBLE_DEVICES=1 ./main -ngl 60 -m models/model.bin

It always went to the internal GPU with id 0.

Tomorrow morning I will give it another try, but I do not think it works if you set the ID from nvidia-smi (in my case: 1050ti: 0, 3090: 1).

@JohannesGaessler
Copy link
Collaborator

CUDA_VISIBLE_DEVICES does work on my test machine using the master branch. In any case, it should be possible to just control this via a CLI argument before long. My current plan is to add something like a --tensor-split argument for the compute-heavy matrix multiplication tensors and a --main-gpu argument for all other tensors where multi GPU wouldn't be worthwhile.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants