Uploaded January 2026 | Updated December 2026, 3 days ago
In the era of machine learning and artificial intelligence, GPU acceleration has become indispensable for handling computationally intensive tasks efficiently. This talk explores how to integrate CUDA - NVIDIA's powerful parallel computing platform - with Go, to leverage GPU power in your applications. We'll start with an introduction to GPU computing and the CUDA programming model, explaining why and when to use GPU acceleration, particularly in the context of AI and ML. Finally, we'll guide you through setting up your development environment to work with Go and CUDA.
Using Go's cgo, we will demonstrate:
How to call CUDA functions from Go;
Managing memory between the CPU and GPU;
Debugging and performance monitoring.
We will also cover common patterns that will help your applications run smoothly. Through practical examples, you will learn how to implement and optimize GPU-accelerated computations in Go. By the end of this talk, you'll be equipped to start incorporating GPU acceleration into your Go projects, achieving significant performance improvements for compute-intensive tasks, including those in machine learning and artificial intelligence.
In the era of machine learning and artificial intelligence, GPU acceleration has become indispensable for handling computationally intensive tasks efficiently. This talk explores how to integrate CUDA - NVIDIA's powerful parallel computing platform - with Go, to leverage GPU power in your applications. We'll start with an introduction to GPU computing and the CUDA programming model, explaining why and when to use GPU acceleration, particularly in the context of AI and ML. Finally, we'll guide you through setting up your development environment to work with Go and CUDA.
Using Go's cgo, we will demonstrate:
How to call CUDA functions from Go;
Managing memory between the CPU and GPU;
Debugging and performance monitoring.
We will also cover common patterns that will help your applications run smoothly. Through practical examples, you will learn how to implement and optimize GPU-accelerated computations in Go. By the end of this talk, you'll be equipped to start incorporating GPU acceleration into your Go projects, achieving significant performance improvements for compute-intensive tasks, including those in machine learning and artificial intelligence.







![GopherCon 2022: Profile-Guided Optimization in the Go Compiler - Jin Lin
Inefficiencies in Go programs can be isolated via profiling tools such as pprof and linux profiler perf. Such tools can pinpoint source code regions where most of the execution time is spent. Unlike other optimizing compilers such as LLVM, the Go compiler does not yet perform Profile-Guided Optimization(PGO). PGO uses information about the code’s runtime behavior to guide compiler optimizations such as inlining, code layout, etc. PGO can improve application performance in the range of 15-30% [LLVM]. In this Lightning Talk, we extend the Go compiler with PGO. Specifically, we incorporate the profiles into the compiler frontend, backend, and linker to perform profile-guided inlining, code specialization, basic block layout, and function reordering optimizations. The format of the profile file consumed by our PGO is identical to the protobuf format produced by the pprof tool. This format is rich enough to carry additional hardware performance counter information.
The first version of the code that performs profile-guided inlining is being upstreamed to Go at https://go-review.googlesource.com/c/go/+/429863 and the proposal is at https://go-review.googlesource.com/c/proposal/+/430398/2/design/55025-pgo-design.md GopherCon 2022: Profile-Guided Optimization in the Go Compiler - Jin Lin](https://i.ytimg.com/vi/fYB5uhyDi7c/mqdefault.jpg)


