Skip to main content

CUDNN FrontEnd python library

Project description

cuDNN FrontEnd(FE) API

Introduction

The cuDNN FrontEnd(FE) API is a C++ header-only library that wraps the cuDNN C backend API. Both the FE and backend APIs are entry points to the same set of functionality that is commonly referred to as the "graph API".

While there are two entry points to the graph API (i.e. backend and frontend), it is expected that most users will use the FE API. Reasons being:

  • FE API is less verbose without loss of control. All functionality accessible through the backend API is also accessible through the FE API.
  • FE API adds functionality on top of the backend API, like errata filters and autotuning.

Also, for those using backend API, FE API source and samples can serve as reference implementation.

In FE v1.0 API, users can describe multiple operations that form subgraph through a persistent cudnn_frontend::graph::Graph object. Unlike the FE v0.x API, users don't need to worry about specifying shapes and sizes of the intermediate virtual tensors. FE v1.0 API extends the groundwork of earlier versions and introduces a new set of APIs to further simplify the workflow. For detailed information of FE v1.0 API, see README.FE.1.0.md.

Additionally, FE v1.0 API provides python bindings to all API through pybind11. It is recommended that new users of cuDNN start with the frontend v1.0 API. See samples/cpp and samples/python for more details on its usage.

Usage

For c++ users, in order to include the entire library, include the cudnn_frontend header file include/cudnn_frontend.h into your compilation unit.

For Python users, run import cudnn

Build:

Dependencies

With the release of v1.0, we are bumping up the minimum supported cudnn version to 8.5.0

cuda can be downloaded from the nvidia dev-zone

cudnn can be installed from - nvidia dev-zone - pypi wheels

Minimum python version needed 3.6 The python binding compilation requires development package which can be installed by running apt-get install python-dev.

To run the Python samples, you will need the dependencies mentioned in requirements.txt. This can be be installed by running: pip install -r requirements.txt

Python API

pip wheel installation

Download the pip wheel corresponding to your python installation.

pip install nvidia_cudnn_frontend

Source installation:

Install FE python API by running:

pip install -v git+https://github.com/NVIDIA/cudnn-frontend.git

Above command picks cuda and cudnn from default system paths.

To provide a custom CUDA installation path, use environment variable: CUDAToolkit_ROOT.
To provide a custom CUDNN installation path, use environment variable: CUDNN_PATH.

To specify a custom dlpack source directory, set environment variable: FETCHCONTENT_SOURCE_DIR_DLPACK to the path where the dlpack repository was cloned or unpacked.

Checking the installation

To test whether installation is successful, run:

pytest test/python

NOTE: Only v1.0 API is exposed via python bindings.

C++ API

C++ API is header only library.

The root CMakeLists.txt can be used as reference to include the cudnn_frontend in your project's build system.

Building samples

The following compilation steps are only required for building the samples.

Provide CUDA installation path according to: https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html

Provide CUDNN installation path using CUDNN_PATH env variable or cmake parameter.

CUDNN_PATH has the cudnn installation:

  • Headers are in CUDNN_PATH/include.
  • Libraries are in CUDNN_PATH/lib or CUDNN_PATH/lib64 or CUDNN_PATH/lib/x64.

For a in-source build,

cd cudnn_frontend
mkdir build
cd build
cmake -DCUDNN_PATH=/path/to/cudnn -DCUDAToolkit_ROOT=/path/to/cuda  ../
cmake --build . -j16
bin/samples

To skip building samples, use -DCUDNN_FRONTEND_BUILD_SAMPLES=OFF.

To skip building python bindings, use -DCUDNN_FRONTEND_BUILD_PYTHON_BINDINGS=OFF.

To add debug symbols, use -DCMAKE_BUILD_TYPE=Debug.

In case, you have a stale cmake cache and want to update the cudnn/cuda paths, please delete the cmake cache (or build directory and redo the above steps).

Debugging

For initial debugging, we recommend turning on the cudnn FE logging and checking for warnings and errors. cuDNN Frontend API logging records execution flow through cuDNN frontend API. This functionality is disabled by default, and can be enabled through methods described in this section.

Method 1: Using Environment Variables:

Environment variables CUDNN_FRONTEND_LOG_INFO=0 CUDNN_FRONTEND_LOG_INFO=1
CUDNN_FRONTEND_LOG_FILE not set No Logging No Logging
CUDNN_FRONTEND_LOG_FILE set to stdout or stderr No Logging Logging to cout or cerr
CUDNN_FRONTEND_LOG_FILE set to filename.txt No Logging Logging to the filename

Method 2: Using API calls:

Calling cudnn_frontend::isLoggingEnabled() = true|false has same effect of setting the environment variable. Calling cudnn_frontend::getStream() = stream_name can be used to assign the output stream directly.

For further debugging, please turn on the cudnn backend logs described here https://docs.nvidia.com/deeplearning/cudnn/latest/reference/troubleshooting.html#error-reporting-and-api-logging

Documentation

Contributing:

Please refer to our contribution guide

Feedback

Support, resources, and information about cuDNN can be found online at https://developer.nvidia.com/cudnn.

Also, bugs and RFEs can be reported in the issues section.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nvidia_cudnn_frontend-1.15.0-cp313-cp313-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.13Windows x86-64

nvidia_cudnn_frontend-1.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nvidia_cudnn_frontend-1.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

nvidia_cudnn_frontend-1.15.0-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

nvidia_cudnn_frontend-1.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nvidia_cudnn_frontend-1.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

nvidia_cudnn_frontend-1.15.0-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

nvidia_cudnn_frontend-1.15.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nvidia_cudnn_frontend-1.15.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

nvidia_cudnn_frontend-1.15.0-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

nvidia_cudnn_frontend-1.15.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nvidia_cudnn_frontend-1.15.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

nvidia_cudnn_frontend-1.15.0-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

nvidia_cudnn_frontend-1.15.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nvidia_cudnn_frontend-1.15.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7c8c6f12534b73b0cd55956c5e9419b7840a01e4c260837606112450ce1ca0d9
MD5 4cf9ffba805cf10e027bdbac256f734d
BLAKE2b-256 d104519fd6e3ea12fe7fe98c497c4d51f6c5c87763d02e90ea3102cef32a6ef1

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14941c05a6484d3f05f3089cd290c9b1e6614298f37e07cd01789933932c9f28
MD5 1377c85f0ce56cc9aee441bb6a349f12
BLAKE2b-256 79702ed9802725cb305189dac906a67c799eeb47e4f395b97df0249a750c56fe

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fda240405eba3c04866e30b3c1beae26ea7775af4fa4d555cd598695067d32ac
MD5 c9f0a2721cf14d38e1f16762c638f92a
BLAKE2b-256 9b755a75942aae2bb3a0c1cc44378e9f80c1213a6d7b952c8df19b8845836a34

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 13e58a5b001154899f0744165716a7ad24cd7567d759a8229a9ada730a1046b2
MD5 b634dac9101cea780e75092db492509d
BLAKE2b-256 a6d76534807d209a27817d101cf86745e335896e96379bf2d207195cfe9f24ab

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aab1098ad4c79935b6e8dc251e9145129a04a8dc6ff75eb30871aacdd1487946
MD5 512c76ee76c1860924d3ea061761cef7
BLAKE2b-256 19b4c35104b8fc32986111b611b3080bbcf35fd3fd6794d4aec4e068136ea628

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6c2cfe2a0f94bff71614bd3add0ae077f513f7d14909c223afca01ac8056ff84
MD5 98bfff8a0bc16188c041cfa108f0e129
BLAKE2b-256 cb9c0c2340454f8c9cc4143fdbccef8218dad1e49042d62b26c1781915617c40

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c1be7480e3200606c2f2f49263cc13adc72c2a38e38f31f18e9b3727d99618b2
MD5 4de61e66cdf92c6ad71dbfb32dc1b3de
BLAKE2b-256 de2b1fa26eee0479ae0b40582679c1bd08eb78a0b49bb5893ec3edce2a606e9f

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 21ac16e4add264839a8db570d5378bb6583bf9539649d80bc8802ded00098a20
MD5 ddac7fa9a0b33644cd9277de00913b98
BLAKE2b-256 0e525b77edb810063c10040ac34e1517ee62690c4f030f0cf68298a4608552bc

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 570c2e028ff9b8293f9625b31484084a638de6fb685802194b8dfe16db5a44b4
MD5 747324a1b26a4f681d9e1823a24c5084
BLAKE2b-256 80b8d0f1ab5c309c513fe1e4235e860872fc7ee60876e69b30eb0a20fe8c35d8

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7a21ec041fa4009cc8b76b2d26ad73010ab5e005804e4df8b1c1abdba5e23cd5
MD5 2227244a6361c3135844d78f55202095
BLAKE2b-256 e8f76e55b0122ca5924f0cdbd717392d35a92f43c6ed4b6d64c7d378ee01f301

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 64a926602e52268e09127cf7a227e6b3d7c6e9e2a97fb57eebe88132aec8d9c8
MD5 b9b33aad9649a7f4125c4bd48063583f
BLAKE2b-256 3eb8286f7fb3f1068acf0014a851f86863ed9fec69aff79a10dcc0dfbffe0523

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8b4e8c77e848502ad79f8aef6b6c699613a6b5139572aba1f55f626d7bf31b44
MD5 1f95ea5fdec3ea15723f82d6d2041202
BLAKE2b-256 d73fd7bf811f4a76f4e9aa4ef390b11217562bba06f0c77f9e14c765681ccba6

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 75d4d7513674aa61bf2dd86d746685368409aaf520877a8c98cd22ce23ec4c6a
MD5 a74fbf4cb4cbc62af0c1ecda2a24dbbf
BLAKE2b-256 f98c83246822b6d087a4304fb95177216fbfc686ace821a6482fbed1bb5e3978

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94e4103e03e7a686c7a3e7659ee2f0e667d9d62bd67d7711e92dd185c670c3be
MD5 36c97f662dd9ca443e33360826ef4217
BLAKE2b-256 d51d9256125e8020a3691f16de96c7ec62019bc1054266c2d30a87f04c5bc3e4

See more details on using hashes here.

File details

Details for the file nvidia_cudnn_frontend-1.15.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.15.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a0ce5c5f5ee7796470824271755af32ed72893051785503b5819eeac3360636b
MD5 f705b948b128943be4e16455d5fe7644
BLAKE2b-256 619c6a4f9fe6941934f181a258826513b057d37aa5d029953f7ef540ef3ce8dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page