Skip to content

A plugin for Jupyter Notebook to run CUDA C/C++ code

Notifications You must be signed in to change notification settings

cxzzzz/nvcc4jupyter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NVCC Plugin for Jupyter notebook

V2 is available

V2 brings support of multiple source and header files.

Usage
  • Load Extension

%load_ext nvcc_plugin

  • Mark a cell to be treated as cuda cell

%%cuda --name example.cu --compile false

NOTE: The cell must contain either code or comments to be run successfully. It accepts 2 arguments. -n | --name - which is the name of either CUDA source or Header The name parameter must have extension .cu or .h Second argument -c | --compile; default value is false. The argument is a flag to specify if the cell will be compiled and run right away or not. It might be usefull if you're playing in the main function

  • To compile and run all CUDA files you need to run
%%cuda_run
# This line just to bypass an exeption and can contain any text

About

A plugin for Jupyter Notebook to run CUDA C/C++ code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%