Coder Social home page Coder Social logo

cuda.jl's Introduction

CUDA.jl

CUDA programming in Julia

Documentation Build Status Performance

The CUDA.jl package is the main programming interface for working with NVIDIA CUDA GPUs using Julia. It features a user-friendly array abstraction, a compiler for writing CUDA kernels in Julia, and wrappers for various CUDA libraries.

Requirements

The latest development version of CUDA.jl requires Julia 1.6 or higher. If you are using an older version of Julia, you need to use a released version of CUDA.jl. This will happen automatically when you install the package using Julia's package manager.

CUDA.jl currently also requires a CUDA-capable GPU with compute capability 3.5 (Kepler) or higher, and an accompanying NVIDIA driver with support for CUDA 10.1 or newer. These requirements are not enforced by the Julia package manager when installing CUDA.jl. Depending on your system and GPU, you may need to install an older version of the package.

Quick start

Before all, make sure you have a recent NVIDIA driver. On Windows, make sure you have the Visual C++ redistributable installed. You do not need to install the CUDA Toolkit.

CUDA.jl can be installed with the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add CUDA

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("CUDA")

For an overview of the CUDA toolchain in use, you can run the following command after importing the package:

julia> using CUDA

julia> CUDA.versioninfo()

This may take a while, as it will precompile the package and download a suitable version of the CUDA toolkit. If you prefer to use your own (not recommended), set the JULIA_CUDA_USE_BINARYBUILDER environment variable to false before importing the package.

If your GPU is not fully supported, the above command (or any other command that initializes the toolkit) will issue a warning. Your devices' compute capability will be listed as part of the versioninfo() output, but you can always query it explicitly:

julia> [CUDA.capability(dev) for dev in CUDA.devices()]
1-element Vector{VersionNumber}:
 v"5.0.0"

For more usage instructions and other information, please refer to the documentation.

Supporting and Citing

Much of the software in this ecosystem was developed as part of academic research. If you would like to help support it, please star the repository as such metrics may help us secure funding in the future. If you use our software as part of your research, teaching, or other activities, we would be grateful if you could cite our work. The CITATION.bib file in the root of this repository lists the relevant papers.

Project Status

The package is tested against, and being developed for, Julia 1.3 and above. Main development and testing happens on Linux, but the package is expected to work on macOS and Windows as well.

Questions and Contributions

Usage questions can be posted on the Julia Discourse forum under the GPU domain and/or in the #gpu channel of the Julia Slack.

Contributions are very welcome, as are feature requests and suggestions. Please open an issue if you encounter any problems.

cuda.jl's People

Contributors

maleadt avatar mikeinnes avatar vchuravy avatar kshyatt avatar github-actions[bot] avatar bors[bot] avatar andreasnoack avatar simondanisch avatar chengchingwen avatar lindahua avatar musm avatar haampie avatar jutho avatar qin-yu avatar roger-luo avatar jdnz avatar jrevels avatar yuehhua avatar femtocleaner[bot] avatar amontoison avatar dfdx avatar dpsanders avatar xaellison avatar marius311 avatar tejank10 avatar mohamed82008 avatar mbeltagy avatar timholy avatar avik-pal avatar philipvinc 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.