GPU acceleration for UDFs
Learn about how you can use GPU acceleration for AI workloads in user defined functions (UDFs).
Exasol’s script language container (SLC) architecture allows you to package custom runtime environments for UDFs, including environments with GPU libraries such as NVIDIA CUDA. This enables workloads like model inference and numerical computation to run on GPU hardware attached to your Exasol cluster nodes.
GPU support in Exasol UDFs works by building a custom SLC with CUDA libraries and running on cluster nodes that have NVIDIA GPUs. This article describes the general approach based on the SLC customization framework and standard CUDA container patterns. For the latest build instructions and flavor definitions, refer to the script-languages-release GitHub repository.
How GPU acceleration works with UDFs
Exasol runs UDF code inside Docker-based script language containers. Each cluster node executes UDF instances in its own container. When you build a custom SLC that includes CUDA toolkit libraries, and the underlying cluster node has an NVIDIA GPU with the appropriate drivers, UDF code inside the container can offload computation to the GPU.
This means that the UDF itself (written in Python, for example) calls GPU-accelerated libraries such as PyTorch, TensorFlow, or CuPy. The SLC provides the runtime environment; the GPU hardware provides the acceleration.
Workloads that benefit from GPU
Not every UDF workload needs GPU acceleration. The overhead of transferring data between CPU and GPU memory means small or simple operations often run faster on CPU alone.
GPU acceleration is most useful for:
- Model inference: Running predictions through neural networks (transformer models, CNNs, LLMs) where batch matrix operations dominate the compute time.
- Model training and fine-tuning: Training or adapting ML models on data inside Exasol, though this is less common for in-database use cases.
- Numerical computation: Large-scale linear algebra, signal processing, or custom CUDA kernels for domain-specific analytics.
For traditional ML workloads (scikit-learn, XGBoost with small datasets, simple statistical models), CPU-based UDFs are typically sufficient.
What to expect
GPU acceleration for Exasol UDFs works through the same SLC customization framework used for any custom Python environment. Keep the following in mind:
- You build the GPU SLC yourself. Use the script-languages-release tooling to create a CUDA-enabled container tailored to your workload and GPU hardware.
- The
exasol-slcagent skill covers CUDA/GPU. The Exasol Agent Skills collection on GitHub includes SLC guidance for CUDA-enabled containers. - Cluster-level configuration is required. Enabling GPU passthrough to UDF containers requires working with your Exasol administrator or Exasol support.
- Cloud deployments need GPU instance types. On cloud providers, select GPU-enabled instances (for example, AWS
p3/g4dn, AzureNCseries, GCPa2). For Exasol SaaS, confirm GPU availability with Exasol support.
Next steps
-
To learn how to install and configure GPU support in Exasol, see Install and configure GPU support
-
To learn how to use GPU acceleration in UDFs, see GPU support for UDFs