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.14.1-cp313-cp313-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.13Windows x86-64

nvidia_cudnn_frontend-1.14.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.14.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

nvidia_cudnn_frontend-1.14.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.14.1-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.14.1-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

nvidia_cudnn_frontend-1.14.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.14.1-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.14.1-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

nvidia_cudnn_frontend-1.14.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.14.1-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.14.1-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

nvidia_cudnn_frontend-1.14.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.14.1-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.14.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2cf16cbdba247dd983cde277f9ce111be0e4bc3148468bc2d496500336c2d76a
MD5 75cbbfa466cf61b9f3266dc82bb20940
BLAKE2b-256 618cdd94ced0a9e63b6d5a7a21ba3dcdef48a774c33ebc00cfda32c5be8e5b4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 56426b68d5d70a787b9c584e41f4c044466d56464d086270bcd4504f91521935
MD5 ff2edbceeb05867412ec3cdd1f331dbe
BLAKE2b-256 8da83e851fbf7dc0ed3f34258f4c891f4b53a4fc33b9734fcd97ce38a8b72fbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 18ed95eed3dc6808c5feb76b477136de012f47c081100290cb07bd75e0ca92fd
MD5 aa28fb11b409acb8163527905476d0a7
BLAKE2b-256 9fa1dde4659f0fc4fb39038061474ac6ced39fae8064aeb5aa2c3af433d32080

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 870edc1284319882b9c0d637e7a5e79198f65d84f2c37e931fcc790a6f6c055b
MD5 4f068c67d0bcbbbec692193df0d54d6a
BLAKE2b-256 5ff542d9f042772c7380915e75241a38e3db742045fee18f5c9928d45d1cfb69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c19a41a1b06f9d087e18cb4f2ca25208ae9423967e7009aba5dd2c3912558b4a
MD5 1a8a26ed7eea527fac66132539eb8dae
BLAKE2b-256 b7b85f812452c653447b4c09fec3cf0c5192abab1ce18358fcfab16a70113cfa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 22e0ce7782785e84fe2f42704176ecbf061d0e97178556f88cf7ec263a5c9c19
MD5 f3ca67edd25a5dd7742824f6457fd4a1
BLAKE2b-256 c3aabc74229979ab0d51ea320b19d2d9e19e8d1d6048b70e4b2740a5316db87e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 96ef4fbcbc379993ef7b5d1b937ce3d0bf791d602b48f42cb2be501e6050a47d
MD5 9bec058b39762ea4f5f5009ad03c2db6
BLAKE2b-256 981ad93739a5d73d4a10a3ff82e0c5041197629b456f391ca41691fcdca54642

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a41008635559f223257e78b7b1d6c26b6f7f8742a56b2a0cc3341d1b3ad81b66
MD5 e960f47cf0e011bf4ff7c6f89e72e85f
BLAKE2b-256 9c6f4479f557c59630b27fc951007d96c983d9d8ef588d48c97f95c040385ebe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ba8aa29c782f02c494c7ea6cd49d2ae9047b9597cc4a55c4b6b592f474d59c50
MD5 05d2e2ba56f9502330b348e0d73283df
BLAKE2b-256 9a1bbfba497cf4655319846b525fc05622c4bb1ae9795ac4d11d9cec64987ddf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 89b8b1b07b0a41bd191d5cc5aba057b5885f21f51062b9cc937fa83d697197a2
MD5 af213f49643bc8fbc0cfa92a909ed396
BLAKE2b-256 b454eaa3aa3a3410a7ae6cfab005742ce7cca6b2298f51fa8f59f1ca18e6f325

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 401df2ccb2d99dce2984c9c7e853a2887eff9c1e7b2ee13e64cc27718335d9b9
MD5 8af8e2dcce0d1e79da41c2b3154cedf8
BLAKE2b-256 b96495cd08f286410f0a812d3deff3c5e32160d7b6496e1ab608a386878be4a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aa67d5df87bdeebafb319819bd465705965ecb498e89900690336445449ab69e
MD5 7b733bfb9e52f5941823f225bb989439
BLAKE2b-256 e97625bb848b42090e955d46281a113c0f79177c7be4e1140db8d1bb7b2c99cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e834362bfde88a36a3cbffaf271ad05a57ac94ce3165a6e326908c1d67a42ba4
MD5 2622bfef59acb2de9c4fde4bb52d34d9
BLAKE2b-256 fc693f337c1ea45d189b27615117f1a7d30cda56102a5257ced0bb65568fc416

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 318a8e029dd5e532b1a2fc8db8cd6a0193c5598d39147050bea941287fc9062f
MD5 d527e8055146a54164668d48f4c866c8
BLAKE2b-256 6fd8f2e07d9c294023d643fb787bcd5048af8d872c46313e55b371da9b82362f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.14.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ce088168c30f65205ede8ecc2a99db4475697cd7e84e0e49a9b7fce92dacae81
MD5 85b1487be6483a945619b6c5c8d0171a
BLAKE2b-256 459ad8ff860c16ce7d1881da6cda9b04b25ddf3ec0438831be36d1e83a9b03b6

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