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

Uploaded CPython 3.13Windows x86-64

nvidia_cudnn_frontend-1.16.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

nvidia_cudnn_frontend-1.16.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.16.0-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

nvidia_cudnn_frontend-1.16.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp311-cp311-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.11Windows x86-64

nvidia_cudnn_frontend-1.16.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp310-cp310-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10Windows x86-64

nvidia_cudnn_frontend-1.16.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.8 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp39-cp39-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9Windows x86-64

nvidia_cudnn_frontend-1.16.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

nvidia_cudnn_frontend-1.16.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.8 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.16.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 138de2bc4697fabb2eb2f0f601a7e31f8fe97874908e26e33d737276f335473c
MD5 a6884082ed44296486728da102ff51e7
BLAKE2b-256 e5303025f34f2c86ceef85134dc1f323f8cf2a26d3ffddc5ada48528c80bfae1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cbdad88b2bec5dde837f8fa7632022334cddb4756f923b5421c06a712cb59d31
MD5 2fd98c9fda078cb3b7cde94bd21099b1
BLAKE2b-256 7113836b90354036154ab82db3861210e5736983fe1fc44bb39c146ad93b333b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b6bcb3a2fbff80538958e21e2227520f082a961164865aaeedaac527f61084f9
MD5 86114476bdddb08489fa4ecd38002c77
BLAKE2b-256 322cb4376afef0a6342c56e82e3465c1f8f5c719f588293a50dd04019a22ae6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7b7860db03767c158accbe0b4e9c9553506513cc970ff08ed28c7761681ac466
MD5 ca27b57cc8e6ecdc33f0f10941f5b3e2
BLAKE2b-256 ced630ae67bb9c010e9459d1211c56d73373eb4e3dd9f57f4c3c1fe0966efcb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 16efb069d4bda4d3b99134f59f376cfd4d09558298bd96af778fdc7f2851e696
MD5 941d8abed58cd3513e3dbad177048e78
BLAKE2b-256 0921a0e0d50ba8d7b639fe635500fee0d9c0319561b1ae72176d7024ec04b439

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dd6fdd71c0896ff2ca1809d914cbd17f2904d55863f8881f47946e1d634c7a88
MD5 4f49c77f5f6979549536842816d4a666
BLAKE2b-256 003979b606e805abd67ab4fa72f752a5413a496159f10d94fbdb1d67bb5ae86c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a257f10a932ffde9741f644efd3611acf77e2fd89d493d81bc6a8353c48f1ec2
MD5 72452405d2b04dabd8868d45ed9982bb
BLAKE2b-256 3b89f14435f616603a999975930c4456d6140127f6acb19a877c752beccad837

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5c4a8fc573d85a86e08b15d9bf37f729e2487298781867a492a59cde6ac295e2
MD5 22d0be6d6423de3ba8f4ad61317b9888
BLAKE2b-256 95dc465a14f2d235778405f2e84fce336d07ab045bf1c7df6404bdf8033e06a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c360d5840d6eb597aade9e9c8780e24aec283b8e6bc97d52881c821a35c92aa9
MD5 7ce2c1fb4798d483bfcad65270faed2d
BLAKE2b-256 10b7d0a3a337f5e83f26ff79a7fd63a859181ff2911f1d905d6fbab5fc80170d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ee3f3886f107919dad48cbc905fa6ae9207c8d7d5a24165e55625ea96f0fe40f
MD5 2b8d1064481f45988b14db8885997981
BLAKE2b-256 bef51662f18084ef4441bfb3a01383cbf77194905b53474dcb51c0d0f373c74b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77cb06b91877c8489363867434ba1d9936f3e10bf7ed98d82e98f5f578611920
MD5 a7fa47e83a42181a438a75b13a01500b
BLAKE2b-256 924587f3f2d94a928be21459949b03b0b8bcea13531d30094ad84a8ae4fca761

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 83ecbe6d1145dc208a9ae82aa0b45b2c8f74ed8a43d3a102a13eef2117e2fedd
MD5 9fbd212219c1ca730228d5b2cd36fbcd
BLAKE2b-256 facf3cd3cc682df5488288c6043fc0977090497ff015a082ab160076fecb080a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bb8bccde48e62363e8458f3a860ae11a11dd6a5dffef6ca987c826ef2a4a8c38
MD5 82ce0059de751babc8493c448fbb0611
BLAKE2b-256 43d97ee13839defd5574663abb53bbeb384cf21a6c227917921df3cf2e279ec3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8ebe416807207b6d3283541c7a2945dfd4feba61bcbffb3adf99b33f7a326df3
MD5 8a2f9e94a678c3a76e32e678cd6b874c
BLAKE2b-256 73ddb540e1c2dd62c08b9d3142a39331a4739c49e5abe94880f9b6facd9cc9d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvidia_cudnn_frontend-1.16.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a77818c92a556be9287b4d53457cc6df0e01982ffaf1c1f6754bab7913f9baad
MD5 fc42c6fea0e9155fcd7b6d8915df480d
BLAKE2b-256 ea711af6e2e935f7866b7c0539c83bd9d1d35e1a174c560ac10187f28afb13e5

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