GithubHelp home page GithubHelp logo

lambdaclass / metal_playground Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 774 KB

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

License: Apache License 2.0

Rust 50.98% Makefile 49.02%

metal_playground's Introduction

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

metal_playground's People

Contributors

xqft avatar iavecilla avatar

Stargazers

 avatar Ostap Holiaka avatar  avatar Tal Derei avatar Shun Kakinoki avatar  avatar Federico Carrone avatar

Watchers

James Cloos avatar  avatar Javier Rodríguez Chatruc avatar

metal_playground's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.