Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ make html
open build/html/index.html
```

### Build the Docs

```
conda env create -f docs_src/environment-docs.yml
conda activate cuda-python-docs
```
Then compile and install `cuda-python` following the steps above.

```
cd docs_src
make html
open build/html/index.html
```

### Publish the Docs

```
git checkout gh-pages
cd docs_src
make html
cp -a build/html/. ../docs/
```

## Testing

### Requirements
Expand Down
4 changes: 4 additions & 0 deletions docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d009ffc6c7c991046382b150711da228
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added docs/.nojekyll
Empty file.
File renamed without changes.
82 changes: 82 additions & 0 deletions docs/_sources/conduct.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Code of Conduct

## Overview

Define the code of conduct followed and enforced for the CUDA Python project.

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at
[cuda-python-conduct@nvidia.com](mailto:cuda-python-conduct@nvidia.com) All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
12 changes: 12 additions & 0 deletions docs/_sources/contribute.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

Thank you for your interest in contributing to CUDA Python! Based on the type of contribution, it will fall into two categories:

1. You want to report a bug, feature request, or documentation issue
- File an [issue](https://github.com/NVIDIA/cuda-python/issues/new)
describing what you encountered or what you want to see changed.
- The NVIDIA team will evaluate the issues and triage them, scheduling
them for a release. If you believe the issue needs priority attention
comment on the issue to notify the team.
2. You want to implement a feature or bug-fix
- At this time we do not accept code contributions.
27 changes: 27 additions & 0 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. CUDA Python documentation master file, created by
sphinx-quickstart on Wed Jul 7 12:14:05 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

CUDA Python Manual
=======================================

.. toctree::
:maxdepth: 2
:caption: Contents:

overview.md
install.md
quickstart.md
conduct.md
contribute.md
api.rst



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
68 changes: 68 additions & 0 deletions docs/_sources/install.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Installation

```{note} Building from source is required for the EA release of CUDA Python. Look for PyPI and Conda packages soon!
```

## Requirements

Dependencies of the CUDA-Python bindings and some versions that are known to
work are as follows:

* CUDA Toolkit 11.0 to 11.4 - e.g. 11.4.48
* Cython - e.g. 0.29.21
* Versioneer - e.g. 0.20

## Compilation

To compile the extension in-place, run:

```{code-block} shell
python setup.py build_ext --inplace
```

To compile for debugging the extension modules with gdb, pass the `--debug`
argument to setup.py.

The CUDA location is assumed to be the parent directory of where `cuda-gdb` is
located - to suggest an alternative location, use the `CUDA_HOME` environment
variable, e.g.:

```{code-block} shell
CUDA_HOME=/opt/cuda/11.4 python setup.py <args>
```


## Develop installation

You can use

```{code-block} shell
python setup.py develop
```

to use the module in-place in your current Python environment (e.g. for testing
of porting other libraries to use the binding).

## Build the Docs

```{code-block} shell
conda env create -f docs_src/environment-docs.yml
conda activate cuda-python-docs
```
Then compile and install `cuda-python` following the steps above.

```{code-block} shell
cd docs_src
make html
open build/html/index.html
```

### Publish the Docs

```{code-block} shell
git checkout gh-pages
cd docs_src
make html
cp -a build/html/. ../docs/
```

42 changes: 42 additions & 0 deletions docs/_sources/overview.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Overview

NVIDIA’s CUDA Python provides [Cython](https://cython.org/) bindings for a driver and runtime
API for existing toolkits and libraries to simplify GPU-based accelerated
processing. Python is one of the most popular programming languages for science,
engineering, data analytics, and deep learning applications. However, as an
interpreted language, it has limitations for high-performance computing
applications. The goal of CUDA Python is to unify the Python ecosystem with
a single set of interfaces that provide full coverage of and access to the CUDA
host APIs from Python.

## Why CUDA Python?

CUDA Python provides uniform APIs and bindings for inclusion into existing
toolkits and libraries to simplify GPU-based parallel processing for HPC, data
science, and AI.

[Numba](https://numpy.org/), a Python compiler from
[Anaconda](https://www.anaconda.com/) that can compile Python code for execution
on CUDA-capable GPUs, provides Python developers with an easy entry into
GPU-accelerated computing and a path for using increasingly sophisticated CUDA
code with a minimum of new syntax and jargon. With CUDA Python and Numba, you
get the best of both worlds: rapid iterative development with Python and the
speed of a compiled language targeting both CPUs and NVIDIA GPUs.

[CuPy](https://cupy.dev/) is a
[NumPy](https://numpy.org/)/[SciPy](https://www.scipy.org/) compatible Array
library, from [Preferred Networks](https://www.preferred.jp/en/), for
GPU-accelerated computing with Python. CUDA Python simplifies the CuPy build and
allows for a faster and smaller memory footprint when importing the CuPy Python
module. In the future, when more CUDA Toolkit libraries are supported, CuPy will
have a lighter maintenance overhead and have fewer wheels to release. Users
benefit from a faster CUDA runtime!

## Ecosystem

Our goal is to help unify the Python CUDA ecosystem with a single standard set
of interfaces, providing full coverage of, and access to, the CUDA host APIs
from Python. We want to provide a foundation for the ecosystem to build on top
of in unison to allow composing different accelerated libraries together to
solve the problems at hand. We also want to lower the barrier to entry for
Python developers to utilize NVIDIA GPUs.
Loading