Update readme to include useful badges

This commit is contained in:
Cosmin Ciocan
2024-01-05 15:58:34 +01:00
parent 8b88c5dc34
commit 6a02223f96
+55 -29
View File
@@ -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
```
!pip install git+https://github.com/andreinechaev/nvcc4jupyter.git
%load_ext nvcc_plugin
## What is it?
**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
> `%%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
## Usage
TODO
- 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
```
## Documentation
The official documentation is hosted on [TODO](TODO).
- To profile your CUDA kernels using NVIDIA Nsight Compute CLI profiler you need to run
```
%%cu --profile
```
- 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
```
%%cu --profile --profiler-args --section SpeedOfLight --section MemoryWorkloadAnalysis --section Occupancy
```
## License
[TODO](LICENSE)
<hr>
[Go to Top](#table-of-contents)