Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Get started with GPU programming tutorial solution

This directory contains a complete solution for the Get started with GPU programming tutorial project, which is an implementation of a simple vector addition GPU kernel using Mojo. Please refer to the tutorial for an explanation of the code and concepts.

This example requires a supported GPU to run the kernel. If your system doesn't have a supported GPU, you can compile the program but the only output you'll see when you run it is:

No compatible GPU found

Files

This directory contains the following files:

  • vector_addition.mojo is the only source file for the tutorial solution, containing the kernel function and the main program.

  • pixi.toml is a Pixi project file containing the project dependencies and task definitions.

  • BUILD.bazel is a Bazel BUILD file for building and running the example with the Bazel build system.

Run the code

If you have Pixi installed, you can execute the example by running the following command:

pixi run mojo vector_addition.mojo