Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Introduction to cuTile Python

Authors
Affiliations
University of Wisconsin-Madison
prefix.dev GmbH
NVIDIA

There are many applications of CUDA in scientific computing and in recent years a large growth of applications in the scientific Python ecosystem with the advent of CUDA Python. In this section of the tutorial, we will familiarize ourselves with a recent addition to the CUDA Python ecosystem: cuTile Python. cuTile is a parallel programming model for NVIDIA GPUs and a Python-based DSL.

For the purposes of this tutorial, we are not going to fully work through all of the interesting foundations of cuTile and CUDA Tile. Instead, we are going to take a high-level approach to learning the cuTile Python API through working through a cuTile demonstration in a Jupyter notebook in the tutorial source repository.

Move work over to Brev

Use of CUDA requires an NVIDIA GPU, so the following sections of the tutorial will require access to a machine with an NVIDIA GPU and CUDA driver. We will use the NVIDIA Brev platform to achieve this. Part of the tutorial setup covered Brev setup, login, and instance provisioning. Return to that section now and provision a Brev instance as described. When you have finished with that return to this section.

Reviewing Pixi workspace for cuTile

Once you have provisioned and logged into your Brev instance you will find that the instance has already cloned the tutorial source repository under your home directory. Navigate to the top level of the repository

cd ${HOME}/reproducible-cuda-workflows-with-pixi-scipy-2026

and then to book/code/cutile-python-intro

cd book/code/cutile-python-intro

We have already provided a Pixi workspace for cuTile, but let’s quickly inspect it to make sure that you could create it yourself.

pixi.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[workspace]
channels = ["conda-forge"]
name = "cutile-python-example"
platforms = [
  { name = "linux-64-cuda", platform = "linux-64", cuda = "13" },
  { name = "win-64-cuda", platform = "win-64", cuda = "13" }
]
version = "0.1.0"

[dependencies]
numpy = ">=2.4.6,<3"
numba-cuda = ">=0.30.4,<0.31"
cupy = ">=14.1.1,<15"
cutile-python = ">=1.4.0,<2"
cuda = ">=13.3.1,<14"
notebook = ">=7.6.0,<8"
jupyterlab = ">=4.6.1,<5"

In the manifest we:

Now make sure that the default environment containing all the dependencies is installed for use with

pixi install

Interacting with the cuTile notebook on Brev

To be able to use the environment with cuTile in the Pixi manifest and use the Jupyter notebook cutile-python-intro.ipynb on Brev there are two options.

Connect VS Code to the Brev instance

  1. Open a connection from your local machine to the Brev instance with VS Code.

    brev open $(whoami)-scipy-2026 code
  2. In your VS Code file browser, navigate to reproducible-cuda-workflows-with-pixi-scipy-2026/book/code/cutile-python-intro/.

  3. Click on the cutile-python-intro.ipynb notebook to open it.

  4. Switch the ipykernel being used for the notebook by clicking on the “Select Kernel” button on the upper-right-hand side of the screen and selecting the “Install/Enable suggested extensions Python + Jupyter”. This will install the VS Code extensions groups Python and Jupyter into your Brev instance if they are not already (they should be already as part of the Brev instance startup script).

    install-vscode-extensions-view
  5. After the extensions install, the “Select Another Kernel” menu should open. Select “Jupyter Kernel” from the dropdown menu.

    select-another-kernel-view
  6. Select “Python (Pixi) .pixi/bin/pixi” from the “Select a Jupyter Kernel” menu.

    select-jupyter-kernel-view

    The running kernel name should now show “Python (Pixi)”.

You can now execute the notebook in VS Code using the environment from the Pixi workspace!

Use the Brev instance’s Jupyter Lab

  1. Visit your Brev instance’s “GPU environments” page on https://brev.nvidia.com/ (or just login again with brev login).

  2. Click on your current running instance (which should be named your values of $(whoami)-scipy-2026).

  3. Click the “Open Notebook” button on the right-hand side of the screen. This will launch a Jupyter Lab instance on your Brev instance.

    brev-open-notebook-view
  4. Using JupyterLab’s file browser on the left-hand side of the screen navigate to reproducible-cuda-workflows-with-pixi-scipy-2026/book/code/cutile-python-intro/.

  5. Click on the cutile-python-intro.ipynb notebook to open it.

  6. Switch the ipykernel being used for the notebook by clicking on the default kernel name (Python 3 (ipykernel)) on the upper-right-hand side of the screen and in the “Select Kernel” menu select “Python (Pixi)” (under “Start python Kernel”) and then click “Select”.

    switch-kernel-buttonselect-kernel-view

    The running kernel name should now show “Python (Pixi)”.

You can now execute the notebook in Jupyter Lab using the environment from the Pixi workspace!

Explore cuTile Python in the Jupyter notebook

You can now proceed with the cuTile notebook example.