GithubHelp home page GithubHelp logo

cuda-util's Introduction

cuda-util

Collection of utility methods & structs for working with the CUDA language.

Main types:

  • GpuVec is the equivalent of a Vec, but is stored on the GPU.
  • Tensor is an n-dimensional array type that can be easily transferred to and from the GPU.

cuda-macros

The main purpose of cuda-macros is to define three attributes that perform the same function as the __global__, __device__ and __host__ attributes do in the C language.

To use these macros, a build.rs file must be defined that runs the build() function in the cuda-macros-build crate. See the cuda-macros-test crate for an example crate.

Attribute(s) CPU callable GPU callable Runs on
#[global] ✔️ ✔️️️️️️ GPU
#[device] ️️️✔️️️️️️ GPU
#[host] ✔️ CPU

The #[host] and #[device] attributes can be combined, in which case two versions will be generated, one for the host and one for the device. The function will be run on whichever system it was called from.

In CUDA terminology, the CPU is the host, and the GPU is the device.

cuda-util's People

Contributors

trolleyman avatar

Watchers

 avatar

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.