mirror of
https://github.com/andreinechaev/nvcc4jupyter.git
synced 2026-06-14 11:10:49 +05:30
Update readme to include useful badges
This commit is contained in:
@@ -1,37 +1,63 @@
|
|||||||
## NVCC Plugin for Jupyter notebook
|
# nvcc4jupyter: CUDA C++ plugin for Jupyter Notebook
|
||||||
|
|
||||||
### V2 is available
|
| | |
|
||||||
|
| --- | --- |
|
||||||
|
| Testing | ![Python Versions][python-version] [![CI - Test][test-badge]][test-workflow] [![Coverage][coverage-badge]][coverage-results] |
|
||||||
|
| Package | [![PyPI Latest Release][pypi-latest-version]][pypi-project-url] [![PyPI Downloads][pypi-downloads]][pypi-project-url] |
|
||||||
|
|
||||||
V2 brings support of multiple source and header files.
|
|
||||||
|
|
||||||
##### Usage
|
[python-version]: https://img.shields.io/pypi/pyversions/nvcc4jupyter
|
||||||
|
[test-badge]: https://github.com/cosminc98/nvcc4jupyter/actions/workflows/test.yml/badge.svg
|
||||||
|
[test-workflow]: https://github.com/cosminc98/nvcc4jupyter/actions/workflows/test.yml
|
||||||
|
[coverage-badge]: https://codecov.io/github/cosminc98/nvcc4jupyter/coverage.svg?branch=master
|
||||||
|
[coverage-results]: https://codecov.io/gh/cosminc98/nvcc4jupyter
|
||||||
|
[pypi-project-url]: https://pypi.org/project/nvcc4jupyter/
|
||||||
|
[pypi-latest-version]: https://img.shields.io/pypi/v/nvcc4jupyter.svg
|
||||||
|
[pypi-downloads]: https://img.shields.io/pypi/dd/nvcc4jupyter.svg?label=PyPI%20downloads
|
||||||
|
|
||||||
- Install and load extension
|
|
||||||
```
|
## What is it?
|
||||||
!pip install git+https://github.com/andreinechaev/nvcc4jupyter.git
|
|
||||||
%load_ext nvcc_plugin
|
**nvcc4jupyter** is a Jupyter Notebook plugin that provides cell and line
|
||||||
|
[magics](https://ipython.readthedocs.io/en/stable/interactive/magics.html)
|
||||||
|
to allow running CUDA C++ code from a notebook. This is especially
|
||||||
|
useful when combined with a hosted service such a Google's
|
||||||
|
[Colab](https://colab.research.google.com/) which provide CUDA capable GPUs
|
||||||
|
and you can start learning CUDA C++ without having to install anything or even
|
||||||
|
to own a GPU yourself.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Main Features](#main-features)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Dependencies](#dependencies)
|
||||||
|
- [Installation from sources](#installation-from-sources)
|
||||||
|
- [License](#license)
|
||||||
|
- [Documentation](#documentation)
|
||||||
|
|
||||||
|
## Main Features
|
||||||
|
Here are just a few of the things that nvcc4jupyter does well:
|
||||||
|
|
||||||
|
- TODO1
|
||||||
|
- TODO2
|
||||||
|
|
||||||
|
## Install
|
||||||
|
The installer for the latest released version is available at the [Python
|
||||||
|
Package Index (PyPI)](https://pypi.org/project/nvcc4jupyter).
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pip install nvcc4jupyter
|
||||||
```
|
```
|
||||||
|
|
||||||
- Mark a cell to be treated as cuda cell
|
## Usage
|
||||||
> `%%cuda --name example.cu --compile false`
|
TODO
|
||||||
>> 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
|
## Documentation
|
||||||
```
|
The official documentation is hosted on [TODO](TODO).
|
||||||
%%cuda_run
|
|
||||||
# This line just to bypass an exeption and can contain any text
|
|
||||||
```
|
|
||||||
|
|
||||||
- To profile your CUDA kernels using NVIDIA Nsight Compute CLI profiler you need to run
|
## License
|
||||||
```
|
[TODO](LICENSE)
|
||||||
%%cu --profile
|
|
||||||
```
|
<hr>
|
||||||
- You can add options to the profiler. Keep in mind that any argument after "--profiler-args" will be considered as a profiler argument. For example, to select which sections to collect metrics for you need to run
|
|
||||||
```
|
[Go to Top](#table-of-contents)
|
||||||
%%cu --profile --profiler-args --section SpeedOfLight --section MemoryWorkloadAnalysis --section Occupancy
|
|
||||||
```
|
|
||||||
|
|||||||
Reference in New Issue
Block a user