Git Product home page Git Product logo

cudadrv.jl's Introduction

CUDAdrv.jl

Code Coverage: Coverage Status

This package wraps the CUDA driver API. It is meant for users who need low-level access to the CUDA toolkit or the underlying GPU. For a wrapper of the higher-level runtime API, see CUDArt.

Installation

Requirements:

  • Julia 0.5 or higher (use v0.1.0 of this package for compatibility with Julia 0.4)
  • CUDA toolkit: tested up until v8.0, newer versions might work but can be incompatible
  • CUDA hardware
Pkg.add("CUDAdrv")
Pkg.test("CUDAdrv")

Features

In general, this wrapper tries to stay close to the abstraction level of the CUDA driver API. However, there are some additional features:

Automatic memory management

Except for the encapsulating context, destroy or unload calls are never needed. Objects are registered with the Julia garbage collector, and are automatically finalized when they go out of scope.

However, many CUDA API functions implicitly depend on global state, such as the current active context. The wrapper needs to model those dependencies in order for objects not to get destroyed before any dependent object is. If we fail to model these dependency relations, API calls might randomly fail, eg. in the case of a missing context dependency with a INVALID_CONTEXT or CONTEXT_IS_DESTROYED error message.

If this seems to be the case, re-run with TRACE=1 and file a bug report.

Debugging

For extra information about what's happening behind the scenes, you can enable extra output by defining the DEBUG environment variable, or TRACE for even more information.

Note that these features are incompatible with precompilation as the debugging code is enabled statically in order to avoid any run-time overhead, so you need to wipe the compile cache or run Julia using --compilecache=no. Enabling colors with --color=yes is also recommended as it color-codes the output.

cudadrv.jl's People

Contributors

lindahua avatar maleadt avatar vchuravy avatar waltsims avatar

Watchers

 avatar  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.