| /** |
| * WARNING! THIS FILE IS AUTOMATICALLY GENERATED. |
| * Please edit cuDNN.cwrap instead. |
| */ |
| |
| #include <Python.h> |
| #include <cudnn.h> |
| #include "Types.h" |
| #include "Handles.h" |
| #include "BatchNorm.h" |
| #include "Conv.h" |
| #include "GridSampler.h" |
| #include "AffineGridGenerator.h" |
| #include "torch/csrc/cuda/THCP.h" |
| #include "../PtrWrapper.h" |
| |
| |
| using namespace torch::cudnn; |
| using namespace torch; |
| |
| extern THCState* state; |
| |
| [[ |
| name: cudnn_convolution_forward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* weight |
| - THTensor* output |
| - Convolution* info |
| - bool benchmark |
| ]] |
| |
| [[ |
| name: cudnn_convolution_add_bias |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* bias |
| - THTensor* output |
| - Convolution* info |
| ]] |
| |
| [[ |
| name: cudnn_convolution_full_forward |
| return: Convolution* |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* weight |
| - type: THTensor* |
| name: bias |
| nullable: True |
| - THTensor* output |
| - std::vector<int> pad |
| - std::vector<int> stride |
| - std::vector<int> dilation |
| - int groups |
| - bool benchmark |
| ]] |
| |
| [[ |
| name: cudnn_convolution_transpose_full_forward |
| return: Convolution* |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* weight |
| - type: THTensor* |
| name: bias |
| nullable: True |
| - THTensor* output |
| - std::vector<int> pad |
| - std::vector<int> stride |
| - std::vector<int> dilation |
| - int groups |
| - bool benchmark |
| ]] |
| |
| [[ |
| name: cudnn_convolution_backward_data |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* grad_output |
| - THTensor* grad_input |
| - THTensor* weight |
| - Convolution* info |
| - bool benchmark |
| ]] |
| |
| [[ |
| name: cudnn_convolution_backward_filter |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* grad_output |
| - THTensor* input |
| - THTensor* grad_weight |
| - Convolution* info |
| - bool benchmark |
| ]] |
| |
| [[ |
| name: cudnn_convolution_backward_bias |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* grad_output |
| - THTensor* grad_bias |
| - Convolution* info |
| ]] |
| |
| [[ |
| name: cudnn_batch_norm_forward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* output |
| - THTensor* weight |
| - THTensor* bias |
| - THTensor* running_mean |
| - THTensor* running_var |
| - THTensor* save_mean |
| - THTensor* save_var |
| - bool training |
| - double exponential_average_factor |
| - double epsilon |
| ]] |
| |
| [[ |
| name: cudnn_batch_norm_backward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* grad_output |
| - THTensor* grad_input |
| - THTensor* grad_weight |
| - THTensor* grad_bias |
| - THTensor* weight |
| - THTensor* running_mean |
| - THTensor* running_var |
| - THTensor* save_mean |
| - THTensor* save_var |
| - bool training |
| - double epsilon |
| ]] |
| |
| [[ |
| name: cudnn_grid_sampler_forward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* grid |
| - THTensor* output |
| ]] |
| |
| [[ |
| name: cudnn_grid_sampler_backward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* input |
| - THTensor* grad_input |
| - THTensor* grid |
| - THTensor* grad_grid |
| - THTensor* grad_output |
| ]] |
| |
| [[ |
| name: cudnn_affine_grid_generator_forward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* theta |
| - THTensor* grid |
| - int N |
| - int C |
| - int H |
| - int W |
| ]] |
| |
| [[ |
| name: cudnn_affine_grid_generator_backward |
| return: void |
| arguments: |
| - cudnnHandle_t handle |
| - cudnnDataType_t dataType |
| - THTensor* grad_theta |
| - THTensor* grad_grid |
| - int N |
| - int C |
| - int H |
| - int W |
| ]] |
| |
| [[ |
| name: cudnn_version |
| only_register: True |
| ]] |
| static PyObject * THCUDNN_cudnn_version(PyObject *self, PyObject *args) |
| { |
| return PyLong_FromLong(CUDNN_VERSION); |
| } |