/* * Copyright 2014-2023 NVIDIA Corporation. All rights reserved. * * NOTICE TO LICENSEE: * * This source code and/or documentation ("Licensed Deliverables") are * subject to NVIDIA intellectual property rights under U.S. and * international Copyright laws. * * These Licensed Deliverables contained herein is PROPRIETARY and * CONFIDENTIAL to NVIDIA and is being provided under the terms and * conditions of a form of NVIDIA software license agreement by and * between NVIDIA and Licensee ("License Agreement") or electronically * accepted by Licensee. Notwithstanding any terms or conditions to * the contrary in the License Agreement, reproduction or disclosure * of the Licensed Deliverables to any third party without the express * written consent of NVIDIA is prohibited. * * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THESE LICENSED DELIVERABLES. * * U.S. Government End Users. These Licensed Deliverables are a * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT * 1995), consisting of "commercial computer software" and "commercial * computer software documentation" as such terms are used in 48 * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government * only as a commercial end item. Consistent with 48 C.F.R.12.212 and * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all * U.S. Government End Users acquire the Licensed Deliverables with * only those rights set forth herein. * * Any use of the Licensed Deliverables in individual and commercial * software must include, in the user documentation and internal * comments to the code, the above Disclaimer and U.S. Government End * Users Notice. */ #ifndef _CUDNN_BACKEND_H_ #define _CUDNN_BACKEND_H_ /* * The content in this header file is under development to be included in cudnn.h in the future * Production code should have all include of this header file remove. */ #include "cudnn_ops_infer.h" #include "cudnn_cnn_infer.h" /* NOTE: definition in extern "C" to be copied later to public header */ #if defined(__cplusplus) extern "C" { #endif typedef void *cudnnBackendDescriptor_t; typedef struct cudnnFractionStruct { int64_t numerator; int64_t denominator; } cudnnFraction_t; typedef enum { CUDNN_POINTWISE_ADD = 0, CUDNN_POINTWISE_ADD_SQUARE = 5, CUDNN_POINTWISE_DIV = 6, CUDNN_POINTWISE_MAX = 3, CUDNN_POINTWISE_MIN = 2, CUDNN_POINTWISE_MOD = 7, CUDNN_POINTWISE_MUL = 1, CUDNN_POINTWISE_POW = 8, CUDNN_POINTWISE_SUB = 9, CUDNN_POINTWISE_ABS = 10, CUDNN_POINTWISE_CEIL = 11, CUDNN_POINTWISE_COS = 12, CUDNN_POINTWISE_EXP = 13, CUDNN_POINTWISE_FLOOR = 14, CUDNN_POINTWISE_LOG = 15, CUDNN_POINTWISE_NEG = 16, CUDNN_POINTWISE_RSQRT = 17, CUDNN_POINTWISE_SIN = 18, CUDNN_POINTWISE_SQRT = 4, CUDNN_POINTWISE_TAN = 19, CUDNN_POINTWISE_ERF = 20, CUDNN_POINTWISE_IDENTITY = 21, CUDNN_POINTWISE_RECIPROCAL = 22, CUDNN_POINTWISE_RELU_FWD = 100, CUDNN_POINTWISE_TANH_FWD = 101, CUDNN_POINTWISE_SIGMOID_FWD = 102, CUDNN_POINTWISE_ELU_FWD = 103, CUDNN_POINTWISE_GELU_FWD = 104, CUDNN_POINTWISE_SOFTPLUS_FWD = 105, CUDNN_POINTWISE_SWISH_FWD = 106, CUDNN_POINTWISE_GELU_APPROX_TANH_FWD = 107, CUDNN_POINTWISE_RELU_BWD = 200, CUDNN_POINTWISE_TANH_BWD = 201, CUDNN_POINTWISE_SIGMOID_BWD = 202, CUDNN_POINTWISE_ELU_BWD = 203, CUDNN_POINTWISE_GELU_BWD = 204, CUDNN_POINTWISE_SOFTPLUS_BWD = 205, CUDNN_POINTWISE_SWISH_BWD = 206, CUDNN_POINTWISE_GELU_APPROX_TANH_BWD = 207, CUDNN_POINTWISE_CMP_EQ = 300, CUDNN_POINTWISE_CMP_NEQ = 301, CUDNN_POINTWISE_CMP_GT = 302, CUDNN_POINTWISE_CMP_GE = 303, CUDNN_POINTWISE_CMP_LT = 304, CUDNN_POINTWISE_CMP_LE = 305, CUDNN_POINTWISE_LOGICAL_AND = 400, CUDNN_POINTWISE_LOGICAL_OR = 401, CUDNN_POINTWISE_LOGICAL_NOT = 402, CUDNN_POINTWISE_GEN_INDEX = 501, CUDNN_POINTWISE_BINARY_SELECT = 601, } cudnnPointwiseMode_t; typedef enum { CUDNN_RESAMPLE_NEAREST = 0, CUDNN_RESAMPLE_BILINEAR = 1, CUDNN_RESAMPLE_AVGPOOL = 2, CUDNN_RESAMPLE_AVGPOOL_INCLUDE_PADDING = 2, CUDNN_RESAMPLE_AVGPOOL_EXCLUDE_PADDING = 4, CUDNN_RESAMPLE_MAXPOOL = 3, } cudnnResampleMode_t; typedef enum { CUDNN_SIGNAL_SET = 0, CUDNN_SIGNAL_WAIT = 1, } cudnnSignalMode_t; typedef enum { CUDNN_GENSTATS_SUM_SQSUM = 0, } cudnnGenStatsMode_t; typedef enum { CUDNN_BN_FINALIZE_STATISTICS_TRAINING = 0, CUDNN_BN_FINALIZE_STATISTICS_INFERENCE = 1, } cudnnBnFinalizeStatsMode_t; typedef enum { CUDNN_RNG_DISTRIBUTION_BERNOULLI, CUDNN_RNG_DISTRIBUTION_UNIFORM, CUDNN_RNG_DISTRIBUTION_NORMAL, } cudnnRngDistribution_t; typedef enum { CUDNN_ATTR_POINTWISE_MODE = 0, CUDNN_ATTR_POINTWISE_MATH_PREC = 1, CUDNN_ATTR_POINTWISE_NAN_PROPAGATION = 2, CUDNN_ATTR_POINTWISE_RELU_LOWER_CLIP = 3, CUDNN_ATTR_POINTWISE_RELU_UPPER_CLIP = 4, CUDNN_ATTR_POINTWISE_RELU_LOWER_CLIP_SLOPE = 5, CUDNN_ATTR_POINTWISE_ELU_ALPHA = 6, CUDNN_ATTR_POINTWISE_SOFTPLUS_BETA = 7, CUDNN_ATTR_POINTWISE_SWISH_BETA = 8, CUDNN_ATTR_POINTWISE_AXIS = 9, CUDNN_ATTR_CONVOLUTION_COMP_TYPE = 100, CUDNN_ATTR_CONVOLUTION_CONV_MODE = 101, CUDNN_ATTR_CONVOLUTION_DILATIONS = 102, CUDNN_ATTR_CONVOLUTION_FILTER_STRIDES = 103, CUDNN_ATTR_CONVOLUTION_POST_PADDINGS = 104, CUDNN_ATTR_CONVOLUTION_PRE_PADDINGS = 105, CUDNN_ATTR_CONVOLUTION_SPATIAL_DIMS = 106, CUDNN_ATTR_ENGINEHEUR_MODE = 200, CUDNN_ATTR_ENGINEHEUR_OPERATION_GRAPH = 201, CUDNN_ATTR_ENGINEHEUR_RESULTS = 202, CUDNN_ATTR_ENGINEHEUR_SM_COUNT_TARGET = 203, CUDNN_ATTR_ENGINECFG_ENGINE = 300, CUDNN_ATTR_ENGINECFG_INTERMEDIATE_INFO = 301, CUDNN_ATTR_ENGINECFG_KNOB_CHOICES = 302, CUDNN_ATTR_EXECUTION_PLAN_HANDLE = 400, CUDNN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG = 401, CUDNN_ATTR_EXECUTION_PLAN_WORKSPACE_SIZE = 402, CUDNN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS = 403, CUDNN_ATTR_EXECUTION_PLAN_RUN_ONLY_INTERMEDIATE_UIDS = 404, CUDNN_ATTR_EXECUTION_PLAN_JSON_REPRESENTATION = 405, CUDNN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID = 500, CUDNN_ATTR_INTERMEDIATE_INFO_SIZE = 501, CUDNN_ATTR_INTERMEDIATE_INFO_DEPENDENT_DATA_UIDS = 502, CUDNN_ATTR_INTERMEDIATE_INFO_DEPENDENT_ATTRIBUTES = 503, CUDNN_ATTR_KNOB_CHOICE_KNOB_TYPE = 600, CUDNN_ATTR_KNOB_CHOICE_KNOB_VALUE = 601, CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_ALPHA = 700, CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_BETA = 701, CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_CONV_DESC = 702, CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_W = 703, CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_X = 704, CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_Y = 705, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_ALPHA = 706, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_BETA = 707, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_CONV_DESC = 708, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_W = 709, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DX = 710, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DY = 711, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_ALPHA = 712, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_BETA = 713, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_CONV_DESC = 714, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DW = 715, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_X = 716, CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DY = 717, CUDNN_ATTR_OPERATION_POINTWISE_PW_DESCRIPTOR = 750, CUDNN_ATTR_OPERATION_POINTWISE_XDESC = 751, CUDNN_ATTR_OPERATION_POINTWISE_BDESC = 752, CUDNN_ATTR_OPERATION_POINTWISE_YDESC = 753, CUDNN_ATTR_OPERATION_POINTWISE_ALPHA1 = 754, CUDNN_ATTR_OPERATION_POINTWISE_ALPHA2 = 755, CUDNN_ATTR_OPERATION_POINTWISE_DXDESC = 756, CUDNN_ATTR_OPERATION_POINTWISE_DYDESC = 757, CUDNN_ATTR_OPERATION_POINTWISE_TDESC = 758, CUDNN_ATTR_OPERATION_GENSTATS_MODE = 770, CUDNN_ATTR_OPERATION_GENSTATS_MATH_PREC = 771, CUDNN_ATTR_OPERATION_GENSTATS_XDESC = 772, CUDNN_ATTR_OPERATION_GENSTATS_SUMDESC = 773, CUDNN_ATTR_OPERATION_GENSTATS_SQSUMDESC = 774, CUDNN_ATTR_OPERATION_BN_FINALIZE_STATS_MODE = 780, CUDNN_ATTR_OPERATION_BN_FINALIZE_MATH_PREC = 781, CUDNN_ATTR_OPERATION_BN_FINALIZE_Y_SUM_DESC = 782, CUDNN_ATTR_OPERATION_BN_FINALIZE_Y_SQ_SUM_DESC = 783, CUDNN_ATTR_OPERATION_BN_FINALIZE_SCALE_DESC = 784, CUDNN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC = 785, CUDNN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_MEAN_DESC = 786, CUDNN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_VAR_DESC = 787, CUDNN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_MEAN_DESC = 788, CUDNN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_VAR_DESC = 789, CUDNN_ATTR_OPERATION_BN_FINALIZE_SAVED_MEAN_DESC = 790, CUDNN_ATTR_OPERATION_BN_FINALIZE_SAVED_INV_STD_DESC = 791, CUDNN_ATTR_OPERATION_BN_FINALIZE_EQ_SCALE_DESC = 792, CUDNN_ATTR_OPERATION_BN_FINALIZE_EQ_BIAS_DESC = 793, CUDNN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC = 794, CUDNN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC = 795, CUDNN_ATTR_OPERATION_BN_FINALIZE_EXP_AVERATE_FACTOR_DESC = 796, CUDNN_ATTR_OPERATIONGRAPH_HANDLE = 800, CUDNN_ATTR_OPERATIONGRAPH_OPS = 801, CUDNN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT = 802, CUDNN_ATTR_TENSOR_BYTE_ALIGNMENT = 900, CUDNN_ATTR_TENSOR_DATA_TYPE = 901, CUDNN_ATTR_TENSOR_DIMENSIONS = 902, CUDNN_ATTR_TENSOR_STRIDES = 903, CUDNN_ATTR_TENSOR_VECTOR_COUNT = 904, CUDNN_ATTR_TENSOR_VECTORIZED_DIMENSION = 905, CUDNN_ATTR_TENSOR_UNIQUE_ID = 906, CUDNN_ATTR_TENSOR_IS_VIRTUAL = 907, CUDNN_ATTR_TENSOR_IS_BY_VALUE = 908, CUDNN_ATTR_TENSOR_REORDERING_MODE = 909, CUDNN_ATTR_TENSOR_RAGGED_OFFSET_DESC = 913, CUDNN_ATTR_VARIANT_PACK_UNIQUE_IDS = 1000, CUDNN_ATTR_VARIANT_PACK_DATA_POINTERS = 1001, CUDNN_ATTR_VARIANT_PACK_INTERMEDIATES = 1002, CUDNN_ATTR_VARIANT_PACK_WORKSPACE = 1003, CUDNN_ATTR_LAYOUT_INFO_TENSOR_UID = 1100, CUDNN_ATTR_LAYOUT_INFO_TYPES = 1101, CUDNN_ATTR_KNOB_INFO_TYPE = 1200, CUDNN_ATTR_KNOB_INFO_MAXIMUM_VALUE = 1201, CUDNN_ATTR_KNOB_INFO_MINIMUM_VALUE = 1202, CUDNN_ATTR_KNOB_INFO_STRIDE = 1203, CUDNN_ATTR_ENGINE_OPERATION_GRAPH = 1300, CUDNN_ATTR_ENGINE_GLOBAL_INDEX = 1301, CUDNN_ATTR_ENGINE_KNOB_INFO = 1302, CUDNN_ATTR_ENGINE_NUMERICAL_NOTE = 1303, CUDNN_ATTR_ENGINE_LAYOUT_INFO = 1304, CUDNN_ATTR_ENGINE_BEHAVIOR_NOTE = 1305, CUDNN_ATTR_ENGINE_SM_COUNT_TARGET = 1306, CUDNN_ATTR_MATMUL_COMP_TYPE = 1500, CUDNN_ATTR_MATMUL_PADDING_VALUE = 1503, CUDNN_ATTR_OPERATION_MATMUL_ADESC = 1520, CUDNN_ATTR_OPERATION_MATMUL_BDESC = 1521, CUDNN_ATTR_OPERATION_MATMUL_CDESC = 1522, CUDNN_ATTR_OPERATION_MATMUL_DESC = 1523, CUDNN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT = 1524, CUDNN_ATTR_OPERATION_MATMUL_GEMM_M_OVERRIDE_DESC = 1525, CUDNN_ATTR_OPERATION_MATMUL_GEMM_N_OVERRIDE_DESC = 1526, CUDNN_ATTR_OPERATION_MATMUL_GEMM_K_OVERRIDE_DESC = 1527, CUDNN_ATTR_REDUCTION_OPERATOR = 1600, CUDNN_ATTR_REDUCTION_COMP_TYPE = 1601, CUDNN_ATTR_OPERATION_REDUCTION_XDESC = 1610, CUDNN_ATTR_OPERATION_REDUCTION_YDESC = 1611, CUDNN_ATTR_OPERATION_REDUCTION_DESC = 1612, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC = 1620, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC = 1621, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC = 1622, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC = 1623, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC = 1624, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC = 1625, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC = 1626, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC = 1627, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC = 1628, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC = 1629, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS = 1630, CUDNN_ATTR_RESAMPLE_MODE = 1700, CUDNN_ATTR_RESAMPLE_COMP_TYPE = 1701, CUDNN_ATTR_RESAMPLE_SPATIAL_DIMS = 1702, CUDNN_ATTR_RESAMPLE_POST_PADDINGS = 1703, CUDNN_ATTR_RESAMPLE_PRE_PADDINGS = 1704, CUDNN_ATTR_RESAMPLE_STRIDES = 1705, CUDNN_ATTR_RESAMPLE_WINDOW_DIMS = 1706, CUDNN_ATTR_RESAMPLE_NAN_PROPAGATION = 1707, CUDNN_ATTR_RESAMPLE_PADDING_MODE = 1708, CUDNN_ATTR_OPERATION_RESAMPLE_FWD_XDESC = 1710, CUDNN_ATTR_OPERATION_RESAMPLE_FWD_YDESC = 1711, CUDNN_ATTR_OPERATION_RESAMPLE_FWD_IDXDESC = 1712, CUDNN_ATTR_OPERATION_RESAMPLE_FWD_ALPHA = 1713, CUDNN_ATTR_OPERATION_RESAMPLE_FWD_BETA = 1714, CUDNN_ATTR_OPERATION_RESAMPLE_FWD_DESC = 1716, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DXDESC = 1720, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DYDESC = 1721, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_IDXDESC = 1722, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_ALPHA = 1723, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_BETA = 1724, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DESC = 1725, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_XDESC = 1726, CUDNN_ATTR_OPERATION_RESAMPLE_BWD_YDESC = 1727, CUDNN_ATTR_OPERATION_CONCAT_AXIS = 1800, CUDNN_ATTR_OPERATION_CONCAT_INPUT_DESCS = 1801, CUDNN_ATTR_OPERATION_CONCAT_INPLACE_INDEX = 1802, CUDNN_ATTR_OPERATION_CONCAT_OUTPUT_DESC = 1803, CUDNN_ATTR_OPERATION_SIGNAL_MODE = 1900, CUDNN_ATTR_OPERATION_SIGNAL_FLAGDESC = 1901, CUDNN_ATTR_OPERATION_SIGNAL_VALUE = 1902, CUDNN_ATTR_OPERATION_SIGNAL_XDESC = 1903, CUDNN_ATTR_OPERATION_SIGNAL_YDESC = 1904, CUDNN_ATTR_OPERATION_NORM_FWD_MODE = 2000, CUDNN_ATTR_OPERATION_NORM_FWD_PHASE = 2001, CUDNN_ATTR_OPERATION_NORM_FWD_XDESC = 2002, CUDNN_ATTR_OPERATION_NORM_FWD_MEAN_DESC = 2003, CUDNN_ATTR_OPERATION_NORM_FWD_INV_VARIANCE_DESC = 2004, CUDNN_ATTR_OPERATION_NORM_FWD_SCALE_DESC = 2005, CUDNN_ATTR_OPERATION_NORM_FWD_BIAS_DESC = 2006, CUDNN_ATTR_OPERATION_NORM_FWD_EPSILON_DESC = 2007, CUDNN_ATTR_OPERATION_NORM_FWD_EXP_AVG_FACTOR_DESC = 2008, CUDNN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_MEAN_DESC = 2009, CUDNN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_VAR_DESC = 2010, CUDNN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_MEAN_DESC = 2011, CUDNN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_VAR_DESC = 2012, CUDNN_ATTR_OPERATION_NORM_FWD_YDESC = 2013, CUDNN_ATTR_OPERATION_NORM_FWD_PEER_STAT_DESCS = 2014, CUDNN_ATTR_OPERATION_NORM_BWD_MODE = 2100, CUDNN_ATTR_OPERATION_NORM_BWD_XDESC = 2101, CUDNN_ATTR_OPERATION_NORM_BWD_MEAN_DESC = 2102, CUDNN_ATTR_OPERATION_NORM_BWD_INV_VARIANCE_DESC = 2103, CUDNN_ATTR_OPERATION_NORM_BWD_DYDESC = 2104, CUDNN_ATTR_OPERATION_NORM_BWD_SCALE_DESC = 2105, CUDNN_ATTR_OPERATION_NORM_BWD_EPSILON_DESC = 2106, CUDNN_ATTR_OPERATION_NORM_BWD_DSCALE_DESC = 2107, CUDNN_ATTR_OPERATION_NORM_BWD_DBIAS_DESC = 2108, CUDNN_ATTR_OPERATION_NORM_BWD_DXDESC = 2109, CUDNN_ATTR_OPERATION_NORM_BWD_PEER_STAT_DESCS = 2110, CUDNN_ATTR_OPERATION_RESHAPE_XDESC = 2200, CUDNN_ATTR_OPERATION_RESHAPE_YDESC = 2201, CUDNN_ATTR_RNG_DISTRIBUTION = 2300, CUDNN_ATTR_RNG_NORMAL_DIST_MEAN = 2301, CUDNN_ATTR_RNG_NORMAL_DIST_STANDARD_DEVIATION = 2302, CUDNN_ATTR_RNG_UNIFORM_DIST_MAXIMUM = 2303, CUDNN_ATTR_RNG_UNIFORM_DIST_MINIMUM = 2304, CUDNN_ATTR_RNG_BERNOULLI_DIST_PROBABILITY = 2305, CUDNN_ATTR_OPERATION_RNG_YDESC = 2310, CUDNN_ATTR_OPERATION_RNG_SEED = 2311, CUDNN_ATTR_OPERATION_RNG_DESC = 2312, CUDNN_ATTR_OPERATION_RNG_OFFSET_DESC = 2313, } cudnnBackendAttributeName_t; typedef enum { CUDNN_TYPE_HANDLE = 0, CUDNN_TYPE_DATA_TYPE, CUDNN_TYPE_BOOLEAN, CUDNN_TYPE_INT64, CUDNN_TYPE_FLOAT, CUDNN_TYPE_DOUBLE, CUDNN_TYPE_VOID_PTR, CUDNN_TYPE_CONVOLUTION_MODE, CUDNN_TYPE_HEUR_MODE, CUDNN_TYPE_KNOB_TYPE, CUDNN_TYPE_NAN_PROPOGATION, CUDNN_TYPE_NUMERICAL_NOTE, CUDNN_TYPE_LAYOUT_TYPE, CUDNN_TYPE_ATTRIB_NAME, CUDNN_TYPE_POINTWISE_MODE, CUDNN_TYPE_BACKEND_DESCRIPTOR, CUDNN_TYPE_GENSTATS_MODE, CUDNN_TYPE_BN_FINALIZE_STATS_MODE, CUDNN_TYPE_REDUCTION_OPERATOR_TYPE, CUDNN_TYPE_BEHAVIOR_NOTE, CUDNN_TYPE_TENSOR_REORDERING_MODE, CUDNN_TYPE_RESAMPLE_MODE, CUDNN_TYPE_PADDING_MODE, CUDNN_TYPE_INT32, CUDNN_TYPE_CHAR, CUDNN_TYPE_SIGNAL_MODE, CUDNN_TYPE_FRACTION, CUDNN_TYPE_NORM_MODE, CUDNN_TYPE_NORM_FWD_PHASE, CUDNN_TYPE_RNG_DISTRIBUTION } cudnnBackendAttributeType_t; typedef enum { CUDNN_BACKEND_POINTWISE_DESCRIPTOR = 0, CUDNN_BACKEND_CONVOLUTION_DESCRIPTOR, CUDNN_BACKEND_ENGINE_DESCRIPTOR, CUDNN_BACKEND_ENGINECFG_DESCRIPTOR, CUDNN_BACKEND_ENGINEHEUR_DESCRIPTOR, CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR, CUDNN_BACKEND_INTERMEDIATE_INFO_DESCRIPTOR, CUDNN_BACKEND_KNOB_CHOICE_DESCRIPTOR, CUDNN_BACKEND_KNOB_INFO_DESCRIPTOR, CUDNN_BACKEND_LAYOUT_INFO_DESCRIPTOR, CUDNN_BACKEND_OPERATION_CONVOLUTION_FORWARD_DESCRIPTOR, CUDNN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_FILTER_DESCRIPTOR, CUDNN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_DATA_DESCRIPTOR, CUDNN_BACKEND_OPERATION_POINTWISE_DESCRIPTOR, CUDNN_BACKEND_OPERATION_GEN_STATS_DESCRIPTOR, CUDNN_BACKEND_OPERATIONGRAPH_DESCRIPTOR, CUDNN_BACKEND_VARIANT_PACK_DESCRIPTOR, CUDNN_BACKEND_TENSOR_DESCRIPTOR, CUDNN_BACKEND_MATMUL_DESCRIPTOR, CUDNN_BACKEND_OPERATION_MATMUL_DESCRIPTOR, CUDNN_BACKEND_OPERATION_BN_FINALIZE_STATISTICS_DESCRIPTOR, CUDNN_BACKEND_REDUCTION_DESCRIPTOR, CUDNN_BACKEND_OPERATION_REDUCTION_DESCRIPTOR, CUDNN_BACKEND_OPERATION_BN_BWD_WEIGHTS_DESCRIPTOR, CUDNN_BACKEND_RESAMPLE_DESCRIPTOR, CUDNN_BACKEND_OPERATION_RESAMPLE_FWD_DESCRIPTOR, CUDNN_BACKEND_OPERATION_RESAMPLE_BWD_DESCRIPTOR, CUDNN_BACKEND_OPERATION_CONCAT_DESCRIPTOR, CUDNN_BACKEND_OPERATION_SIGNAL_DESCRIPTOR, CUDNN_BACKEND_OPERATION_NORM_FORWARD_DESCRIPTOR, CUDNN_BACKEND_OPERATION_NORM_BACKWARD_DESCRIPTOR, CUDNN_BACKEND_OPERATION_RESHAPE_DESCRIPTOR, CUDNN_BACKEND_RNG_DESCRIPTOR, CUDNN_BACKEND_OPERATION_RNG_DESCRIPTOR } cudnnBackendDescriptorType_t; typedef enum { CUDNN_NUMERICAL_NOTE_TENSOR_CORE = 0, CUDNN_NUMERICAL_NOTE_DOWN_CONVERT_INPUTS, CUDNN_NUMERICAL_NOTE_REDUCED_PRECISION_REDUCTION, CUDNN_NUMERICAL_NOTE_FFT, CUDNN_NUMERICAL_NOTE_NONDETERMINISTIC, CUDNN_NUMERICAL_NOTE_WINOGRAD, CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_4x4, CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_6x6, CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_13x13, CUDNN_NUMERICAL_NOTE_TYPE_COUNT, } cudnnBackendNumericalNote_t; typedef enum { CUDNN_BEHAVIOR_NOTE_RUNTIME_COMPILATION = 0, CUDNN_BEHAVIOR_NOTE_REQUIRES_FILTER_INT8x32_REORDER = 1, CUDNN_BEHAVIOR_NOTE_REQUIRES_BIAS_INT8x32_REORDER = 2, CUDNN_BEHAVIOR_NOTE_TYPE_COUNT, } cudnnBackendBehaviorNote_t; typedef enum { CUDNN_KNOB_TYPE_SPLIT_K = 0, CUDNN_KNOB_TYPE_SWIZZLE = 1, CUDNN_KNOB_TYPE_TILE_SIZE = 2, CUDNN_KNOB_TYPE_USE_TEX = 3, CUDNN_KNOB_TYPE_EDGE = 4, CUDNN_KNOB_TYPE_KBLOCK = 5, CUDNN_KNOB_TYPE_LDGA = 6, CUDNN_KNOB_TYPE_LDGB = 7, CUDNN_KNOB_TYPE_CHUNK_K = 8, CUDNN_KNOB_TYPE_SPLIT_H = 9, CUDNN_KNOB_TYPE_WINO_TILE = 10, CUDNN_KNOB_TYPE_MULTIPLY = 11, CUDNN_KNOB_TYPE_SPLIT_K_BUF = 12, CUDNN_KNOB_TYPE_TILEK = 13, CUDNN_KNOB_TYPE_STAGES = 14, CUDNN_KNOB_TYPE_REDUCTION_MODE = 15, CUDNN_KNOB_TYPE_CTA_SPLIT_K_MODE = 16, CUDNN_KNOB_TYPE_SPLIT_K_SLC = 17, CUDNN_KNOB_TYPE_IDX_MODE = 18, CUDNN_KNOB_TYPE_SLICED = 19, CUDNN_KNOB_TYPE_SPLIT_RS = 20, CUDNN_KNOB_TYPE_SINGLEBUFFER = 21, CUDNN_KNOB_TYPE_LDGC = 22, CUDNN_KNOB_TYPE_SPECFILT = 23, CUDNN_KNOB_TYPE_KERNEL_CFG = 24, CUDNN_KNOB_TYPE_WORKSPACE = 25, CUDNN_KNOB_TYPE_TILE_CGA = 26, CUDNN_KNOB_TYPE_TILE_CGA_M = 27, CUDNN_KNOB_TYPE_TILE_CGA_N = 28, CUDNN_KNOB_TYPE_BLOCK_SIZE = 29, CUDNN_KNOB_TYPE_OCCUPANCY = 30, CUDNN_KNOB_TYPE_ARRAY_SIZE_PER_THREAD = 31, CUDNN_KNOB_TYPE_NUM_C_PER_BLOCK = 32, CUDNN_KNOB_TYPE_SPLIT_COLS = 33, CUDNN_KNOB_TYPE_TILE_ROWS = 34, CUDNN_KNOB_TYPE_TILE_COLS = 35, CUDNN_KNOB_TYPE_LOAD_SIZE = 36, CUDNN_KNOB_TYPE_COUNTS, } cudnnBackendKnobType_t; typedef enum { CUDNN_LAYOUT_TYPE_PREFERRED_NCHW = 0, CUDNN_LAYOUT_TYPE_PREFERRED_NHWC = 1, CUDNN_LAYOUT_TYPE_PREFERRED_PAD4CK = 2, CUDNN_LAYOUT_TYPE_PREFERRED_PAD8CK = 3, CUDNN_LAYOUT_TYPE_COUNT = 4, } cudnnBackendLayoutType_t; typedef enum { CUDNN_HEUR_MODE_INSTANT = 0, CUDNN_HEUR_MODE_B = 1, CUDNN_HEUR_MODE_FALLBACK = 2, CUDNN_HEUR_MODE_A = 3, CUDNN_HEUR_MODES_COUNT = 4, } cudnnBackendHeurMode_t; typedef enum { CUDNN_TENSOR_REORDERING_NONE = 0, CUDNN_TENSOR_REORDERING_INT8x32 = 1, CUDNN_TENSOR_REORDERING_F16x16 = 2, } cudnnBackendTensorReordering_t; typedef enum { CUDNN_ZERO_PAD = 0, CUDNN_NEG_INF_PAD = 1, CUDNN_EDGE_VAL_PAD = 2, } cudnnPaddingMode_t; typedef enum { CUDNN_LAYER_NORM = 0, CUDNN_INSTANCE_NORM = 1, CUDNN_BATCH_NORM = 2, CUDNN_GROUP_NORM = 3, } cudnnBackendNormMode_t; typedef enum { CUDNN_NORM_FWD_INFERENCE = 0, CUDNN_NORM_FWD_TRAINING = 1, } cudnnBackendNormFwdPhase_t; cudnnStatus_t CUDNNWINAPI cudnnBackendCreateDescriptor(cudnnBackendDescriptorType_t descriptorType, cudnnBackendDescriptor_t *descriptor); cudnnStatus_t CUDNNWINAPI cudnnBackendDestroyDescriptor(cudnnBackendDescriptor_t descriptor); cudnnStatus_t CUDNNWINAPI cudnnBackendInitialize(cudnnBackendDescriptor_t descriptor); cudnnStatus_t CUDNNWINAPI cudnnBackendFinalize(cudnnBackendDescriptor_t descriptor); cudnnStatus_t CUDNNWINAPI cudnnBackendSetAttribute(cudnnBackendDescriptor_t descriptor, cudnnBackendAttributeName_t attributeName, cudnnBackendAttributeType_t attributeType, int64_t elementCount, const void *arrayOfElements); cudnnStatus_t CUDNNWINAPI cudnnBackendGetAttribute(cudnnBackendDescriptor_t const descriptor, cudnnBackendAttributeName_t attributeName, cudnnBackendAttributeType_t attributeType, int64_t requestedElementCount, int64_t *elementCount, void *arrayOfElements); cudnnStatus_t CUDNNWINAPI cudnnBackendExecute(cudnnHandle_t handle, cudnnBackendDescriptor_t executionPlan, cudnnBackendDescriptor_t variantPack); #if defined(__cplusplus) } #endif #endif /* _CUDNN_BACKEND_H_ */