This project will help you get started using the Triton programming language on GPU resources in AzureML.
- access to an AzureML Studio workspace, subscription
- compute cluster of Nvidia GPU resources
Use these instructions if you want to get something working as quickly as possible. There are comments in the code but not much is explained here, so if you want more understanding of AzureML, you might look at the tutorials in the Resources section below.
- Go to AzureML Studio, go to your workspace, go to Notebooks
- Create a folder called
triton-examples/ - Add the files/folders from this repository
- Open triton_gpu_submit.ipynb
- Fill in your subscription information
subscription_id="YOUR-SUBSCRIPTION-ID",
resource_group_name="YOUR-RESOURCE-GROUP-NAME",
workspace_name="YOUR-WORKSPACE-NAME",
- Create a Compute using the Set your kernel instructions from this tutorial. You just need to create an low-end CPU type that can run your notebook code. The actual Pytorch/Triton code will get run on your GPU cluster.
- Complete the instructions at Create a Triton Environment below; then return here for the next step
- Where the script says
environment, replace the value with the name and version of the Environment you created
environment="acpt-triton-2@latest", # what environment the compute cluster node will be running
- In triton_gpu_submit.ipynb, run all the cells (runs on your cheap CPU compute). The last one actually submits your Triton/Pytorch job to the GPU cluster
- Open the link that gets printed to see the status of your job
- In that dashboard, when the job is finished you should the output of triton_gpu.py in Outputs + logs
- To test a different Triton program, add it to the triton-examples/src folder and change this line of the submit script to call your python file.
command="python activation.py",
We do not yet have a hosted Environment with Triton installed. Here is how you can quickly create your own.
You'll need an Environment with Pytorch and Triton installed. Here is one way to do it with Azure Container for Pytorch (ACPT), but you can pick the base environment you prefer.
- Follow these instructions: How to create Azure Container for PyTorch Custom Curated environment
- Use the option of a Dockerfile, use the contents shown here TODO
- Note the name you gave to the environment; you'll need to put it in your GPU submit script
- Azure Machine Learning documentation | Microsoft Learn
- see the Tutorial cards on the Home page of AzureML Studio
- repo of examples/tutorials: azureml-examples/tutorials at main · Azure/azureml-examples (github.com)
- How to create a compute cluster
- MLFlow