title | titleSuffix | description | services | ms.service | ms.subservice | ms.topic | ms.author | author | ms.date | ms.custom |
---|---|---|---|---|---|---|---|---|---|---|
What are compute targets |
Azure Machine Learning |
Learn how to designate a compute resource or environment to train or deploy your model with Azure Machine Learning. |
machine-learning |
machine-learning |
core |
conceptual |
sgilley |
sdgilley |
10/21/2021 |
ignite-fall-2021, event-tier1-build-2022 |
A compute target is a designated compute resource or environment where you run your training script or host your service deployment. This location might be your local machine or a cloud-based compute resource. Using compute targets makes it easy for you to later change your compute environment without having to change your code.
In a typical model development lifecycle, you might:
- Start by developing and experimenting on a small amount of data. At this stage, use your local environment, such as a local computer or cloud-based virtual machine (VM), as your compute target.
- Scale up to larger data, or do distributed training by using one of these training compute targets.
- After your model is ready, deploy it to a web hosting environment with one of these deployment compute targets.
The compute resources you use for your compute targets are attached to a workspace. Compute resources other than the local machine are shared by users of the workspace.
Azure Machine Learning has varying support across different compute targets. A typical model development lifecycle starts with development or experimentation on a small amount of data. At this stage, use a local environment like your local computer or a cloud-based VM. As you scale up your training on larger datasets or perform distributed training, use Azure Machine Learning compute to create a single- or multi-node cluster that autoscales each time you submit a run. You can also attach your own compute resource, although support for different scenarios might vary.
[!INCLUDE aml-compute-target-train]
Learn more about how to submit a training run to a compute target.
When performing inference, Azure Machine Learning creates a Docker container that hosts the model and associated resources needed to use it. This container is then used in a compute target.
[!INCLUDE aml-deploy-target]
Learn where and how to deploy your model to a compute target.
A managed compute resource is created and managed by Azure Machine Learning. This compute is optimized for machine learning workloads. Azure Machine Learning compute clusters and compute instances are the only managed computes.
You can create Azure Machine Learning compute instances or compute clusters from:
- Azure Machine Learning studio.
- The Python SDK and the Azure CLI:
- An Azure Resource Manager template. For an example template, see Create an Azure Machine Learning compute cluster.
When created, these compute resources are automatically part of your workspace, unlike other kinds of compute targets.
Capability | Compute cluster | Compute instance |
---|---|---|
Single- or multi-node cluster | ✓ | Single node cluster |
Autoscales each time you submit a run | ✓ | |
Automatic cluster management and job scheduling | ✓ | ✓ |
Support for both CPU and GPU resources | ✓ | ✓ |
Note
When a compute cluster is idle, it autoscales to 0 nodes, so you don't pay when it's not in use. A compute instance is always on and doesn't autoscale. You should stop the compute instance when you aren't using it to avoid extra cost.
When you select a node size for a managed compute resource in Azure Machine Learning, you can choose from among select VM sizes available in Azure. Azure offers a range of sizes for Linux and Windows for different workloads. To learn more, see VM types and sizes.
There are a few exceptions and limitations to choosing a VM size:
- Some VM series aren't supported in Azure Machine Learning.
- Some VM series are restricted. To use a restricted series, contact support and request a quota increase for the series. For information on how to contact support, see Azure support options.
See the following table to learn more about supported series and restrictions.
Supported VM series | Restrictions | Category | Supported by |
---|---|---|---|
DDSv4 | None. | General purpose | Compute clusters and instance |
Dv2 | None. | General purpose | Compute clusters and instance |
Dv3 | None. | General purpose | Compute clusters and instance |
DSv2 | None. | General purpose | Compute clusters and instance |
DSv3 | None. | General purpose | Compute clusters and instance |
EAv4 | None. | Memory optimized | Compute clusters and instance |
Ev3 | None. | Memory optimized | Compute clusters and instance |
ESv3 | None. | Memory optimized | Compute clusters and instance |
FSv2 | None. | Compute optimized | Compute clusters and instance |
FX | Requires approval. | Compute optimized | Compute clusters |
H | None. | High performance compute | Compute clusters and instance |
HB | Requires approval. | High performance compute | Compute clusters and instance |
HBv2 | Requires approval. | High performance compute | Compute clusters and instance |
HBv3 | Requires approval. | High performance compute | Compute clusters and instance |
HC | Requires approval. | High performance compute | Compute clusters and instance |
LSv2 | None. | Storage optimized | Compute clusters and instance |
M | Requires approval. | Memory optimized | Compute clusters and instance |
NC | None. | GPU | Compute clusters and instance |
NC Promo | None. | GPU | Compute clusters and instance |
NCv2 | Requires approval. | GPU | Compute clusters and instance |
NCv3 | Requires approval. | GPU | Compute clusters and instance |
ND | Requires approval. | GPU | Compute clusters and instance |
NDv2 | Requires approval. | GPU | Compute clusters and instance |
NV | None. | GPU | Compute clusters and instance |
NVv3 | Requires approval. | GPU | Compute clusters and instance |
NCasT4_v3 | Requires approval. | GPU | Compute clusters and instance |
NDasrA100_v4 | Requires approval. | GPU | Compute clusters and instance |
While Azure Machine Learning supports these VM series, they might not be available in all Azure regions. To check whether VM series are available, see Products available by region.
Note
Azure Machine Learning doesn't support all VM sizes that Azure Compute supports. To list the available VM sizes, use one of the following methods:
If using the GPU-enabled compute targets, it is important to ensure that the correct CUDA drivers are installed in the training environment. Use the following table to determine the correct CUDA version to use:
GPU Architecture | Azure VM Series | Supported CUDA versions |
---|---|---|
Ampere | NDA100_v4 | 11.0+ |
Turing | NCT4_v3 | 10.0+ |
Volta | NCv3, NDv2 | 9.0+ |
Pascal | NCv2, ND | 9.0+ |
Maxwell | NV, NVv3 | 9.0+ |
Kepler | NC, NC Promo | 9.0+ |
In addition to ensuring the CUDA version and hardware are compatible, also ensure that the CUDA version is compatible with the version of the machine learning framework you are using:
- For PyTorch, you can check the compatibility by visiting Pytorch's previous versions page.
- For Tensorflow, you can check the compatibility by visiting Tensorflow's build from source page.
Azure Machine Learning compute offers VM sizes that are isolated to a specific hardware type and dedicated to a single customer. Isolated VM sizes are best suited for workloads that require a high degree of isolation from other customers' workloads for reasons that include meeting compliance and regulatory requirements. Utilizing an isolated size guarantees that your VM will be the only one running on that specific server instance.
The current isolated VM offerings include:
- Standard_M128ms
- Standard_F72s_v2
- Standard_NC24s_v3
- Standard_NC24rs_v3*
*RDMA capable
To learn more about isolation, see Isolation in the Azure public cloud.
An unmanaged compute target is not managed by Azure Machine Learning. You create this type of compute target outside Azure Machine Learning and then attach it to your workspace. Unmanaged compute resources can require additional steps for you to maintain or to improve performance for machine learning workloads.
Azure Machine Learning supports the following unmanaged compute types:
- Your local computer
- Remote virtual machines
- Azure HDInsight
- Azure Batch
- Azure Databricks
- Azure Data Lake Analytics
- Azure Container Instance
- Azure Kubernetes Service & Azure Arc-enabled Kubernetes (preview)
For more information, see set up compute targets for model training and deployment
Learn how to: