Skip to content

A repo for learning how to parallelize computations in the GPU using Apple's Metal, in Rust.

License

Notifications You must be signed in to change notification settings

lambdaclass/metal_playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metal playground in rust

Made for learning how to parallelize computations in the GPU using Apple's Metal, in Rust, via the metal crate.

Overview

The source code will contain documented examples of use, growing in complexity, aimed at a final objective of parallelize a Fast Fourier Transform algorithm.

Contents

  1. dotprod: learn the basics of Metal and metal-rs, implement a simple dot product between two vectors represented as uint arrays.
  2. matrixprod: a more complex example to learn about grid size and thread groups, implement a product between square matrices.
  3. memory: example to show how to shared memory between CPU and GPU. This example creates a vector to be modified from the GPU.

Pre-requisites

Running the examples

To run the examples, use the following command:

make example EXAMPLE={example}

To re-build all the necessary .metallib files, you can use

make compile_metal EXAMPLE={example}

where {example} is the name of the example to run in both commands.

References

About

A repo for learning how to parallelize computations in the GPU using Apple's Metal, in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published