Graphical Processing Units (GPUs) are a kind of computer processor. They can accelerate certain tasks that are specifically coded to use them, providing faster turnaround and cost savings compared to virtual machines (VMs) only using traditional CPUs. Learn how to set runtime parameters to use GPUs rather than standard CPU-only VMs when running a workflow.
Terra supports the following GPU types for a workflow analysis
- NVIDIA Tesla T4
- NVIDIA Tesla P4
- NVIDIA Tesla V100
- NVIDIA Tesla P100
What Are GPUs?
GPUs were originally developed to process graphical information for video games, which require extremely fast rendering to make the graphics realistic. GPUs specialize in handling certain types of calculations for graphical data very efficiently. In the computational biology world, GPUs are commonly used for
- Training a neural network (note that using the trained network is usually done on CPU)
- Any other scientific computing applications that require a lot of matrix or vector operations
How to set WDL runtime parameters to use GPUs
To use GPUs in a workflow, you need to edit the WDL script to set the runtime parameters appropriately. To edit the WDL script, upload your workflow to the Terra Wowkrflows Repository, and follow the instructions in Create, edit, and share a new workflow.
Cost caveat: Make sure your workflow's tool supports GPUs!To use GPUs, your tool (inside the WDL wrapper) must support GPUs and have that option explicitly enabled. If you use these GPU parameters but your WDL does not use or support them, you'll pay for a GPU that sits idle!
The runtime parameters you will add will look something like this (you may want different numbers or use different zones).
runtime {
gpuType: "nvidia-tesla-t4"
gpuCount: 2
nvidiaDriverVersion: "418.87.00"
zones: ["us-central1-c"]
}
What to expect
Once you adjust the WDL runtime parameters in the Broad Methods Repository, you will see a new snapshot of the workflow to run. You don't need to export this workflow to Terra again. Just go to the Workflow tab to toggle between the snapshots when you click into the workflow.