Skip to content

What is the correct way of using only a certain number of GPUs? #9440

Closed Answered by tgravescs
an-ys asked this question in Q&A
Discussion options

You must be logged in to vote

so for standalone mode, the easiest way is likely to change the discovery script. Ideally setting the number of gpu per workers would have done it but the spark community decided it gets overridden by what the discover script actually finds.

So normally in Spark standalone when you launch your worker you do something like:
SPARK_WORKER_OPTS="-Dspark.worker.resource.gpu.amount=4 -Dspark.worker.resource.gpu.discoveryScript=/opt/sparkRapidsPlugin/getGpusResources.sh"

The getGpusResources.sh script is what is returning the GPU indices available on the node that are used by the Spark worker. So if you want to just limit it to say 1 GPU you could modify that script to change the lookup to be so…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@an-ys
Comment options

@tgravescs
Comment options

@an-ys
Comment options

Answer selected by mattahrens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants