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

Allow using a custom Spark Resource Name for a GPU #4024

Merged
merged 9 commits into from
Nov 4, 2021

Conversation

tgravescs
Copy link
Collaborator

@tgravescs tgravescs commented Nov 3, 2021

This covers the case if someone uses a custom resource name with Spark that is actually a GPU it lets the plugin discover that resource.

For instance instead of using the standard gpu scheduling config: spark.executor.resource.gpu.amount=1, instead they make a custom GPU resource named nvidia/gpu and specify that like spark.executor.resource.nvidia/gpu.amount=1.

Our device plugin specifically was expecting the spark resource to be called "gpu". This adds a config to allow it to be changed.

Specifically adding this to later be used with MIG support for Spark on YARN. relates to #4023
More documentation in the MIG context will come later.

@tgravescs tgravescs added the feature request New feature or request label Nov 3, 2021
@tgravescs tgravescs self-assigned this Nov 3, 2021
@tgravescs tgravescs changed the title Allow using custom the Spark Resource Name for a GPU Allow using a custom Spark Resource Name for a GPU Nov 3, 2021
@tgravescs
Copy link
Collaborator Author

build

val gpu = new ResourceInformation("gpu", Array("3"))
val resources = Map("gpu" -> gpu)
val gpuAddr = GpuDeviceManager.getGPUAddrFromResources(resources, conf)
assert(gpuAddr.nonEmpty)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tgravescs tgravescs merged commit fcbe2ac into NVIDIA:branch-21.12 Nov 4, 2021
@tgravescs tgravescs deleted the gpuresourcename branch November 4, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants