<commit_before>// This file is a stub header file of cudnn for Read the Docs.

#ifndef INCLUDE_GUARD_CUPY_CUDNN_H
#define INCLUDE_GUARD_CUPY_CUDNN_H

#include "cupy_cuda.h"

#ifndef CUPY_NO_CUDA
#include <cudnn.h>

#if CUDNN_VERSION < 4000

// ***_v2 functions are not declared in cuDNN v2 and v3.
// Following definitions are for compatibility with cuDNN v4.

#define cudnnSetConvolutionNdDescriptor_v2 cudnnSetConvolutionNdDescriptor
#define cudnnGetConvolutionNdDescriptor_v2 cudnnGetConvolutionNdDescriptor
#define cudnnAddTensor_v2 cudnnAddTensor
#define cudnnConvolutionBackwardFilter_v2 cudnnConvolutionBackwardFilter
#define cudnnConvolutionBackwardData_v2 cudnnConvolutionBackwardData

#endif // #if CUDNN_VERSION < 4000
<commit_msg>added dummy declarations of cudnn v4 for v2 and v3<commit_after>// This file is a stub header file of cudnn for Read the Docs.

#ifndef INCLUDE_GUARD_CUPY_CUDNN_H
#define INCLUDE_GUARD_CUPY_CUDNN_H

#include "cupy_cuda.h"

#ifndef CUPY_NO_CUDA
#include <cudnn.h>

#if CUDNN_VERSION < 4000

// ***_v2 functions are not declared in cuDNN v2 and v3.
// Following definitions are for compatibility with cuDNN v4.

#define cudnnSetConvolutionNdDescriptor_v2 cudnnSetConvolutionNdDescriptor
#define cudnnGetConvolutionNdDescriptor_v2 cudnnGetConvolutionNdDescriptor
#define cudnnAddTensor_v2 cudnnAddTensor
#define cudnnConvolutionBackwardFilter_v2 cudnnConvolutionBackwardFilter
#define cudnnConvolutionBackwardData_v2 cudnnConvolutionBackwardData

int cudnnConvolutionBackwardFilter_v3(
        void* handle, void* alpha,
        void* srcDesc, void* srcData,
        void* diffDesc, void* diffData,
        void* convDesc, int algo,
        void* workSpace, size_t workSpaceSizeInBytes, void* beta,
        void* gradDesc, void* gradData);

int cudnnGetConvolutionBackwardFilterWorkspaceSize(
        void* handle, void* srcDesc,
        void* filterDesc, void* convDesc,
        void* destDesc, int algo,
        size_t* sizeInBytes);

int cudnnGetConvolutionBackwardFilterAlgorithm(
        void* handle, void* srcDesc,
        void* filterDesc, void* convDesc,
        void* destDesc, int preference,
        size_t memoryLimitInbytes, int* algo);

int cudnnConvolutionBackwardData_v3(
        void* handle, void* alpha,
        void* filterDesc, void* filterData,
        void* diffDesc, void* diffData,
        void* convDesc, int algo,
        void* workSpace, size_t workSpaceSizeInBytes, void* beta,
        void* gradDesc, void* gradData);

int cudnnGetConvolutionBackwardDataAlgorithm(
        void* handle, void* filterDesc,
        void* diffDesc, void* convDesc,
        void* gradDesc, int preference,
        size_t memoryLimitInbytes, int* algo);

int cudnnGetConvolutionBackwardDataWorkspaceSize(
        void* handle, void* filterDesc,
        void* diffDesc, void* convDesc,
        void* gradDesc, int algo,
        size_t* sizeInBytes);

#endif // #if CUDNN_VERSION < 4000

{'fraction_non_alphanumeric': 0.0647800886464371, 'fraction_numerical': 0.013296965564268667, 'mean_word_length': 4.413284132841328, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6236513', 'n_tokens_mistral': 984, 'n_tokens_neox': 964, 'n_words': 261}