This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/develop/include/miopen/miopen.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/develop/include/miopen/miopen.h Source File#

MIOpen: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/develop/include/miopen/miopen.h Source File
miopen.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * MIT License
4  *
5  * Copyright (c) 2023 Advanced Micro Devices, Inc.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a copy
8  * of this software and associated documentation files (the "Software"), to deal
9  * in the Software without restriction, including without limitation the rights
10  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11  * copies of the Software, and to permit persons to whom the Software is
12  * furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in all
15  * copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24  *
25  *******************************************************************************/
26 #ifndef MIOPEN_GUARD_MIOPEN_H_
27 #define MIOPEN_GUARD_MIOPEN_H_
28 
29 #ifdef __clang__
30 #pragma clang diagnostic push
31 #pragma clang diagnostic ignored "-Wextern-c-compat"
32 #endif
33 
34 #include <stddef.h>
35 #include <stdbool.h>
36 #include <miopen/config.h>
37 #include <miopen/export.h>
38 
39 #if MIOPEN_BACKEND_OPENCL
40 #define CL_TARGET_OPENCL_VERSION 120
41 #if defined(__APPLE__) || defined(__MACOSX)
42 #include <OpenCL/cl.h>
43 #else
44 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
45 #include <CL/cl.h>
46 #endif
47 
48 #elif MIOPEN_BACKEND_HIP
49 #include <hip/hip_runtime_api.h>
50 #endif
51 
52 /*
53  * @defgroup convolutions
54  * @defgroup pooling
55  * @defgroup handle
56  * @defgroup layernorm
57  * @defgroup LRN
58  * @defgroup batchnorm
59  * @defgroup activation
60  * @defgroup tensor
61  * @defgroup softmax
62  * @defgroup RNN
63  * @defgroup fusion
64  * @defgroup LossFunction
65  * @defgroup TensorReduce
66  * @defgroup find2
67  * @defgroup ReduceExtreme
68  * @defgroup groupnorm
69  * @defgroup cat
70  * @defgroup SGD
71  * @defgroup getitem
72  * @defgroup ReduceCalculation
73  * @defgroup RotaryPositionalEmbeddings
74  * @defgroup ReLU
75  *
76  */
77 
79 #define MIOPEN_DECLARE_OBJECT(name) \
80  struct name \
81  { \
82  }; \
83  typedef struct name* name##_t;
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 
89 #if MIOPEN_BACKEND_OPENCL
90 typedef cl_command_queue miopenAcceleratorQueue_t;
91 #elif MIOPEN_BACKEND_HIP
92 typedef hipStream_t miopenAcceleratorQueue_t;
93 #endif
94 
98 MIOPEN_DECLARE_OBJECT(miopenHandle);
99 
108 typedef enum
109 {
122 
123 #ifdef MIOPEN_BETA_API
124 typedef enum
125 {
129 #endif
130 
138 MIOPEN_EXPORT const char* miopenGetErrorString(miopenStatus_t error);
139 
148 typedef void* (*miopenAllocatorFunction)(void* context, size_t sizeBytes);
149 
158 typedef void (*miopenDeallocatorFunction)(void* context, void* memory);
159 
173 MIOPEN_EXPORT miopenStatus_t miopenGetVersion(size_t* major, size_t* minor, size_t* patch);
174 
183 MIOPEN_EXPORT miopenStatus_t miopenCreate(miopenHandle_t* handle);
184 
196 MIOPEN_EXPORT miopenStatus_t miopenCreateWithStream(miopenHandle_t* handle,
197  miopenAcceleratorQueue_t stream);
198 
205 MIOPEN_EXPORT miopenStatus_t miopenDestroy(miopenHandle_t handle);
206 
214 MIOPEN_EXPORT miopenStatus_t miopenSetStream(miopenHandle_t handle,
215  miopenAcceleratorQueue_t streamID);
216 
224 MIOPEN_EXPORT miopenStatus_t miopenGetStream(miopenHandle_t handle,
225  miopenAcceleratorQueue_t* streamID);
226 
243 MIOPEN_EXPORT miopenStatus_t miopenSetAllocator(miopenHandle_t handle,
244  miopenAllocatorFunction allocator,
245  miopenDeallocatorFunction deallocator,
246  void* allocatorContext);
247 
259 MIOPEN_EXPORT miopenStatus_t miopenGetKernelTime(miopenHandle_t handle, float* time);
260 
268 MIOPEN_EXPORT miopenStatus_t miopenEnableProfiling(miopenHandle_t handle, bool enable);
270 // CLOSEOUT HANDLE DOXYGEN GROUP
271 
279 MIOPEN_DECLARE_OBJECT(miopenFusionOpDescriptor);
280 
288 MIOPEN_DECLARE_OBJECT(miopenTensorDescriptor);
289 
296 MIOPEN_DECLARE_OBJECT(miopenSeqTensorDescriptor);
297 
305 MIOPEN_DECLARE_OBJECT(miopenConvolutionDescriptor);
306 
314 MIOPEN_DECLARE_OBJECT(miopenPoolingDescriptor);
315 
323 MIOPEN_DECLARE_OBJECT(miopenLRNDescriptor);
324 
331 MIOPEN_DECLARE_OBJECT(miopenActivationDescriptor);
332 
336 MIOPEN_DECLARE_OBJECT(miopenRNNDescriptor);
337 
341 MIOPEN_DECLARE_OBJECT(miopenCTCLossDescriptor);
342 
346 MIOPEN_DECLARE_OBJECT(miopenDropoutDescriptor);
347 
351 MIOPEN_DECLARE_OBJECT(miopenReduceTensorDescriptor);
352 
356 MIOPEN_DECLARE_OBJECT(miopenMhaDescriptor);
357 
361 MIOPEN_DECLARE_OBJECT(miopenSoftmaxDescriptor);
362 
367 typedef enum
368 {
373  // miopenInt8x4 = 4, /*!< Pack of 4x Int8 in NCHW_VECT_C format (Support discontinued) */
374  miopenBFloat16 = 5,
377 #ifdef MIOPEN_BETA_API
380 #else
381 // miopenReserved1 = 7,
382 // miopenReserved2 = 8,
383 #endif
386 
392 typedef enum
393 {
404 
409 typedef enum
410 {
416 
421 typedef enum
422 {
428 
433 typedef enum
434 {
440 
445 typedef enum
446 {
451 
456 typedef enum
457 {
462 
469 typedef enum
470 {
474 
479 typedef enum
480 {
484 #ifdef MIOPEN_BETA_API
489 typedef enum
490 {
493  1,
495  2,
499  4,
503 #endif
508 typedef enum
509 {
513 
518 typedef enum
519 {
528  7,
530  8,
532  9,
535 
540 typedef enum
541 {
546 
551 typedef enum
552 {
555  1,
557 
565 #define MIOPEN_API_VERSION_REDUCE_TENSOR 1
566 
571 typedef enum
572 {
575  1,
577  2,
579  3,
581  4,
583  5,
585  6,
588  // MIOPEN_REDUCE_TENSOR_MUL_NO_ZEROS =
589  // 8, /*!< the operation is same as MUL, but does not have the zero values considered */
591 
596 typedef enum
597 {
601 
606 typedef enum
607 {
611 
616 typedef enum
617 {
623 
628 typedef enum
629 {
631  0,
635  1,
637 #ifdef MIOPEN_BETA_API
639  2,
643 #else
644 // miopenReserved1 = 2,
645 #endif
647 
659 MIOPEN_EXPORT miopenStatus_t miopenCreateTensorDescriptor(miopenTensorDescriptor_t* tensorDesc);
660 
674  miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int n, int c, int h, int w);
675 
686 MIOPEN_EXPORT miopenStatus_t
687 miopenSetNdTensorDescriptorWithLayout(miopenTensorDescriptor_t tensorDesc,
688  miopenDataType_t dataType,
689  miopenTensorLayout_t tensorLayout,
690  const int* lens,
691  int num_lens);
711 MIOPEN_EXPORT miopenStatus_t miopenSet4dTensorDescriptorEx(miopenTensorDescriptor_t tensorDesc,
712  miopenDataType_t dataType,
713  int n,
714  int c,
715  int h,
716  int w,
717  int nStride,
718  int cStride,
719  int hStride,
720  int wStride);
721 
738 MIOPEN_EXPORT miopenStatus_t miopenGet4dTensorDescriptor(miopenTensorDescriptor_t tensorDesc,
739  miopenDataType_t* dataType,
740  int* n,
741  int* c,
742  int* h,
743  int* w,
744  int* nStride,
745  int* cStride,
746  int* hStride,
747  int* wStride);
748 
759 MIOPEN_EXPORT miopenStatus_t miopenSetTensorDescriptor(miopenTensorDescriptor_t tensorDesc,
760  miopenDataType_t dataType,
761  int nbDims,
762  const int* dimsA,
763  const int* stridesA);
764 
765 #ifdef MIOPEN_BETA_API
768 MIOPEN_EXPORT miopenStatus_t miopenSetTensorDescriptorV2(miopenTensorDescriptor_t tensorDesc,
769  miopenDataType_t dataType,
770  int nbDims,
771  const size_t* dimsA,
772  const size_t* stridesA);
773 #endif
774 
775 #ifdef MIOPEN_BETA_API
785 MIOPEN_EXPORT miopenStatus_t miopenSetTensorCastType(miopenTensorDescriptor_t tensorDesc,
786  miopenDataType_t cast_type);
787 #endif
788 
797 MIOPEN_EXPORT miopenStatus_t miopenGetTensorDescriptorSize(miopenTensorDescriptor_t tensorDesc,
798  int* size);
799 
808 MIOPEN_EXPORT miopenStatus_t miopenGetTensorDescriptor(miopenTensorDescriptor_t tensorDesc,
809  miopenDataType_t* dataType,
810  int* dimsA,
811  int* stridesA);
812 
818 MIOPEN_EXPORT miopenStatus_t miopenDestroyTensorDescriptor(miopenTensorDescriptor_t tensorDesc);
819 
826 MIOPEN_EXPORT miopenStatus_t
827 miopenCreateSeqTensorDescriptor(miopenSeqTensorDescriptor_t* tensorDesc);
828 
834 MIOPEN_EXPORT miopenStatus_t
835 miopenDestroySeqTensorDescriptor(miopenSeqTensorDescriptor_t tensorDesc);
836 
856 MIOPEN_EXPORT miopenStatus_t miopenOpTensor(miopenHandle_t handle,
857  miopenTensorOp_t tensorOp,
858  const void* alpha1,
859  const miopenTensorDescriptor_t aDesc,
860  const void* A,
861  const void* alpha2,
862  const miopenTensorDescriptor_t bDesc,
863  const void* B,
864  const void* beta,
865  const miopenTensorDescriptor_t cDesc,
866  void* C);
867 
878 MIOPEN_EXPORT miopenStatus_t miopenSetTensor(miopenHandle_t handle,
879  const miopenTensorDescriptor_t yDesc,
880  void* y,
881  const void* alpha);
882 
893 MIOPEN_EXPORT miopenStatus_t miopenScaleTensor(miopenHandle_t handle,
894  const miopenTensorDescriptor_t yDesc,
895  void* y,
896  const void* alpha);
897 
904 MIOPEN_EXPORT miopenStatus_t miopenGetTensorNumBytes(miopenTensorDescriptor_t tensorDesc,
905  size_t* numBytes);
906 
924 MIOPEN_EXPORT miopenStatus_t miopenTransformTensor(miopenHandle_t handle,
925  const void* alpha,
926  const miopenTensorDescriptor_t xDesc,
927  const void* x,
928  const void* beta,
929  const miopenTensorDescriptor_t yDesc,
930  void* y);
931 
933 // CLOSEOUT TENSOR DOXYGEN GROUP
934 
945 MIOPEN_EXPORT miopenStatus_t
946 miopenCreateConvolutionDescriptor(miopenConvolutionDescriptor_t* convDesc);
947 
963 MIOPEN_EXPORT miopenStatus_t miopenInitConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc,
965  int pad_h,
966  int pad_w,
967  int stride_h,
968  int stride_w,
969  int dilation_h,
970  int dilation_w);
971 
982 MIOPEN_EXPORT miopenStatus_t
983 miopenInitConvolutionNdDescriptor(miopenConvolutionDescriptor_t convDesc,
984  int spatialDim,
985  const int* padA,
986  const int* strideA,
987  const int* dilationA,
988  miopenConvolutionMode_t c_mode);
989 
996 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionSpatialDim(miopenConvolutionDescriptor_t convDesc,
997  int* spatialDim);
998 
1014 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc,
1015  miopenConvolutionMode_t* c_mode,
1016  int* pad_h,
1017  int* pad_w,
1018  int* stride_h,
1019  int* stride_w,
1020  int* dilation_h,
1021  int* dilation_w);
1022 
1034 MIOPEN_EXPORT miopenStatus_t
1035 miopenGetConvolutionNdDescriptor(miopenConvolutionDescriptor_t convDesc,
1036  int requestedSpatialDim,
1037  int* spatialDim,
1038  int* padA,
1039  int* strideA,
1040  int* dilationA,
1041  miopenConvolutionMode_t* c_mode);
1042 
1049 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc,
1050  int* groupCount);
1051 
1065 MIOPEN_EXPORT miopenStatus_t miopenSetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc,
1066  int groupCount);
1067 
1080 MIOPEN_EXPORT miopenStatus_t
1081 miopenSetTransposeConvOutputPadding(miopenConvolutionDescriptor_t convDesc, int adj_h, int adj_w);
1082 
1096  miopenConvolutionDescriptor_t convDesc, int spatialDim, const int* adjA);
1097 
1115 MIOPEN_EXPORT miopenStatus_t
1116 miopenGetConvolutionForwardOutputDim(miopenConvolutionDescriptor_t convDesc,
1117  const miopenTensorDescriptor_t inputTensorDesc,
1118  const miopenTensorDescriptor_t filterDesc,
1119  int* n,
1120  int* c,
1121  int* h,
1122  int* w);
1123 
1137 MIOPEN_EXPORT miopenStatus_t
1138 miopenGetConvolutionNdForwardOutputDim(miopenConvolutionDescriptor_t convDesc,
1139  const miopenTensorDescriptor_t inputTensorDesc,
1140  const miopenTensorDescriptor_t filterDesc,
1141  int* nDim,
1142  int* outputTensorDimA);
1143 
1149 MIOPEN_EXPORT miopenStatus_t
1150 miopenDestroyConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc);
1151 
1158 MIOPEN_EXPORT miopenStatus_t miopenSetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc,
1159  const miopenConvolutionAttrib_t attr,
1160  int value);
1161 
1168 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc,
1169  const miopenConvolutionAttrib_t attr,
1170  int* value);
1171 
1176 typedef enum
1177 {
1184 
1188 typedef enum
1189 {
1195 
1199 typedef enum
1200 {
1206  4,
1209 
1213 typedef enum
1214 {
1221 
1228 typedef struct
1229 {
1230  union
1231  {
1237  };
1238 
1239  float time;
1240  size_t memory;
1243 
1252 typedef struct
1253 {
1254  float time;
1259  uint64_t solution_id;
1263 
1279 MIOPEN_EXPORT miopenStatus_t
1281  const miopenTensorDescriptor_t wDesc,
1282  const miopenTensorDescriptor_t xDesc,
1283  const miopenConvolutionDescriptor_t convDesc,
1284  const miopenTensorDescriptor_t yDesc,
1285  size_t* solutionCount);
1286 
1310 MIOPEN_EXPORT miopenStatus_t
1312  const miopenTensorDescriptor_t wDesc,
1313  const miopenTensorDescriptor_t xDesc,
1314  const miopenConvolutionDescriptor_t convDesc,
1315  const miopenTensorDescriptor_t yDesc,
1316  const size_t maxSolutionCount,
1317  size_t* solutionCount,
1318  miopenConvSolution_t* solutions);
1319 
1337 MIOPEN_EXPORT miopenStatus_t
1339  const miopenTensorDescriptor_t wDesc,
1340  const miopenTensorDescriptor_t xDesc,
1341  const miopenConvolutionDescriptor_t convDesc,
1342  const miopenTensorDescriptor_t yDesc,
1343  const uint64_t solution_id,
1344  size_t* workSpaceSize);
1345 
1363 MIOPEN_EXPORT miopenStatus_t
1365  const miopenTensorDescriptor_t wDesc,
1366  const miopenTensorDescriptor_t xDesc,
1367  const miopenConvolutionDescriptor_t convDesc,
1368  const miopenTensorDescriptor_t yDesc,
1369  const uint64_t solution_id);
1370 
1388 MIOPEN_EXPORT miopenStatus_t
1390  const miopenTensorDescriptor_t wDesc,
1391  const void* w,
1392  const miopenTensorDescriptor_t xDesc,
1393  const void* x,
1394  const miopenConvolutionDescriptor_t convDesc,
1395  const miopenTensorDescriptor_t yDesc,
1396  void* y,
1397  void* workSpace,
1398  size_t workSpaceSize,
1399  const uint64_t solution_id);
1400 
1418 MIOPEN_EXPORT miopenStatus_t
1420  const miopenTensorDescriptor_t dyDesc,
1421  const miopenTensorDescriptor_t wDesc,
1422  const miopenConvolutionDescriptor_t convDesc,
1423  const miopenTensorDescriptor_t dxDesc,
1424  size_t* solutionCount);
1425 
1450 MIOPEN_EXPORT miopenStatus_t
1452  const miopenTensorDescriptor_t dyDesc,
1453  const miopenTensorDescriptor_t wDesc,
1454  const miopenConvolutionDescriptor_t convDesc,
1455  const miopenTensorDescriptor_t dxDesc,
1456  const size_t maxSolutionCount,
1457  size_t* solutionCount,
1458  miopenConvSolution_t* solutions);
1459 
1477 MIOPEN_EXPORT miopenStatus_t
1479  const miopenTensorDescriptor_t dyDesc,
1480  const miopenTensorDescriptor_t wDesc,
1481  const miopenConvolutionDescriptor_t convDesc,
1482  const miopenTensorDescriptor_t dxDesc,
1483  const uint64_t solution_id,
1484  size_t* workSpaceSize);
1485 
1504 MIOPEN_EXPORT miopenStatus_t
1506  const miopenTensorDescriptor_t dyDesc,
1507  const miopenTensorDescriptor_t wDesc,
1508  const miopenConvolutionDescriptor_t convDesc,
1509  const miopenTensorDescriptor_t dxDesc,
1510  const uint64_t solution_id);
1511 
1529 MIOPEN_EXPORT miopenStatus_t
1531  const miopenTensorDescriptor_t dyDesc,
1532  const void* dy,
1533  const miopenTensorDescriptor_t wDesc,
1534  const void* w,
1535  const miopenConvolutionDescriptor_t convDesc,
1536  const miopenTensorDescriptor_t dxDesc,
1537  void* dx,
1538  void* workSpace,
1539  size_t workSpaceSize,
1540  const uint64_t solution_id);
1541 
1559 MIOPEN_EXPORT miopenStatus_t
1561  const miopenTensorDescriptor_t dyDesc,
1562  const miopenTensorDescriptor_t xDesc,
1563  const miopenConvolutionDescriptor_t convDesc,
1564  const miopenTensorDescriptor_t dwDesc,
1565  size_t* solutionCount);
1566 
1590 MIOPEN_EXPORT miopenStatus_t
1592  const miopenTensorDescriptor_t dyDesc,
1593  const miopenTensorDescriptor_t xDesc,
1594  const miopenConvolutionDescriptor_t convDesc,
1595  const miopenTensorDescriptor_t dwDesc,
1596  const size_t maxSolutionCount,
1597  size_t* solutionCount,
1598  miopenConvSolution_t* solutions);
1599 
1618  miopenHandle_t handle,
1619  const miopenTensorDescriptor_t dyDesc,
1620  const miopenTensorDescriptor_t xDesc,
1621  const miopenConvolutionDescriptor_t convDesc,
1622  const miopenTensorDescriptor_t dwDesc,
1623  const uint64_t solution_id,
1624  size_t* workSpaceSize);
1625 
1643 MIOPEN_EXPORT miopenStatus_t
1645  const miopenTensorDescriptor_t dyDesc,
1646  const miopenTensorDescriptor_t xDesc,
1647  const miopenConvolutionDescriptor_t convDesc,
1648  const miopenTensorDescriptor_t dwDesc,
1649  const uint64_t solution_id);
1650 
1669 MIOPEN_EXPORT miopenStatus_t
1671  const miopenTensorDescriptor_t dyDesc,
1672  const void* dy,
1673  const miopenTensorDescriptor_t xDesc,
1674  const void* x,
1675  const miopenConvolutionDescriptor_t convDesc,
1676  const miopenTensorDescriptor_t dwDesc,
1677  void* dw,
1678  void* workSpace,
1679  size_t workSpaceSize,
1680  const uint64_t solution_id);
1681 
1708 MIOPEN_EXPORT miopenStatus_t
1710  const miopenTensorDescriptor_t wDesc,
1711  const miopenTensorDescriptor_t xDesc,
1712  const miopenConvolutionDescriptor_t convDesc,
1713  const miopenTensorDescriptor_t yDesc,
1714  size_t* workSpaceSize);
1715 
1759 MIOPEN_EXPORT miopenStatus_t
1761  const miopenTensorDescriptor_t xDesc,
1762  const void* x,
1763  const miopenTensorDescriptor_t wDesc,
1764  const void* w,
1765  const miopenConvolutionDescriptor_t convDesc,
1766  const miopenTensorDescriptor_t yDesc,
1767  void* y,
1768  const int requestAlgoCount,
1769  int* returnedAlgoCount,
1770  miopenConvAlgoPerf_t* perfResults,
1771  void* workSpace,
1772  size_t workSpaceSize,
1773  bool exhaustiveSearch);
1774 
1809 MIOPEN_EXPORT miopenStatus_t miopenConvolutionForward(miopenHandle_t handle,
1810  const void* alpha,
1811  const miopenTensorDescriptor_t xDesc,
1812  const void* x,
1813  const miopenTensorDescriptor_t wDesc,
1814  const void* w,
1815  const miopenConvolutionDescriptor_t convDesc,
1817  const void* beta,
1818  const miopenTensorDescriptor_t yDesc,
1819  void* y,
1820  void* workSpace,
1821  size_t workSpaceSize);
1822 
1838 MIOPEN_EXPORT miopenStatus_t miopenConvolutionForwardBias(miopenHandle_t handle,
1839  const void* alpha,
1840  const miopenTensorDescriptor_t bDesc,
1841  const void* b,
1842  const void* beta,
1843  const miopenTensorDescriptor_t yDesc,
1844  void* y);
1845 
1873 MIOPEN_EXPORT miopenStatus_t
1875  const miopenTensorDescriptor_t dyDesc,
1876  const miopenTensorDescriptor_t wDesc,
1877  const miopenConvolutionDescriptor_t convDesc,
1878  const miopenTensorDescriptor_t dxDesc,
1879  size_t* workSpaceSize);
1880 
1924 MIOPEN_EXPORT miopenStatus_t
1926  const miopenTensorDescriptor_t dyDesc,
1927  const void* dy,
1928  const miopenTensorDescriptor_t wDesc,
1929  const void* w,
1930  const miopenConvolutionDescriptor_t convDesc,
1931  const miopenTensorDescriptor_t dxDesc,
1932  void* dx,
1933  const int requestAlgoCount,
1934  int* returnedAlgoCount,
1935  miopenConvAlgoPerf_t* perfResults,
1936  void* workSpace,
1937  size_t workSpaceSize,
1938  bool exhaustiveSearch);
1939 
1973 MIOPEN_EXPORT miopenStatus_t
1974 miopenConvolutionBackwardData(miopenHandle_t handle,
1975  const void* alpha,
1976  const miopenTensorDescriptor_t dyDesc,
1977  const void* dy,
1978  const miopenTensorDescriptor_t wDesc,
1979  const void* w,
1980  const miopenConvolutionDescriptor_t convDesc,
1982  const void* beta,
1983  const miopenTensorDescriptor_t dxDesc,
1984  void* dx,
1985  void* workSpace,
1986  size_t workSpaceSize);
1987 
2015 MIOPEN_EXPORT miopenStatus_t
2017  const miopenTensorDescriptor_t dyDesc,
2018  const miopenTensorDescriptor_t xDesc,
2019  const miopenConvolutionDescriptor_t convDesc,
2020  const miopenTensorDescriptor_t dwDesc,
2021  size_t* workSpaceSize);
2022 
2066 MIOPEN_EXPORT miopenStatus_t
2068  const miopenTensorDescriptor_t dyDesc,
2069  const void* dy,
2070  const miopenTensorDescriptor_t xDesc,
2071  const void* x,
2072  const miopenConvolutionDescriptor_t convDesc,
2073  const miopenTensorDescriptor_t dwDesc,
2074  void* dw,
2075  const int requestAlgoCount,
2076  int* returnedAlgoCount,
2077  miopenConvAlgoPerf_t* perfResults,
2078  void* workSpace,
2079  size_t workSpaceSize,
2080  bool exhaustiveSearch);
2081 
2115 MIOPEN_EXPORT miopenStatus_t
2116 miopenConvolutionBackwardWeights(miopenHandle_t handle,
2117  const void* alpha,
2118  const miopenTensorDescriptor_t dyDesc,
2119  const void* dy,
2120  const miopenTensorDescriptor_t xDesc,
2121  const void* x,
2122  const miopenConvolutionDescriptor_t convDesc,
2124  const void* beta,
2125  const miopenTensorDescriptor_t dwDesc,
2126  void* dw,
2127  void* workSpace,
2128  size_t workSpaceSize);
2129 
2145 MIOPEN_EXPORT miopenStatus_t miopenConvolutionBackwardBias(miopenHandle_t handle,
2146  const void* alpha,
2147  const miopenTensorDescriptor_t dyDesc,
2148  const void* dy,
2149  const void* beta,
2150  const miopenTensorDescriptor_t dbDesc,
2151  void* db);
2152 
2154 // CLOSEOUT CONVOLUTIONS DOXYGEN GROUP
2155 
2156 // Pooling APIs
2167 MIOPEN_EXPORT miopenStatus_t miopenCreatePoolingDescriptor(miopenPoolingDescriptor_t* poolDesc);
2168 
2177 MIOPEN_EXPORT miopenStatus_t miopenSetPoolingIndexType(miopenPoolingDescriptor_t poolDesc,
2178  miopenIndexType_t index_type);
2179 
2187 MIOPEN_EXPORT miopenStatus_t miopenGetPoolingIndexType(miopenPoolingDescriptor_t poolDesc,
2188  miopenIndexType_t* index_type);
2189 
2198  miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t workspace_index);
2199 
2207  miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t* workspace_index);
2208 
2223 MIOPEN_EXPORT miopenStatus_t miopenSet2dPoolingDescriptor(miopenPoolingDescriptor_t poolDesc,
2224  miopenPoolingMode_t mode,
2225  int windowHeight,
2226  int windowWidth,
2227  int pad_h,
2228  int pad_w,
2229  int stride_h,
2230  int stride_w);
2231 
2246 MIOPEN_EXPORT miopenStatus_t miopenGet2dPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc,
2247  miopenPoolingMode_t* mode,
2248  int* windowHeight,
2249  int* windowWidth,
2250  int* pad_h,
2251  int* pad_w,
2252  int* stride_h,
2253  int* stride_w);
2254 
2269 MIOPEN_EXPORT miopenStatus_t
2270 miopenGetPoolingForwardOutputDim(const miopenPoolingDescriptor_t poolDesc,
2271  const miopenTensorDescriptor_t tensorDesc,
2272  int* n,
2273  int* c,
2274  int* h,
2275  int* w);
2276 
2292 MIOPEN_EXPORT miopenStatus_t miopenSetNdPoolingDescriptor(miopenPoolingDescriptor_t poolDesc,
2293  const miopenPoolingMode_t mode,
2294  int nbDims,
2295  const int* windowDimA,
2296  const int* padA,
2297  const int* stridesA);
2298 
2315 MIOPEN_EXPORT miopenStatus_t miopenGetNdPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc,
2316  int nbDimsRequested,
2317  miopenPoolingMode_t* mode,
2318  int* nbDims,
2319  int* windowDimA,
2320  int* padA,
2321  int* stridesA);
2322 
2335 MIOPEN_EXPORT miopenStatus_t
2336 miopenGetPoolingNdForwardOutputDim(const miopenPoolingDescriptor_t poolDesc,
2337  const miopenTensorDescriptor_t tensorDesc,
2338  int dims,
2339  int* tensorDimArr);
2340 
2353 MIOPEN_EXPORT miopenStatus_t miopenPoolingGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc,
2354  size_t* workSpaceSize);
2355 
2368 MIOPEN_EXPORT miopenStatus_t
2369 miopenPoolingGetWorkSpaceSizeV2(const miopenPoolingDescriptor_t poolDesc,
2370  const miopenTensorDescriptor_t yDesc,
2371  size_t* workSpaceSize);
2372 
2393 MIOPEN_EXPORT miopenStatus_t miopenPoolingForward(miopenHandle_t handle,
2394  const miopenPoolingDescriptor_t poolDesc,
2395  const void* alpha,
2396  const miopenTensorDescriptor_t xDesc,
2397  const void* x,
2398  const void* beta,
2399  const miopenTensorDescriptor_t yDesc,
2400  void* y,
2401  bool do_backward,
2402  void* workSpace,
2403  size_t workSpaceSize);
2404 
2425 MIOPEN_EXPORT miopenStatus_t miopenPoolingBackward(miopenHandle_t handle,
2426  const miopenPoolingDescriptor_t poolDesc,
2427  const void* alpha,
2428  const miopenTensorDescriptor_t yDesc,
2429  const void* y,
2430  const miopenTensorDescriptor_t dyDesc,
2431  const void* dy,
2432  const miopenTensorDescriptor_t xDesc,
2433  const void* x,
2434  const void* beta,
2435  const miopenTensorDescriptor_t dxDesc,
2436  void* dx,
2437  void* workSpace);
2438 
2444 MIOPEN_EXPORT miopenStatus_t miopenDestroyPoolingDescriptor(miopenPoolingDescriptor_t poolDesc);
2445 
2447 // CLOSEOUT POOLING DOXYGEN GROUP
2448 
2449 // LRN APIs
2459 MIOPEN_EXPORT miopenStatus_t miopenCreateLRNDescriptor(miopenLRNDescriptor_t* lrnDesc);
2460 
2474 MIOPEN_EXPORT miopenStatus_t miopenSetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc,
2475  miopenLRNMode_t mode,
2476  unsigned int lrnN,
2477  double lrnAlpha,
2478  double lrnBeta,
2479  double lrnK);
2480 
2493 MIOPEN_EXPORT miopenStatus_t miopenGetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc,
2494  miopenLRNMode_t* mode,
2495  unsigned int* lrnN,
2496  double* lrnAlpha,
2497  double* lrnBeta,
2498  double* lrnK);
2499 
2509 MIOPEN_EXPORT miopenStatus_t miopenLRNGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc,
2510  size_t* workSpaceSize);
2511 
2530 MIOPEN_EXPORT miopenStatus_t miopenLRNForward(miopenHandle_t handle,
2531  const miopenLRNDescriptor_t lrnDesc,
2532  const void* alpha,
2533  const miopenTensorDescriptor_t xDesc,
2534  const void* x,
2535  const void* beta,
2536  const miopenTensorDescriptor_t yDesc,
2537  void* y,
2538  bool do_backward,
2539  void* workSpace);
2540 
2558 MIOPEN_EXPORT miopenStatus_t miopenLRNBackward(miopenHandle_t handle,
2559  const miopenLRNDescriptor_t lrnDesc,
2560  const void* alpha,
2561  const miopenTensorDescriptor_t yDesc,
2562  const void* y,
2563  const miopenTensorDescriptor_t dyDesc,
2564  const void* dy,
2565  const miopenTensorDescriptor_t xDesc,
2566  const void* x,
2567  const void* beta,
2568  const miopenTensorDescriptor_t dxDesc,
2569  void* dx,
2570  const void* workSpace);
2571 
2577 MIOPEN_EXPORT miopenStatus_t miopenDestroyLRNDescriptor(miopenLRNDescriptor_t lrnDesc);
2578 
2580 // CLOSEOUT LRN DOXYGEN GROUP
2581 
2582 #ifdef MIOPEN_BETA_API
2583 // LayerNorm APIs
2608 MIOPEN_EXPORT miopenStatus_t miopenLayerNormForward(miopenHandle_t handle,
2609  miopenNormMode_t mode,
2610  const miopenTensorDescriptor_t xDesc,
2611  const void* x,
2612  const miopenTensorDescriptor_t weightDesc,
2613  const void* weight,
2614  const miopenTensorDescriptor_t biasDesc,
2615  const void* bias,
2616  const float epsilon,
2617  const int32_t normalized_dim,
2618  const miopenTensorDescriptor_t yDesc,
2619  void* y,
2620  const miopenTensorDescriptor_t meanDesc,
2621  void* mean,
2622  const miopenTensorDescriptor_t rstdDesc,
2623  void* rstd);
2624 
2626 // CLOSEOUT LAYERNORM DOXYGEN GROUP
2627 #endif
2628 
2629 #ifdef MIOPEN_BETA_API
2630 // Cat APIs
2646 MIOPEN_EXPORT miopenStatus_t miopenCatForward(miopenHandle_t handle,
2647  const int32_t xCount,
2648  const miopenTensorDescriptor_t* xDescs,
2649  const void* const* xs,
2650  const miopenTensorDescriptor_t yDesc,
2651  void* y,
2652  const int32_t dim);
2653 
2655 // CLOSEOUT CAT DOXYGEN GROUP
2656 #endif
2657 
2658 // Batch-Normalization APIs
2680 MIOPEN_EXPORT miopenStatus_t miopenDeriveBNTensorDescriptor(miopenTensorDescriptor_t derivedBnDesc,
2681  const miopenTensorDescriptor_t xDesc,
2682  miopenBatchNormMode_t bn_mode);
2683 
2722 MIOPEN_EXPORT miopenStatus_t
2724  miopenBatchNormMode_t bn_mode,
2725  void* alpha,
2726  void* beta,
2727  const miopenTensorDescriptor_t xDesc,
2728  const void* x,
2729  const miopenTensorDescriptor_t yDesc,
2730  void* y,
2731  const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc,
2732  void* bnScale,
2733  void* bnBias,
2734  double expAvgFactor,
2735  void* resultRunningMean,
2736  void* resultRunningVariance,
2737  double epsilon,
2738  void* resultSaveMean,
2739  void* resultSaveInvVariance);
2780 MIOPEN_EXPORT miopenStatus_t
2782  miopenBatchNormMode_t bn_mode,
2783  void* alpha,
2784  void* beta,
2785  const miopenTensorDescriptor_t xDesc,
2786  const void* x,
2787  const miopenTensorDescriptor_t yDesc,
2788  void* y,
2789  const miopenTensorDescriptor_t scaleDesc,
2790  const miopenTensorDescriptor_t biasVarDesc,
2791  const miopenTensorDescriptor_t savedMeanDesc,
2792  const miopenTensorDescriptor_t savedVarDesc,
2793  void* bnScale,
2794  void* bnBias,
2795  double expAvgFactor,
2796  void* resultRunningMean,
2797  void* resultRunningVariance,
2798  double epsilon,
2799  void* resultSaveMean,
2800  void* resultSaveInvVariance);
2801 
2831 MIOPEN_EXPORT miopenStatus_t
2833  miopenBatchNormMode_t bn_mode,
2834  void* alpha,
2835  void* beta,
2836  const miopenTensorDescriptor_t xDesc,
2837  const void* x,
2838  const miopenTensorDescriptor_t yDesc,
2839  void* y,
2840  const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc,
2841  void* bnScale,
2842  void* bnBias,
2843  void* estimatedMean,
2844  void* estimatedVariance,
2845  double epsilon);
2846 
2878 MIOPEN_EXPORT miopenStatus_t
2880  miopenBatchNormMode_t bn_mode,
2881  void* alpha,
2882  void* beta,
2883  const miopenTensorDescriptor_t xDesc,
2884  const void* x,
2885  const miopenTensorDescriptor_t yDesc,
2886  void* y,
2887  const miopenTensorDescriptor_t scaleDesc,
2888  const miopenTensorDescriptor_t biasDesc,
2889  const miopenTensorDescriptor_t estMeanDesc,
2890  const miopenTensorDescriptor_t estVarianceDesc,
2891  void* bnScale,
2892  void* bnBias,
2893  void* estimatedMean,
2894  void* estimatedVariance,
2895  double epsilon);
2896 
2931 MIOPEN_EXPORT miopenStatus_t
2932 miopenBatchNormalizationBackward(miopenHandle_t handle,
2933  miopenBatchNormMode_t bn_mode,
2934  const void* alphaDataDiff,
2935  const void* betaDataDiff,
2936  const void* alphaParamDiff,
2937  const void* betaParamDiff,
2938  const miopenTensorDescriptor_t xDesc,
2939  const void* x,
2940  const miopenTensorDescriptor_t dyDesc,
2941  const void* dy,
2942  const miopenTensorDescriptor_t dxDesc,
2943  void* dx,
2944  const miopenTensorDescriptor_t bnScaleBiasDiffDesc,
2945  const void* bnScale,
2946  void* resultBnScaleDiff,
2947  void* resultBnBiasDiff,
2948  double epsilon,
2949  const void* savedMean,
2950  const void* savedInvVariance);
2951 
2990 MIOPEN_EXPORT miopenStatus_t
2992  miopenBatchNormMode_t bn_mode,
2993  const void* alphaDataDiff,
2994  const void* betaDataDiff,
2995  const void* alphaParamDiff,
2996  const void* betaParamDiff,
2997  const miopenTensorDescriptor_t xDesc,
2998  const void* x,
2999  const miopenTensorDescriptor_t dyDesc,
3000  const void* dy,
3001  const miopenTensorDescriptor_t dxDesc,
3002  void* dx,
3003  const miopenTensorDescriptor_t scaleDesc,
3004  const miopenTensorDescriptor_t biasDesc,
3005  const miopenTensorDescriptor_t savedMeanDesc,
3006  const miopenTensorDescriptor_t savedVarDesc,
3007  const void* bnScale,
3008  void* resultBnScaleDiff,
3009  void* resultBnBiasDiff,
3010  double epsilon,
3011  const void* savedMean,
3012  const void* savedInvVariance);
3013 
3015 // CLOSEOUT BATCHNORM DOXYGEN GROUP
3016 
3017 // Activation APIs
3027 MIOPEN_EXPORT miopenStatus_t
3028 miopenCreateActivationDescriptor(miopenActivationDescriptor_t* activDesc);
3029 
3041 MIOPEN_EXPORT miopenStatus_t
3042 miopenSetActivationDescriptor(const miopenActivationDescriptor_t activDesc,
3044  double activAlpha,
3045  double activBeta,
3046  double activGamma);
3047 
3059 MIOPEN_EXPORT miopenStatus_t
3060 miopenGetActivationDescriptor(const miopenActivationDescriptor_t activDesc,
3061  miopenActivationMode_t* mode,
3062  double* activAlpha,
3063  double* activBeta,
3064  double* activGamma);
3065 
3078 MIOPEN_EXPORT miopenStatus_t miopenActivationForward(miopenHandle_t handle,
3079  const miopenActivationDescriptor_t activDesc,
3080  const void* alpha,
3081  const miopenTensorDescriptor_t xDesc,
3082  const void* x,
3083  const void* beta,
3084  const miopenTensorDescriptor_t yDesc,
3085  void* y);
3086 
3103 MIOPEN_EXPORT miopenStatus_t miopenActivationBackward(miopenHandle_t handle,
3104  const miopenActivationDescriptor_t activDesc,
3105  const void* alpha,
3106  const miopenTensorDescriptor_t yDesc,
3107  const void* y,
3108  const miopenTensorDescriptor_t dyDesc,
3109  const void* dy,
3110  const miopenTensorDescriptor_t xDesc,
3111  const void* x,
3112  const void* beta,
3113  const miopenTensorDescriptor_t dxDesc,
3114  void* dx);
3115 
3121 MIOPEN_EXPORT miopenStatus_t
3122 miopenDestroyActivationDescriptor(miopenActivationDescriptor_t activDesc);
3123 
3125 // CLOSEOUT ACTIVATION DOXYGEN GROUP
3126 
3127 #ifdef MIOPEN_BETA_API
3143 MIOPEN_EXPORT miopenStatus_t miopenGLUForward(miopenHandle_t handle,
3144  const miopenTensorDescriptor_t inputDesc,
3145  const void* input,
3146  const miopenTensorDescriptor_t outputDesc,
3147  void* output,
3148  const uint32_t dim);
3149 
3162 MIOPEN_EXPORT miopenStatus_t miopenGLUBackward(miopenHandle_t handle,
3163  const miopenTensorDescriptor_t inputDesc,
3164  const void* input,
3165  const miopenTensorDescriptor_t outputGradDesc,
3166  const void* outputGrad,
3167  const miopenTensorDescriptor_t inputGradDesc,
3168  void* inputGrad,
3169  const uint32_t dim);
3170 
3172 // CLOSEOUT ACTIVATION DOXYGEN GROUP
3173 #endif // MIOPEN_BETA_API
3174 
3175 // Softmax APIs
3193 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxForward(miopenHandle_t handle,
3194  const void* alpha,
3195  const miopenTensorDescriptor_t xDesc,
3196  const void* x,
3197  const void* beta,
3198  const miopenTensorDescriptor_t yDesc,
3199  void* y);
3200 
3216 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxBackward(miopenHandle_t handle,
3217  const void* alpha,
3218  const miopenTensorDescriptor_t yDesc,
3219  const void* y,
3220  const miopenTensorDescriptor_t dyDesc,
3221  const void* dy,
3222  const void* beta,
3223  const miopenTensorDescriptor_t dxDesc,
3224  void* dx);
3225 
3239 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxForward_V2(miopenHandle_t handle,
3240  const void* alpha,
3241  const miopenTensorDescriptor_t xDesc,
3242  const void* x,
3243  const void* beta,
3244  const miopenTensorDescriptor_t yDesc,
3245  void* y,
3246  miopenSoftmaxAlgorithm_t algorithm,
3247  miopenSoftmaxMode_t mode);
3248 
3264 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxBackward_V2(miopenHandle_t handle,
3265  const void* alpha,
3266  const miopenTensorDescriptor_t yDesc,
3267  const void* y,
3268  const miopenTensorDescriptor_t dyDesc,
3269  const void* dy,
3270  const void* beta,
3271  const miopenTensorDescriptor_t dxDesc,
3272  void* dx,
3273  miopenSoftmaxAlgorithm_t algorithm,
3274  miopenSoftmaxMode_t mode);
3275 
3277 // CLOSEOUT SOFTMAX DOXYGEN GROUP
3278 
3282 MIOPEN_DECLARE_OBJECT(miopenFusionPlanDescriptor);
3283 MIOPEN_DECLARE_OBJECT(miopenOperatorDescriptor);
3284 MIOPEN_DECLARE_OBJECT(miopenOperatorArgs);
3285 
3294 typedef enum
3295 {
3299 
3307 MIOPEN_EXPORT miopenStatus_t miopenCreateFusionPlan(miopenFusionPlanDescriptor_t* fusePlanDesc,
3308  const miopenFusionDirection_t fuseDirection,
3309  const miopenTensorDescriptor_t inputDesc);
3310 
3316 MIOPEN_EXPORT miopenStatus_t miopenDestroyFusionPlan(miopenFusionPlanDescriptor_t fusePlanDesc);
3317 
3324 MIOPEN_EXPORT miopenStatus_t miopenCompileFusionPlan(miopenHandle_t handle,
3325  miopenFusionPlanDescriptor_t fusePlanDesc);
3326 
3337 MIOPEN_EXPORT miopenStatus_t miopenFusionPlanGetOp(miopenFusionPlanDescriptor_t fusePlanDesc,
3338  const int op_idx,
3339  miopenFusionOpDescriptor_t* op);
3340 
3348 MIOPEN_EXPORT miopenStatus_t
3349 miopenFusionPlanGetWorkSpaceSize(miopenHandle_t handle,
3350  miopenFusionPlanDescriptor_t fusePlanDesc,
3351  size_t* workSpaceSize,
3353 
3371 MIOPEN_EXPORT miopenStatus_t
3372 miopenFusionPlanConvolutionGetAlgo(miopenFusionPlanDescriptor_t fusePlanDesc,
3373  const int requestAlgoCount,
3374  int* returnedAlgoCount,
3375  miopenConvFwdAlgorithm_t* returnedAlgos);
3376 
3387  miopenFusionPlanDescriptor_t fusePlanDesc, miopenConvFwdAlgorithm_t algo);
3388 
3397 MIOPEN_EXPORT miopenStatus_t miopenCreateOpConvForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3398  miopenFusionOpDescriptor_t* convOp,
3399  miopenConvolutionDescriptor_t convDesc,
3400  const miopenTensorDescriptor_t wDesc);
3401 
3402 //---
3403 
3404 // Activation forward create ops ---
3412 MIOPEN_EXPORT miopenStatus_t
3413 miopenCreateOpActivationForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3414  miopenFusionOpDescriptor_t* activFwdOp,
3415  miopenActivationMode_t mode);
3416 
3417 // Activation backward create ops ---
3425 MIOPEN_EXPORT miopenStatus_t
3426 miopenCreateOpActivationBackward(miopenFusionPlanDescriptor_t fusePlanDesc,
3427  miopenFusionOpDescriptor_t* activBwdOp,
3428  miopenActivationMode_t mode);
3429 
3430 // Bias create ops ---
3438 MIOPEN_EXPORT miopenStatus_t miopenCreateOpBiasForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3439  miopenFusionOpDescriptor_t* biasOp,
3440  const miopenTensorDescriptor_t bDesc);
3441 
3442 // Batch normalization create ops ---
3451 MIOPEN_EXPORT miopenStatus_t
3452 miopenCreateOpBatchNormInference(miopenFusionPlanDescriptor_t fusePlanDesc,
3453  miopenFusionOpDescriptor_t* bnOp,
3454  const miopenBatchNormMode_t bn_mode,
3455  const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc);
3456 
3466 MIOPEN_EXPORT miopenStatus_t
3467 miopenCreateOpBatchNormForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3468  miopenFusionOpDescriptor_t* bnFwdOp,
3469  const miopenBatchNormMode_t bn_mode,
3470  bool runningMeanVariance);
3471 
3479 MIOPEN_EXPORT miopenStatus_t
3480 miopenCreateOpBatchNormBackward(miopenFusionPlanDescriptor_t fusePlanDesc,
3481  miopenFusionOpDescriptor_t* bnBwdOp,
3482  const miopenBatchNormMode_t bn_mode);
3483 
3484 //---
3490 MIOPEN_EXPORT miopenStatus_t miopenCreateOperatorArgs(miopenOperatorArgs_t* args);
3491 
3497 MIOPEN_EXPORT miopenStatus_t miopenDestroyOperatorArgs(miopenOperatorArgs_t args);
3498 
3499 // Convolution set arguments ---
3509 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsConvForward(miopenOperatorArgs_t args,
3510  const miopenFusionOpDescriptor_t convOp,
3511  const void* alpha,
3512  const void* beta,
3513  const void* w);
3514 // Activation set arguments ---
3526 MIOPEN_EXPORT miopenStatus_t
3527 miopenSetOpArgsActivForward(miopenOperatorArgs_t args,
3528  const miopenFusionOpDescriptor_t activFwdOp,
3529  const void* alpha,
3530  const void* beta,
3531  double activAlpha,
3532  double activBeta,
3533  double activGamma);
3534 
3548 MIOPEN_EXPORT miopenStatus_t
3549 miopenSetOpArgsActivBackward(miopenOperatorArgs_t args,
3550  const miopenFusionOpDescriptor_t activBwdOp,
3551  const void* alpha,
3552  const void* beta,
3553  const void* y,
3554  const void* reserved,
3555  double activAlpha,
3556  double activBeta,
3557  double activGamma);
3558 
3559 // Batch Normalization set arguments ---
3573 MIOPEN_EXPORT miopenStatus_t
3574 miopenSetOpArgsBatchNormInference(miopenOperatorArgs_t args,
3575  const miopenFusionOpDescriptor_t bnOp,
3576  const void* alpha,
3577  const void* beta,
3578  const void* bnScale,
3579  const void* bnBias,
3580  const void* estimatedMean,
3581  const void* estimatedVariance,
3582  double epsilon);
3583 
3600 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsBatchNormForward(miopenOperatorArgs_t args,
3601  const miopenFusionOpDescriptor_t bnOp,
3602  const void* alpha,
3603  const void* beta,
3604  const void* bnScale,
3605  const void* bnBias,
3606  void* savedMean,
3607  void* savedInvVariance,
3608  void* runningMean,
3609  void* runningVariance,
3610  double expAvgFactor,
3611  double epsilon);
3612 
3628 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsBatchNormBackward(miopenOperatorArgs_t args,
3629  const miopenFusionOpDescriptor_t bnOp,
3630  const void* alpha,
3631  const void* beta,
3632  const void* x,
3633  const void* bnScale,
3634  const void* bnBias,
3635  void* resultBnScaleDiff,
3636  void* resultBnBiasDiff,
3637  const void* savedMean,
3638  const void* savedInvVariance);
3639 
3640 // Bias forward set arguments ---
3650 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsBiasForward(miopenOperatorArgs_t args,
3651  const miopenFusionOpDescriptor_t biasOp,
3652  const void* alpha,
3653  const void* beta,
3654  const void* bias);
3667 MIOPEN_EXPORT miopenStatus_t
3668 miopenExecuteFusionPlan(const miopenHandle_t handle,
3669  const miopenFusionPlanDescriptor_t fusePlanDesc,
3670  const miopenTensorDescriptor_t inputDesc,
3671  const void* input,
3672  const miopenTensorDescriptor_t outputDesc,
3673  void* output,
3674  miopenOperatorArgs_t args);
3675 
3699 MIOPEN_EXPORT miopenStatus_t
3701  const void* alpha1,
3702  const miopenTensorDescriptor_t xDesc,
3703  const void* x,
3704  const miopenTensorDescriptor_t wDesc,
3705  const void* w,
3706  const miopenConvolutionDescriptor_t convDesc,
3708  void* workspace,
3709  size_t workspaceSizeInBytes,
3710  const void* alpha2,
3711  const miopenTensorDescriptor_t zDesc,
3712  const void* z,
3713  const miopenTensorDescriptor_t biasDesc,
3714  const void* bias,
3715  const miopenActivationDescriptor_t activationDesc,
3716  const miopenTensorDescriptor_t yDesc,
3717  void* y);
3719 // CLOSEOUT FUSION DOXYGEN GROUP
3720 
3729 typedef enum
3730 {
3735 } miopenRNNMode_t;
3736 
3740 typedef enum
3741 {
3745 
3749 typedef enum
3750 {
3751  miopenRNNdefault = 0,
3754  1,
3755 } miopenRNNAlgo_t;
3756 
3760 typedef enum
3761 {
3765 
3769 typedef enum
3770 {
3774 
3778 typedef enum
3779 {
3782 
3786 typedef enum
3787 {
3791 
3795 typedef enum
3796 {
3800 
3804 typedef enum
3805 {
3811 
3818 MIOPEN_EXPORT miopenStatus_t miopenCreateRNNDescriptor(miopenRNNDescriptor_t* rnnDesc);
3819 
3832 MIOPEN_EXPORT miopenStatus_t miopenGetRNNDescriptor(miopenRNNDescriptor_t rnnDesc,
3833  miopenRNNMode_t* rnnMode,
3834  miopenRNNAlgo_t* algoMode,
3835  miopenRNNInputMode_t* inputMode,
3836  miopenRNNDirectionMode_t* dirMode,
3837  miopenRNNBiasMode_t* biasMode,
3838  int* hiddenSize,
3839  int* layer);
3840 
3857 MIOPEN_EXPORT miopenStatus_t miopenGetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc,
3858  int* hiddenSize,
3859  int* layer,
3860  miopenDropoutDescriptor_t* dropoutDesc,
3861  miopenRNNInputMode_t* inputMode,
3862  miopenRNNDirectionMode_t* dirMode,
3863  miopenRNNMode_t* rnnMode,
3864  miopenRNNBiasMode_t* biasMode,
3865  miopenRNNAlgo_t* algoMode,
3866  miopenDataType_t* dataType);
3867 
3873 MIOPEN_EXPORT miopenStatus_t miopenDestroyRNNDescriptor(miopenRNNDescriptor_t rnnDesc);
3874 
3890 MIOPEN_EXPORT miopenStatus_t miopenSetRNNDescriptor(miopenRNNDescriptor_t rnnDesc,
3891  const int hsize,
3892  const int nlayers,
3893  miopenRNNInputMode_t inMode,
3894  miopenRNNDirectionMode_t direction,
3895  miopenRNNMode_t rnnMode,
3896  miopenRNNBiasMode_t biasMode,
3897  miopenRNNAlgo_t algo,
3898  miopenDataType_t dataType);
3899 
3918 MIOPEN_EXPORT miopenStatus_t miopenSetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc,
3919  const int hsize,
3920  const int nlayers,
3921  miopenDropoutDescriptor_t dropoutDesc,
3922  miopenRNNInputMode_t inMode,
3923  miopenRNNDirectionMode_t direction,
3924  miopenRNNMode_t rnnMode,
3925  miopenRNNBiasMode_t biasMode,
3926  miopenRNNAlgo_t algo,
3927  miopenDataType_t dataType);
3928 
3943 MIOPEN_EXPORT miopenStatus_t
3944 miopenSetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc,
3945  miopenDataType_t dataType,
3946  miopenRNNBaseLayout_t layout,
3947  int maxSequenceLen,
3948  int batchSize,
3949  int vectorSize,
3950  const int* sequenceLenArray,
3951  void* paddingMarker);
3952 
3971 MIOPEN_EXPORT miopenStatus_t
3972 miopenGetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc,
3973  miopenDataType_t* dataType,
3974  miopenRNNBaseLayout_t* layout,
3975  int* maxSequenceLen,
3976  int* batchSize,
3977  int* vectorSize,
3978  int sequenceLenArrayLimit,
3979  int* sequenceLenArray,
3980  void* paddingMarker);
3981 
3998 MIOPEN_EXPORT miopenStatus_t miopenGetRNNWorkspaceSize(miopenHandle_t handle,
3999  const miopenRNNDescriptor_t rnnDesc,
4000  const int sequenceLen,
4001  const miopenTensorDescriptor_t* xDesc,
4002  size_t* numBytes);
4003 
4020 MIOPEN_EXPORT miopenStatus_t miopenGetRNNTrainingReserveSize(miopenHandle_t handle,
4021  miopenRNNDescriptor_t rnnDesc,
4022  const int sequenceLen,
4023  const miopenTensorDescriptor_t* xDesc,
4024  size_t* numBytes);
4025 
4042 MIOPEN_EXPORT miopenStatus_t miopenGetRNNTempSpaceSizes(miopenHandle_t handle,
4043  miopenRNNDescriptor_t rnnDesc,
4044  miopenSeqTensorDescriptor_t xDesc,
4045  miopenRNNFWDMode_t fwdMode,
4046  size_t* workSpaceSize,
4047  size_t* reserveSpaceSize);
4048 
4061 MIOPEN_EXPORT miopenStatus_t miopenGetRNNParamsSize(miopenHandle_t handle,
4062  miopenRNNDescriptor_t rnnDesc,
4063  miopenTensorDescriptor_t xDesc,
4064  size_t* numBytes,
4065  miopenDataType_t dtype);
4066 
4079 MIOPEN_EXPORT miopenStatus_t miopenGetRNNParamsDescriptor(miopenHandle_t handle,
4080  miopenRNNDescriptor_t rnnDesc,
4081  miopenTensorDescriptor_t xDesc,
4082  miopenTensorDescriptor_t wDesc,
4083  miopenDataType_t dtype);
4084 
4102 MIOPEN_EXPORT miopenStatus_t miopenGetRNNInputTensorSize(miopenHandle_t handle,
4103  miopenRNNDescriptor_t rnnDesc,
4104  const int seqLen,
4105  miopenTensorDescriptor_t* xDesc,
4106  size_t* numBytes);
4107 
4120 MIOPEN_EXPORT miopenStatus_t miopenGetRNNHiddenTensorSize(miopenHandle_t handle,
4121  miopenRNNDescriptor_t rnnDesc,
4122  const int seqLen,
4123  miopenTensorDescriptor_t* xDesc,
4124  size_t* numBytes);
4125 
4166 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerParamSize(miopenHandle_t handle,
4167  miopenRNNDescriptor_t rnnDesc,
4168  const int layer,
4169  miopenTensorDescriptor_t xDesc,
4170  const int paramID,
4171  size_t* numBytes);
4172 
4210 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerBiasSize(miopenHandle_t handle,
4211  miopenRNNDescriptor_t rnnDesc,
4212  const int layer,
4213  const int biasID,
4214  size_t* numBytes);
4215 
4274 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerParam(miopenHandle_t handle,
4275  miopenRNNDescriptor_t rnnDesc,
4276  const int layer,
4277  miopenTensorDescriptor_t xDesc,
4278  miopenTensorDescriptor_t wDesc,
4279  const void* w,
4280  const int paramID,
4281  miopenTensorDescriptor_t paramDesc,
4282  void* layerParam);
4283 
4341 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerBias(miopenHandle_t handle,
4342  miopenRNNDescriptor_t rnnDesc,
4343  const int layer,
4344  miopenTensorDescriptor_t xDesc,
4345  miopenTensorDescriptor_t wDesc,
4346  const void* w,
4347  const int biasID,
4348  miopenTensorDescriptor_t biasDesc,
4349  void* layerBias);
4350 
4405 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerParamOffset(miopenRNNDescriptor_t rnnDesc,
4406  const int layer,
4407  miopenTensorDescriptor_t xDesc,
4408  const int paramID,
4409  miopenTensorDescriptor_t paramDesc,
4410  size_t* layerParamOffset);
4411 
4462 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerBiasOffset(miopenRNNDescriptor_t rnnDesc,
4463  const int layer,
4464  miopenTensorDescriptor_t xDesc,
4465  const int biasID,
4466  miopenTensorDescriptor_t biasDesc,
4467  size_t* layerBiasOffset);
4468 
4521 MIOPEN_EXPORT miopenStatus_t miopenSetRNNLayerParam(miopenHandle_t handle,
4522  miopenRNNDescriptor_t rnnDesc,
4523  const int layer,
4524  miopenTensorDescriptor_t xDesc,
4525  miopenTensorDescriptor_t wDesc,
4526  void* w,
4527  const int paramID,
4528  miopenTensorDescriptor_t paramDesc,
4529  const void* layerParam);
4530 
4581 MIOPEN_EXPORT miopenStatus_t miopenSetRNNLayerBias(miopenHandle_t handle,
4582  miopenRNNDescriptor_t rnnDesc,
4583  const int layer,
4584  miopenTensorDescriptor_t xDesc,
4585  miopenTensorDescriptor_t wDesc,
4586  void* w,
4587  const int biasID,
4588  miopenTensorDescriptor_t biasDesc,
4589  const void* layerBias);
4590 
4602 MIOPEN_EXPORT miopenStatus_t miopenSetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc,
4603  miopenRNNPaddingMode_t paddingMode);
4604 
4612 MIOPEN_EXPORT miopenStatus_t miopenGetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc,
4613  miopenRNNPaddingMode_t* paddingMode);
4614 
4665 MIOPEN_EXPORT miopenStatus_t miopenRNNForward(miopenHandle_t handle,
4666  const miopenRNNDescriptor_t rnnDesc,
4667  miopenRNNFWDMode_t fwdMode,
4668  const miopenSeqTensorDescriptor_t xDesc,
4669  const void* x,
4670  const miopenTensorDescriptor_t hDesc,
4671  const void* hx,
4672  void* hy,
4673  const miopenTensorDescriptor_t cDesc,
4674  const void* cx,
4675  void* cy,
4676  const miopenSeqTensorDescriptor_t yDesc,
4677  void* y,
4678  const void* w,
4679  size_t weightSpaceSize,
4680  void* workSpace,
4681  size_t workSpaceNumBytes,
4682  void* reserveSpace,
4683  size_t reserveSpaceNumBytes);
4684 
4734 MIOPEN_EXPORT miopenStatus_t miopenRNNBackwardSeqData(miopenHandle_t handle,
4735  const miopenRNNDescriptor_t rnnDesc,
4736  const miopenSeqTensorDescriptor_t yDesc,
4737  const void* y,
4738  const void* dy,
4739  const miopenTensorDescriptor_t hDesc,
4740  const void* hx,
4741  const void* dhy,
4742  void* dhx,
4743  const miopenTensorDescriptor_t cDesc,
4744  const void* cx,
4745  const void* dcy,
4746  void* dcx,
4747  const miopenSeqTensorDescriptor_t xDesc,
4748  void* dx,
4749  const void* w,
4750  size_t weightSpaceSize,
4751  void* workSpace,
4752  size_t workSpaceNumBytes,
4753  void* reserveSpace,
4754  size_t reserveSpaceNumBytes);
4755 
4789 MIOPEN_EXPORT miopenStatus_t
4791  const miopenRNNDescriptor_t rnnDesc,
4792  const miopenSeqTensorDescriptor_t xDesc,
4793  const void* x,
4794  const miopenTensorDescriptor_t hDesc,
4795  const void* hx,
4796  const miopenSeqTensorDescriptor_t yDesc,
4797  const void* y,
4798  void* dw,
4799  size_t weightSpaceSize,
4800  void* workSpace,
4801  size_t workSpaceNumBytes,
4802  const void* reserveSpace,
4803  size_t reserveSpaceNumBytes);
4804 
4862 MIOPEN_EXPORT miopenStatus_t miopenRNNForwardTraining(miopenHandle_t handle,
4863  const miopenRNNDescriptor_t rnnDesc,
4864  const int sequenceLen,
4865  const miopenTensorDescriptor_t* xDesc,
4866  const void* x,
4867  const miopenTensorDescriptor_t hxDesc,
4868  const void* hx,
4869  const miopenTensorDescriptor_t cxDesc,
4870  const void* cx,
4871  const miopenTensorDescriptor_t wDesc,
4872  const void* w,
4873  const miopenTensorDescriptor_t* yDesc,
4874  void* y,
4875  const miopenTensorDescriptor_t hyDesc,
4876  void* hy,
4877  const miopenTensorDescriptor_t cyDesc,
4878  void* cy,
4879  void* workSpace,
4880  size_t workSpaceNumBytes,
4881  void* reserveSpace,
4882  size_t reserveSpaceNumBytes);
4883 
4956 MIOPEN_EXPORT miopenStatus_t miopenRNNBackwardData(miopenHandle_t handle,
4957  const miopenRNNDescriptor_t rnnDesc,
4958  const int sequenceLen,
4959  const miopenTensorDescriptor_t* yDesc,
4960  const void* y,
4961  const miopenTensorDescriptor_t* dyDesc,
4962  const void* dy,
4963  const miopenTensorDescriptor_t dhyDesc,
4964  const void* dhy,
4965  const miopenTensorDescriptor_t dcyDesc,
4966  const void* dcy,
4967  const miopenTensorDescriptor_t wDesc,
4968  const void* w,
4969  const miopenTensorDescriptor_t hxDesc,
4970  const void* hx,
4971  const miopenTensorDescriptor_t cxDesc,
4972  const void* cx,
4973  const miopenTensorDescriptor_t* dxDesc,
4974  void* dx,
4975  const miopenTensorDescriptor_t dhxDesc,
4976  void* dhx,
4977  const miopenTensorDescriptor_t dcxDesc,
4978  void* dcx,
4979  void* workSpace,
4980  size_t workSpaceNumBytes,
4981  void* reserveSpace,
4982  size_t reserveSpaceNumBytes);
4983 
5020 MIOPEN_EXPORT miopenStatus_t miopenRNNBackwardWeights(miopenHandle_t handle,
5021  const miopenRNNDescriptor_t rnnDesc,
5022  const int sequenceLen,
5023  const miopenTensorDescriptor_t* xDesc,
5024  const void* x,
5025  const miopenTensorDescriptor_t hxDesc,
5026  const void* hx,
5027  const miopenTensorDescriptor_t* yDesc,
5028  const void* y,
5029  const miopenTensorDescriptor_t dwDesc,
5030  void* dw,
5031  void* workSpace,
5032  size_t workSpaceNumBytes,
5033  const void* reserveSpace,
5034  size_t reserveSpaceNumBytes);
5035 
5091 MIOPEN_EXPORT miopenStatus_t miopenRNNForwardInference(miopenHandle_t handle,
5092  miopenRNNDescriptor_t rnnDesc,
5093  const int sequenceLen,
5094  const miopenTensorDescriptor_t* xDesc,
5095  const void* x,
5096  const miopenTensorDescriptor_t hxDesc,
5097  const void* hx,
5098  const miopenTensorDescriptor_t cxDesc,
5099  const void* cx,
5100  const miopenTensorDescriptor_t wDesc,
5101  const void* w,
5102  const miopenTensorDescriptor_t* yDesc,
5103  void* y,
5104  const miopenTensorDescriptor_t hyDesc,
5105  void* hy,
5106  const miopenTensorDescriptor_t cyDesc,
5107  void* cy,
5108  void* workSpace,
5109  size_t workSpaceNumBytes);
5110 
5112 // CLOSEOUT RNN DOXYGEN GROUP
5113 
5122 typedef enum
5123 {
5126 
5133 MIOPEN_EXPORT miopenStatus_t miopenCreateCTCLossDescriptor(miopenCTCLossDescriptor_t* ctcLossDesc);
5134 
5144 MIOPEN_EXPORT miopenStatus_t miopenGetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc,
5145  miopenDataType_t* dataType,
5146  int* blank_label_id,
5147  bool* apply_softmax_layer);
5148 
5154 MIOPEN_EXPORT miopenStatus_t miopenDestroyCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc);
5155 
5165 MIOPEN_EXPORT miopenStatus_t miopenSetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc,
5166  miopenDataType_t dataType,
5167  const int blank_label_id,
5168  bool apply_softmax_layer);
5169 
5186 MIOPEN_EXPORT miopenStatus_t
5187 miopenGetCTCLossWorkspaceSize(miopenHandle_t handle,
5188  const miopenTensorDescriptor_t probsDesc,
5189  const miopenTensorDescriptor_t gradientsDesc,
5190  const int* labels,
5191  const int* labelLengths,
5192  const int* inputLengths,
5193  miopenCTCLossAlgo_t algo,
5194  const miopenCTCLossDescriptor_t ctcLossDesc,
5195  size_t* workSpaceSize);
5196 
5216 MIOPEN_EXPORT miopenStatus_t miopenCTCLoss(miopenHandle_t handle,
5217  const miopenTensorDescriptor_t probsDesc,
5218  const void* probs,
5219  const int* labels,
5220  const int* labelLengths,
5221  const int* inputLengths,
5222  void* losses,
5223  const miopenTensorDescriptor_t gradientsDesc,
5224  void* gradients,
5225  miopenCTCLossAlgo_t algo,
5226  const miopenCTCLossDescriptor_t ctcLossDesc,
5227  void* workSpace,
5228  size_t workSpaceSize);
5229 
5231 // CLOSEOUT LossFunction DOXYGEN GROUP
5232 
5233 // Dropout APIs
5242 typedef enum
5243 {
5245 } miopenRNGType_t;
5246 
5252 MIOPEN_EXPORT miopenStatus_t miopenCreateDropoutDescriptor(miopenDropoutDescriptor_t* dropoutDesc);
5253 
5259 MIOPEN_EXPORT miopenStatus_t miopenDestroyDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc);
5260 
5269 MIOPEN_EXPORT miopenStatus_t miopenDropoutGetReserveSpaceSize(const miopenTensorDescriptor_t xDesc,
5270  size_t* reserveSpaceSizeInBytes);
5271 
5280 MIOPEN_EXPORT miopenStatus_t miopenDropoutGetStatesSize(miopenHandle_t handle,
5281  size_t* stateSizeInBytes);
5282 
5299 MIOPEN_EXPORT miopenStatus_t miopenGetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5300  miopenHandle_t handle,
5301  float* dropout,
5302  void** states,
5303  unsigned long long* seed,
5304  bool* use_mask,
5305  bool* state_evo,
5306  miopenRNGType_t* rng_mode);
5307 
5330 MIOPEN_EXPORT miopenStatus_t miopenRestoreDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5331  miopenHandle_t handle,
5332  float dropout,
5333  void* states,
5334  size_t stateSizeInBytes,
5335  unsigned long long seed,
5336  bool use_mask,
5337  bool state_evo,
5338  miopenRNGType_t rng_mode);
5339 
5359 MIOPEN_EXPORT miopenStatus_t miopenSetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5360  miopenHandle_t handle,
5361  float dropout,
5362  void* states,
5363  size_t stateSizeInBytes,
5364  unsigned long long seed,
5365  bool use_mask,
5366  bool state_evo,
5367  miopenRNGType_t rng_mode);
5368 
5386 MIOPEN_EXPORT miopenStatus_t miopenDropoutForward(miopenHandle_t handle,
5387  const miopenDropoutDescriptor_t dropoutDesc,
5388  const miopenTensorDescriptor_t noise_shape,
5389  const miopenTensorDescriptor_t xDesc,
5390  const void* x,
5391  const miopenTensorDescriptor_t yDesc,
5392  void* y,
5393  void* reserveSpace,
5394  size_t reserveSpaceSizeInBytes);
5395 
5413 MIOPEN_EXPORT miopenStatus_t miopenDropoutBackward(miopenHandle_t handle,
5414  const miopenDropoutDescriptor_t dropoutDesc,
5415  const miopenTensorDescriptor_t noise_shape,
5416  const miopenTensorDescriptor_t dyDesc,
5417  const void* dy,
5418  const miopenTensorDescriptor_t dxDesc,
5419  void* dx,
5420  void* reserveSpace,
5421  size_t reserveSpaceSizeInBytes);
5422 
5424 // CLOSEOUT DROPOUT DOXYGEN GROUP
5425 
5426 // TensorReduce APIs
5437 MIOPEN_EXPORT miopenStatus_t
5438 miopenCreateReduceTensorDescriptor(miopenReduceTensorDescriptor_t* reduceTensorDesc);
5439 
5445 MIOPEN_EXPORT miopenStatus_t
5446 miopenDestroyReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc);
5447 
5460 MIOPEN_EXPORT miopenStatus_t
5461 miopenSetReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc,
5462  miopenReduceTensorOp_t reduceTensorOp,
5463  miopenDataType_t reduceTensorCompType,
5464  miopenNanPropagation_t reduceTensorNanOpt,
5465  miopenReduceTensorIndices_t reduceTensorIndices,
5466  miopenIndicesType_t reduceTensorIndicesType);
5467 
5483 MIOPEN_EXPORT miopenStatus_t
5484 miopenGetReduceTensorDescriptor(const miopenReduceTensorDescriptor_t reduceTensorDesc,
5485  miopenReduceTensorOp_t* reduceTensorOp,
5486  miopenDataType_t* reduceTensorCompType,
5487  miopenNanPropagation_t* reduceTensorNanOpt,
5488  miopenReduceTensorIndices_t* reduceTensorIndices,
5489  miopenIndicesType_t* reduceTensorIndicesType);
5490 
5500 MIOPEN_EXPORT miopenStatus_t
5501 miopenGetReductionIndicesSize(miopenHandle_t handle,
5502  const miopenReduceTensorDescriptor_t reduceTensorDesc,
5503  const miopenTensorDescriptor_t aDesc,
5504  const miopenTensorDescriptor_t cDesc,
5505  size_t* sizeInBytes);
5506 
5516 MIOPEN_EXPORT miopenStatus_t
5517 miopenGetReductionWorkspaceSize(miopenHandle_t handle,
5518  const miopenReduceTensorDescriptor_t reduceTensorDesc,
5519  const miopenTensorDescriptor_t aDesc,
5520  const miopenTensorDescriptor_t cDesc,
5521  size_t* sizeInBytes);
5522 
5546 MIOPEN_EXPORT miopenStatus_t
5547 miopenReduceTensor(miopenHandle_t handle,
5548  const miopenReduceTensorDescriptor_t reduceTensorDesc,
5549  void* indices,
5550  size_t indicesSizeInBytes,
5551  void* workspace,
5552  size_t workspaceSizeInBytes,
5553  const void* alpha,
5554  const miopenTensorDescriptor_t aDesc,
5555  const void* A,
5556  const void* beta,
5557  const miopenTensorDescriptor_t cDesc,
5558  void* C);
5559 
5561 // CLOSEOUT TensorReduce DOXYGEN GROUP
5562 
5563 // Find 2.0 API
5574 MIOPEN_DECLARE_OBJECT(miopenProblem);
5575 
5579 typedef enum
5580 {
5584 #ifdef MIOPEN_BETA_API
5586 #endif
5588 
5592 typedef enum
5593 {
5598 
5632 
5633 #ifdef MIOPEN_BETA_API
5659 #endif
5660 
5662 
5664 #ifdef MIOPEN_BETA_API
5667 #endif
5669 
5673 typedef enum
5674 {
5678 
5686 MIOPEN_EXPORT miopenStatus_t miopenCreateConvProblem(miopenProblem_t* problem,
5687  miopenConvolutionDescriptor_t operatorDesc,
5688  miopenProblemDirection_t direction);
5689 
5701 typedef enum
5702 {
5705 } miopenMhaMask_t;
5706 
5707 MIOPEN_EXPORT miopenStatus_t miopenCreateMhaProblem(miopenProblem_t* problem,
5708  miopenMhaDescriptor_t operatorDesc,
5709  miopenProblemDirection_t direction);
5710 
5717 MIOPEN_EXPORT miopenStatus_t miopenCreateMhaDescriptor(miopenMhaDescriptor_t* mhaDesc);
5718 
5728 MIOPEN_EXPORT miopenStatus_t miopenSetMhaDescriptor(miopenMhaDescriptor_t mhaDesc, float scale);
5729 
5739 MIOPEN_EXPORT miopenStatus_t miopenGetMhaDescriptor(miopenMhaDescriptor_t mhaDesc, float* scale);
5740 
5747 MIOPEN_EXPORT miopenStatus_t miopenCreateSoftmaxDescriptor(miopenSoftmaxDescriptor_t* softmaxDesc);
5748 
5760 MIOPEN_EXPORT miopenStatus_t miopenSetSoftmaxDescriptor(miopenSoftmaxDescriptor_t softmaxDesc,
5761  float alpha,
5762  float beta,
5763  miopenSoftmaxAlgorithm_t algorithm,
5764  miopenSoftmaxMode_t mode);
5765 
5777 MIOPEN_EXPORT miopenStatus_t miopenGetSoftmaxDescriptor(const miopenSoftmaxDescriptor_t softmaxDesc,
5778  float* alpha,
5779  float* beta,
5780  miopenSoftmaxAlgorithm_t* algorithm,
5781  miopenSoftmaxMode_t* mode);
5782 
5788 MIOPEN_EXPORT miopenStatus_t miopenDestroyProblem(miopenProblem_t problem);
5789 
5797 MIOPEN_EXPORT miopenStatus_t
5798 miopenSetProblemTensorDescriptor(miopenProblem_t problem,
5800  const miopenTensorDescriptor_t descriptor);
5801 
5804 MIOPEN_DECLARE_OBJECT(miopenFindOptions);
5805 
5811 MIOPEN_EXPORT miopenStatus_t miopenCreateFindOptions(miopenFindOptions_t* options);
5812 
5818 MIOPEN_EXPORT miopenStatus_t miopenDestroyFindOptions(miopenFindOptions_t options);
5819 
5826 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionTuning(miopenFindOptions_t options, int value);
5827 
5834 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionResultsOrder(miopenFindOptions_t options,
5835  miopenFindResultsOrder_t value);
5836 
5844 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionWorkspaceLimit(miopenFindOptions_t options,
5845  size_t value);
5846 
5854 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionPreallocatedWorkspace(miopenFindOptions_t options,
5855  void* buffer,
5856  size_t size);
5857 
5866 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionPreallocatedTensor(miopenFindOptions_t options,
5868  void* buffer);
5869 
5877 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionAttachBinaries(miopenFindOptions_t options,
5878  unsigned attach);
5879 
5882 MIOPEN_DECLARE_OBJECT(miopenSolution);
5883 
5895 MIOPEN_EXPORT miopenStatus_t miopenFindSolutions(miopenHandle_t handle,
5896  miopenProblem_t problem,
5897  miopenFindOptions_t options,
5898  miopenSolution_t* solutions,
5899  size_t* numSolutions,
5900  size_t maxSolutions);
5901 
5905 {
5906  /* @brief Identifier of the tensor argument.
5907  */
5909  /* @brief Tensor descriptor to override the value stored in the solution.
5910  *
5911  * Some solvers may support overriding input and output tensor descriptors, but right now there
5912  * is no way to tell from the API. Intended for the future use.
5913  */
5914  miopenTensorDescriptor_t* descriptor;
5915  /* @brief Pointer to the device memory buffer to use for the operation or to the host memory if
5916  * the value is scalar.
5917  */
5918  void* buffer;
5919 };
5920 
5932 MIOPEN_EXPORT miopenStatus_t miopenRunSolution(miopenHandle_t handle,
5933  miopenSolution_t solution,
5934  size_t nInputs,
5935  const miopenTensorArgument_t* tensors,
5936  void* workspace,
5937  size_t workspaceSize);
5938 
5944 MIOPEN_EXPORT miopenStatus_t miopenDestroySolution(miopenSolution_t solution);
5945 
5953 MIOPEN_EXPORT miopenStatus_t miopenLoadSolution(miopenSolution_t* solution,
5954  const char* data,
5955  size_t size);
5956 
5963 MIOPEN_EXPORT miopenStatus_t miopenSaveSolution(miopenSolution_t solution, char* data);
5964 
5971 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionSize(miopenSolution_t solution, size_t* size);
5972 
5979 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionWorkspaceSize(miopenSolution_t solution,
5980  size_t* workspaceSize);
5981 
5988 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionTime(miopenSolution_t solution, float* time);
5989 
5996 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionSolverId(miopenSolution_t solution,
5997  uint64_t* solverId);
5998 
6005 MIOPEN_EXPORT miopenStatus_t miopenGetSolverIdConvAlgorithm(uint64_t solverId,
6006  miopenConvAlgorithm_t* result);
6007 
6008 #ifdef MIOPEN_BETA_API
6009 
6018 MIOPEN_EXPORT miopenStatus_t
6019 miopenCreateActivationProblem(miopenProblem_t* problem,
6020  miopenActivationDescriptor_t operatorDesc,
6021  miopenProblemDirection_t direction);
6022 
6031 MIOPEN_EXPORT miopenStatus_t miopenCreateBatchnormProblem(miopenProblem_t* problem,
6032  miopenBatchNormMode_t mode,
6033  bool runningMeanVariance,
6034  miopenProblemDirection_t direction);
6035 
6055 MIOPEN_EXPORT miopenStatus_t miopenFuseProblems(miopenProblem_t problem1, miopenProblem_t problem2);
6056 
6064 MIOPEN_EXPORT miopenStatus_t miopenCreateBiasProblem(miopenProblem_t* problem,
6065  miopenProblemDirection_t direction);
6066 
6075 MIOPEN_EXPORT miopenStatus_t miopenCreateSoftmaxProblem(miopenProblem_t* problem,
6076  miopenSoftmaxDescriptor_t operatorDesc,
6077  miopenProblemDirection_t direction);
6078 
6079 #endif
6080 
6082 // CLOSEOUT find2 DOXYGEN GROUP
6083 
6084 #ifdef MIOPEN_BETA_API
6085 
6090 typedef enum
6091 {
6094  1,
6096 
6097 // ReduceCalculation APIs
6106 typedef enum
6107 {
6109  1,
6111  2,
6113 
6123 MIOPEN_EXPORT miopenStatus_t
6125  const miopenTensorDescriptor_t xDesc,
6126  const int32_t dim,
6127  const miopenReduceCalculationOp_t reduceCalculationOp,
6128  const miopenTensorDescriptor_t reduceDesc,
6129  size_t* sizeInBytes);
6130 
6144 MIOPEN_EXPORT miopenStatus_t
6145 miopenReduceCalculationForward(miopenHandle_t handle,
6147  void* workspace,
6148  size_t workspaceSizeInBytes,
6149  const miopenTensorDescriptor_t xDesc,
6150  const void* x,
6151  const int32_t dim,
6152  const miopenReduceCalculationOp_t reduceCalculationOp,
6153  const miopenTensorDescriptor_t reduceDesc,
6154  void* y);
6155 
6157 // CLOSEOUT REDUCE CALCULATION DOXYGEN GROUP
6158 #endif // MIOPEN_BETA_API
6159 
6160 #ifdef MIOPEN_BETA_API
6161 
6166 typedef enum
6167 {
6169  1,
6171  2,
6173  3,
6175  4,
6177 
6178 // ReduceExtreme APIs
6198 MIOPEN_EXPORT miopenStatus_t
6199 miopenReduceExtremeForward(miopenHandle_t handle,
6200  const miopenTensorDescriptor_t xDesc,
6201  const void* x,
6202  const int32_t dim,
6203  const miopenReduceExtremeOp_t reduceExtremeOp,
6204  const miopenTensorDescriptor_t yDesc,
6205  void* y,
6206  const miopenTensorDescriptor_t indiceDesc,
6207  void* indice);
6208 
6210 // CLOSEOUT REDUCEEXTREME DOXYGEN GROUP
6211 #endif // MIOPEN_BETA_API
6212 
6213 #ifdef MIOPEN_BETA_API
6214 // GroupNorm APIs
6239 MIOPEN_EXPORT miopenStatus_t miopenGroupNormForward(miopenHandle_t handle,
6240  miopenNormMode_t mode,
6241  const miopenTensorDescriptor_t xDesc,
6242  const void* x,
6243  const miopenTensorDescriptor_t weightDesc,
6244  const void* weight,
6245  const miopenTensorDescriptor_t biasDesc,
6246  const void* bias,
6247  const uint64_t num_groups,
6248  const float epsilon,
6249  const miopenTensorDescriptor_t yDesc,
6250  void* y,
6251  const miopenTensorDescriptor_t meanDesc,
6252  void* mean,
6253  const miopenTensorDescriptor_t rstdDesc,
6254  void* rstd);
6255 
6257 // CLOSEOUT groupnorm DOXYGEN GROUP
6258 #endif // MIOPEN_BETA_API
6259 
6260 #ifdef MIOPEN_BETA_API
6261 // LayerNorm APIs
6288 MIOPEN_EXPORT miopenStatus_t miopenAddLayerNormForward(miopenHandle_t handle,
6289  miopenNormMode_t mode,
6290  const miopenTensorDescriptor_t xDesc,
6291  const void* x,
6292  const miopenTensorDescriptor_t x2Desc,
6293  const void* x2,
6294  const miopenTensorDescriptor_t weightDesc,
6295  const void* weight,
6296  const miopenTensorDescriptor_t biasDesc,
6297  const void* bias,
6298  const float epsilon,
6299  const int32_t normalized_dim,
6300  const miopenTensorDescriptor_t yDesc,
6301  void* y,
6302  const miopenTensorDescriptor_t meanDesc,
6303  void* mean,
6304  const miopenTensorDescriptor_t rstdDesc,
6305  void* rstd);
6306 
6308 // CLOSEOUT LAYERNORM DOXYGEN GROUP
6309 #endif // MIOPEN_BETA_API
6310 
6311 #ifdef MIOPEN_BETA_API
6312 // LayerNorm APIs
6332 MIOPEN_EXPORT miopenStatus_t miopenT5LayerNormForward(miopenHandle_t handle,
6333  miopenNormMode_t mode,
6334  const miopenTensorDescriptor_t xDesc,
6335  const void* x,
6336  const miopenTensorDescriptor_t weightDesc,
6337  const void* weight,
6338  const float epsilon,
6339  const miopenTensorDescriptor_t yDesc,
6340  void* y,
6341  const miopenTensorDescriptor_t rstdDesc,
6342  void* rstd);
6343 
6358 MIOPEN_EXPORT miopenStatus_t
6360  miopenNormMode_t mode,
6361  const miopenTensorDescriptor_t dyDesc,
6362  const miopenTensorDescriptor_t xDesc,
6363  const miopenTensorDescriptor_t weightDesc,
6364  const miopenTensorDescriptor_t rstdDesc,
6365  const miopenTensorDescriptor_t dxDesc,
6366  const miopenTensorDescriptor_t dwDesc,
6367  size_t* sizeInBytes);
6368 
6389 MIOPEN_EXPORT miopenStatus_t miopenT5LayerNormBackward(miopenHandle_t handle,
6390  miopenNormMode_t mode,
6391  void* workspace,
6392  size_t workspaceSizeInBytes,
6393  const miopenTensorDescriptor_t dyDesc,
6394  const void* dy,
6395  const miopenTensorDescriptor_t xDesc,
6396  const void* x,
6397  const miopenTensorDescriptor_t weightDesc,
6398  const void* weight,
6399  const miopenTensorDescriptor_t rstdDesc,
6400  const void* rstd,
6401  const miopenTensorDescriptor_t dxDesc,
6402  void* dx,
6403  const miopenTensorDescriptor_t dwDesc,
6404  void* dw);
6406 // CLOSEOUT LAYERNORM DOXYGEN GROUP
6407 #endif // MIOPEN_BETA_API
6408 
6409 #ifdef MIOPEN_BETA_API
6410 // Graph API
6422 typedef enum
6423 {
6457 
6465 typedef enum
6466 {
6477 
6485 
6490 
6494 
6501 
6506 
6509 
6537 
6543 
6561 
6565 
6577 
6582 
6585 
6590 
6598 
6601 
6610 
6613 
6617 
6629 
6639 
6646 
6655 
6660 
6666 
6682 
6694 
6697 
6704 
6709 
6711 
6719 typedef enum
6720 {
6752 
6758 typedef enum
6759 {
6762 
6766 
6769 
6772 
6775 
6779 
6782 
6785 
6788 
6791 
6794 
6797 
6800 
6803 
6806 
6809 
6812 
6815 
6818 
6821 
6824 
6829 
6832 
6835 
6838 
6841 
6845 
6848 
6851 
6856 
6860 
6863 
6866 
6870 
6874 
6877 
6880 
6887 
6890 
6893 
6896 
6900 
6903 
6907 
6910 
6913 
6916 
6919 
6923 
6928 
6934 typedef enum
6935 {
6940 
6941 typedef enum
6942 {
6943  /* IDENTITY alpha = 1.0 and beta = 0.0 */
6944  /* SCALE alpha = 4.2 and beta = 0.0 */
6945  /* BILINEAR alpha = 3.2 and beta = 1.1 */
6946  /* ERROR_STATE alpha = 0.0 and beta = 3.1 */
6947 
6948  DEFAULT = 0, /* alpha = 1.0 and beta = 0.0.*/
6949  SCALE = 1, /* alpha with some value and beta 0.0*/
6950  BILINEAR = 2, /* both alpha and beta with some value*/
6951  ERROR_STATE = 3, /* alpha 0.0 and beta with some value, this should not occur.
6952  But used to check for errors.*/
6958 typedef enum
6959 {
6966 
6979 MIOPEN_DECLARE_OBJECT(miopenBackendDescriptor)
6980 
6981 
6995  miopenBackendDescriptorType_t descriptorType, miopenBackendDescriptor_t* descriptor);
6996 
7026 MIOPEN_EXPORT miopenStatus_t miopenBackendSetAttribute(miopenBackendDescriptor_t descriptor,
7027  miopenBackendAttributeName_t attributeName,
7028  miopenBackendAttributeType_t attributeType,
7029  int64_t elementCount,
7030  void* arrayOfElements);
7031 
7048 MIOPEN_EXPORT miopenStatus_t miopenBackendFinalize(miopenBackendDescriptor_t descriptor);
7049 
7084 MIOPEN_EXPORT miopenStatus_t miopenBackendGetAttribute(miopenBackendDescriptor_t descriptor,
7085  miopenBackendAttributeName_t attributeName,
7086  miopenBackendAttributeType_t attributeType,
7087  int64_t requestedElementCount,
7088  int64_t* elementCount,
7089  void* arrayOfElements);
7090 
7110 MIOPEN_EXPORT miopenStatus_t miopenBackendExecute(miopenHandle_t handle,
7111  miopenBackendDescriptor_t executionPlan,
7112  miopenBackendDescriptor_t variantPack);
7113 
7130 MIOPEN_EXPORT miopenStatus_t miopenBackendDestroyDescriptor(miopenBackendDescriptor_t descriptor);
7131 
7149 MIOPEN_EXPORT miopenStatus_t miopenBackendInitialize(miopenBackendDescriptor_t descriptor,
7150  miopenBackendDescriptorType_t descriptorType,
7151  size_t sizeInBytes);
7152 
7154 // CLOSEOUT BackendAPI DOXYGEN GROUP
7155 #endif // MIOPEN_BETA_API
7156 
7157 #ifdef MIOPEN_BETA_API
7158 // FusedAdam APIs
7301 MIOPEN_EXPORT miopenStatus_t miopenFusedAdam(miopenHandle_t handle,
7302  const miopenTensorDescriptor_t paramDesc,
7303  void* param,
7304  const miopenTensorDescriptor_t gradDesc,
7305  const void* grad,
7306  const miopenTensorDescriptor_t expAvgDesc,
7307  void* expAvg,
7308  const miopenTensorDescriptor_t expAvgSqDesc,
7309  void* expAvgSq,
7310  const miopenTensorDescriptor_t maxExpAvgSqDesc,
7311  void* maxExpAvgSq,
7312  const miopenTensorDescriptor_t stateStepDesc,
7313  void* stateStep,
7314  const unsigned int state_step,
7315  const float lr,
7316  const float beta1,
7317  const float beta2,
7318  const float weight_decay,
7319  const float eps,
7320  const bool amsgrad,
7321  const bool maximize,
7322  const bool adamw,
7323  const miopenTensorDescriptor_t gradScaleDesc,
7324  const void* gradScale,
7325  const miopenTensorDescriptor_t foundInfDesc,
7326  const void* foundInf);
7327 
7468 MIOPEN_EXPORT miopenStatus_t
7469 miopenFusedAdamWithOutput(miopenHandle_t handle,
7470  const miopenTensorDescriptor_t paramInDesc,
7471  void* paramIn,
7472  const miopenTensorDescriptor_t paramOutDesc,
7473  void* paramOut,
7474  const miopenTensorDescriptor_t paramOutFloat16Desc,
7475  void* paramOutFloat16,
7476  const miopenTensorDescriptor_t gradInDesc,
7477  const void* gradIn,
7478  const miopenTensorDescriptor_t expAvgInDesc,
7479  void* expAvgIn,
7480  const miopenTensorDescriptor_t expAvgOutDesc,
7481  void* expAvgOut,
7482  const miopenTensorDescriptor_t expAvgSqInDesc,
7483  void* expAvgSqIn,
7484  const miopenTensorDescriptor_t expAvgSqOutDesc,
7485  void* expAvgSqOut,
7486  const miopenTensorDescriptor_t maxExpAvgSqInDesc,
7487  void* maxExpAvgSqIn,
7488  const miopenTensorDescriptor_t maxExpAvgSqOutDesc,
7489  void* maxExpAvgSqOut,
7490  const miopenTensorDescriptor_t stateStepInDesc,
7491  void* stateStepIn,
7492  const miopenTensorDescriptor_t stateStepOutDesc,
7493  void* stateStepOut,
7494  const unsigned int state_step,
7495  const float lr,
7496  const float beta1,
7497  const float beta2,
7498  const float weight_decay,
7499  const float eps,
7500  const bool amsgrad,
7501  const bool maximize,
7502  const bool adamw,
7503  const miopenTensorDescriptor_t gradScaleDesc,
7504  const void* gradScale,
7505  const miopenTensorDescriptor_t foundInfDesc,
7506  const void* foundInf);
7507 
7509 // CLOSEOUT SGD DOXYGEN GROUP
7510 #endif // MIOPEN_BETA_API
7511 
7512 #ifdef MIOPEN_BETA_API
7513 // TransformersAdamW APIs
7604 MIOPEN_EXPORT miopenStatus_t miopenTransformersAdamW(miopenHandle_t handle,
7605  const miopenTensorDescriptor_t paramDesc,
7606  void* param,
7607  const miopenTensorDescriptor_t gradDesc,
7608  const void* grad,
7609  const miopenTensorDescriptor_t expAvgDesc,
7610  void* expAvg,
7611  const miopenTensorDescriptor_t expAvgSqDesc,
7612  void* expAvgSq,
7613  const miopenTensorDescriptor_t stateStepDesc,
7614  void* stateStep,
7615  const unsigned int state_step,
7616  const float lr,
7617  const float beta1,
7618  const float beta2,
7619  const float weight_decay,
7620  const float eps,
7621  const bool correct_bias,
7622  const miopenTensorDescriptor_t gradScaleDesc,
7623  const void* gradScale,
7624  const miopenTensorDescriptor_t foundInfDesc,
7625  const void* foundInf);
7626 
7753 MIOPEN_EXPORT miopenStatus_t
7755  const miopenTensorDescriptor_t paramInDesc,
7756  void* paramIn,
7757  const miopenTensorDescriptor_t paramOutDesc,
7758  void* paramOut,
7759  const miopenTensorDescriptor_t paramOutFloat16Desc,
7760  void* paramOutFloat16,
7761  const miopenTensorDescriptor_t gradInDesc,
7762  const void* gradIn,
7763  const miopenTensorDescriptor_t expAvgInDesc,
7764  void* expAvgIn,
7765  const miopenTensorDescriptor_t expAvgOutDesc,
7766  void* expAvgOut,
7767  const miopenTensorDescriptor_t expAvgSqInDesc,
7768  void* expAvgSqIn,
7769  const miopenTensorDescriptor_t expAvgSqOutDesc,
7770  void* expAvgSqOut,
7771  const miopenTensorDescriptor_t stateStepInDesc,
7772  void* stateStepIn,
7773  const miopenTensorDescriptor_t stateStepOutDesc,
7774  void* stateStepOut,
7775  const unsigned int state_step,
7776  const float lr,
7777  const float beta1,
7778  const float beta2,
7779  const float weight_decay,
7780  const float eps,
7781  const float step_size,
7782  const bool correct_bias,
7783  const miopenTensorDescriptor_t gradScaleDesc,
7784  const void* gradScale,
7785  const miopenTensorDescriptor_t foundInfDesc,
7786  const void* foundInf);
7787 
7789 // CLOSEOUT SGD DOXYGEN GROUP
7790 #endif // MIOPEN_BETA_API
7791 
7792 #ifdef MIOPEN_BETA_API
7793 // GetItem APIs
7806 MIOPEN_EXPORT miopenStatus_t
7807 miopenGetGetitemWorkspaceSize(miopenHandle_t handle,
7808  uint32_t indexCount,
7809  const miopenTensorDescriptor_t* indexDescs,
7810  size_t* sizeInBytes);
7811 
7836 MIOPEN_EXPORT miopenStatus_t miopenGetitemBackward(miopenHandle_t handle,
7837  void* workspace,
7838  size_t workspaceSizeInBytes,
7839  const miopenTensorDescriptor_t dyDesc,
7840  const void* dy,
7841  uint32_t indexCount,
7842  const miopenTensorDescriptor_t* indexDescs,
7843  const void* const* indexs,
7844  const miopenTensorDescriptor_t dxDesc,
7845  void* dx,
7846  const miopenTensorDescriptor_t errorDesc,
7847  void* error,
7848  uint32_t dimCount,
7849  const int32_t* dims,
7850  uint32_t sliceCount,
7851  const int32_t* slices,
7852  uint32_t offset);
7853 
7855 // CLOSEOUT GETITEM DOXYGEN GROUP
7856 #endif // MIOPEN_BETA_API
7857 
7858 #ifdef MIOPEN_BETA_API
7859 // RotaryPositionalEmbeddings APIs
7877 MIOPEN_EXPORT miopenStatus_t miopenRoPEForward(miopenHandle_t handle,
7878  const miopenTensorDescriptor_t xDesc,
7879  const void* x,
7880  const miopenTensorDescriptor_t cosDesc,
7881  const void* cos,
7882  const miopenTensorDescriptor_t sinDesc,
7883  const void* sin,
7884  const miopenTensorDescriptor_t yDesc,
7885  void* y);
7886 
7900 MIOPEN_EXPORT miopenStatus_t miopenRoPEBackward(miopenHandle_t handle,
7901  const miopenTensorDescriptor_t dyDesc,
7902  const void* dy,
7903  const miopenTensorDescriptor_t cosDesc,
7904  const void* cos,
7905  const miopenTensorDescriptor_t sinDesc,
7906  const void* sin,
7907  const miopenTensorDescriptor_t dxDesc,
7908  void* dx);
7910 // CLOSEOUT ROPE DOXYGEN GROUP
7911 // kthvalue APIs
7932 MIOPEN_EXPORT miopenStatus_t miopenKthvalueForward(miopenHandle_t handle,
7933  miopenTensorDescriptor_t inputDesc,
7934  const void* input,
7935  miopenTensorDescriptor_t outputDesc,
7936  void* output,
7937  miopenTensorDescriptor_t indicesDesc,
7938  size_t* indices,
7939  size_t k,
7940  int32_t dim = -1,
7941  bool keepDim = false);
7942 
7944 // CLOSEOUT kthvalue DOXYGEN GROUP
7945 #endif // MIOPEN_BETA_API
7946 
7947 #ifdef MIOPEN_BETA_API
7961 MIOPEN_EXPORT miopenStatus_t
7963  miopenTensorDescriptor_t inputDesc,
7964  miopenTensorDescriptor_t weightDesc,
7965  size_t* sizeInBytes);
7966 
7983 MIOPEN_EXPORT miopenStatus_t miopenPReLUBackward(miopenHandle_t handle,
7984  void* workspace,
7985  size_t workspaceSizeInBytes,
7986  miopenTensorDescriptor_t inputDesc,
7987  const void* input,
7988  miopenTensorDescriptor_t weightDesc,
7989  const void* weight,
7990  miopenTensorDescriptor_t doutputDesc,
7991  const void* doutput,
7992  miopenTensorDescriptor_t dinputDesc,
7993  void* dinput,
7994  miopenTensorDescriptor_t dweightDesc,
7995  void* dweight);
7996 
7998 // CLOSEOUT RELU DOXYGEN GROUP
7999 #endif // MIOPEN_BETA_API
8000 
8001 #ifdef MIOPEN_BETA_API
8002 
8007 typedef enum
8008 {
8014 
8015 // SoftMarginLoss APIs
8033 MIOPEN_EXPORT miopenStatus_t
8035  miopenTensorDescriptor_t inputDesc,
8036  miopenTensorDescriptor_t targetDesc,
8037  miopenTensorDescriptor_t outputDesc,
8038  miopenLossReductionMode_t reduction,
8039  size_t* sizeInBytes);
8040 
8057 MIOPEN_EXPORT miopenStatus_t miopenSoftMarginLossForward(miopenHandle_t handle,
8058  miopenTensorDescriptor_t inputDesc,
8059  const void* input,
8060  miopenTensorDescriptor_t targetDesc,
8061  const void* target,
8062  miopenTensorDescriptor_t outputDesc,
8063  void* output,
8064  miopenLossReductionMode_t reduction,
8065  void* workspace = nullptr,
8066  size_t workspaceSizeInBytes = 0);
8067 
8082 MIOPEN_EXPORT miopenStatus_t miopenSoftMarginLossBackward(miopenHandle_t handle,
8083  miopenTensorDescriptor_t inputDesc,
8084  const void* input,
8085  miopenTensorDescriptor_t targetDesc,
8086  const void* target,
8087  miopenTensorDescriptor_t doutputDesc,
8088  const void* doutput,
8089  miopenTensorDescriptor_t dinputDesc,
8090  void* dinput,
8091  miopenLossReductionMode_t reduction);
8092 
8094 // CLOSEOUT LossFunction DOXYGEN GROUP
8095 #endif
8096 
8097 #ifdef MIOPEN_BETA_API
8098 // MultiMarginLoss APIs
8122 MIOPEN_EXPORT miopenStatus_t
8124  miopenTensorDescriptor_t inputDesc,
8125  miopenTensorDescriptor_t targetDesc,
8126  miopenTensorDescriptor_t weightDesc,
8127  miopenTensorDescriptor_t outputDesc,
8128  long p,
8129  float margin,
8130  miopenLossReductionMode_t reduction,
8131  size_t* sizeInBytes);
8132 
8160 MIOPEN_EXPORT miopenStatus_t miopenMultiMarginLossForward(miopenHandle_t handle,
8161  miopenTensorDescriptor_t inputDesc,
8162  const void* input,
8163  miopenTensorDescriptor_t targetDesc,
8164  const void* target,
8165  miopenTensorDescriptor_t weightDesc,
8166  const void* weight,
8167  miopenTensorDescriptor_t outputDesc,
8168  void* output,
8169  long p,
8170  float margin,
8171  miopenLossReductionMode_t reduction,
8172  void* workspace,
8173  size_t workspaceSizeInBytes);
8174 
8176 // CLOSEOUT LossFunction DOXYGEN GROUP
8177 #endif // MIOPEN_BETA_API
8178 
8179 #ifdef __cplusplus
8180 }
8181 #endif
8182 
8183 #ifdef __clang__
8184 #pragma clang diagnostic pop
8185 #endif
8186 
8187 #endif // MIOPEN_GUARD_MIOPEN_H_
miopenStatus_t miopenCreateOpActivationBackward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *activBwdOp, miopenActivationMode_t mode)
Creates a backward activation operator.
miopenStatus_t miopenCreateOpBatchNormForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnFwdOp, const miopenBatchNormMode_t bn_mode, bool runningMeanVariance)
Creates a forward training batch normalization operator.
miopenStatus_t miopenFusionPlanConvolutionGetAlgo(miopenFusionPlanDescriptor_t fusePlanDesc, const int requestAlgoCount, int *returnedAlgoCount, miopenConvFwdAlgorithm_t *returnedAlgos)
Returns the supported algorithms for the convolution operator in the Fusion Plan.
miopenStatus_t miopenFusionPlanGetWorkSpaceSize(miopenHandle_t handle, miopenFusionPlanDescriptor_t fusePlanDesc, size_t *workSpaceSize, miopenConvFwdAlgorithm_t algo)
Query the workspace size required for the fusion plan.
miopenStatus_t miopenFusionPlanConvolutionSetAlgo(miopenFusionPlanDescriptor_t fusePlanDesc, miopenConvFwdAlgorithm_t algo)
Requests the fusion runtime to choose a particular algorithm for the added convolution operation.
miopenStatus_t miopenCreateOpBatchNormInference(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnOp, const miopenBatchNormMode_t bn_mode, const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc)
Creates a forward inference batch normalization operator.
miopenStatus_t miopenSetOpArgsBiasForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t biasOp, const void *alpha, const void *beta, const void *bias)
Sets the arguments for forward bias op.
miopenStatus_t miopenCreateOpConvForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *convOp, miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t wDesc)
Creates forward convolution operator.
miopenStatus_t miopenSetOpArgsBatchNormInference(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t bnOp, const void *alpha, const void *beta, const void *bnScale, const void *bnBias, const void *estimatedMean, const void *estimatedVariance, double epsilon)
Sets the arguments for inference batch normalization op.
miopenStatus_t miopenSetOpArgsBatchNormForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t bnOp, const void *alpha, const void *beta, const void *bnScale, const void *bnBias, void *savedMean, void *savedInvVariance, void *runningMean, void *runningVariance, double expAvgFactor, double epsilon)
Sets the arguments for forward batch normalization op.
miopenStatus_t miopenExecuteFusionPlan(const miopenHandle_t handle, const miopenFusionPlanDescriptor_t fusePlanDesc, const miopenTensorDescriptor_t inputDesc, const void *input, const miopenTensorDescriptor_t outputDesc, void *output, miopenOperatorArgs_t args)
Executes the fusion plan.
miopenStatus_t miopenFusionPlanGetOp(miopenFusionPlanDescriptor_t fusePlanDesc, const int op_idx, miopenFusionOpDescriptor_t *op)
Allows access to the operators in a fusion plan.
miopenStatus_t miopenDestroyFusionPlan(miopenFusionPlanDescriptor_t fusePlanDesc)
Destroy the fusion plan descriptor object.
miopenStatus_t miopenCreateOpActivationForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *activFwdOp, miopenActivationMode_t mode)
Creates a forward activation operator.
miopenFusionDirection_t
Kernel fusion direction in the network.
Definition: miopen.h:3295
miopenStatus_t miopenSetOpArgsActivBackward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t activBwdOp, const void *alpha, const void *beta, const void *y, const void *reserved, double activAlpha, double activBeta, double activGamma)
Sets the arguments for backward activation op.
miopenStatus_t miopenCompileFusionPlan(miopenHandle_t handle, miopenFusionPlanDescriptor_t fusePlanDesc)
Compiles the fusion plan.
miopenStatus_t miopenSetOpArgsBatchNormBackward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t bnOp, const void *alpha, const void *beta, const void *x, const void *bnScale, const void *bnBias, void *resultBnScaleDiff, void *resultBnBiasDiff, const void *savedMean, const void *savedInvVariance)
Sets the arguments for backward batch normalization op.
miopenStatus_t miopenSetOpArgsActivForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t activFwdOp, const void *alpha, const void *beta, double activAlpha, double activBeta, double activGamma)
Sets the arguments for forward activation op.
miopenStatus_t miopenDestroyOperatorArgs(miopenOperatorArgs_t args)
Destroys an operator argument object.
miopenStatus_t miopenCreateOpBatchNormBackward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnBwdOp, const miopenBatchNormMode_t bn_mode)
Creates a back propagation batch normalization operator.
miopenStatus_t miopenCreateOperatorArgs(miopenOperatorArgs_t *args)
Creates an operator argument object.
miopenStatus_t miopenSetOpArgsConvForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t convOp, const void *alpha, const void *beta, const void *w)
Sets the arguments for forward convolution op.
miopenStatus_t miopenConvolutionBiasActivationForward(miopenHandle_t handle, const void *alpha1, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, miopenConvFwdAlgorithm_t algo, void *workspace, size_t workspaceSizeInBytes, const void *alpha2, const miopenTensorDescriptor_t zDesc, const void *z, const miopenTensorDescriptor_t biasDesc, const void *bias, const miopenActivationDescriptor_t activationDesc, const miopenTensorDescriptor_t yDesc, void *y)
Prepares and executes the Convlution+Bias+Activation Fusion.
miopenStatus_t miopenCreateFusionPlan(miopenFusionPlanDescriptor_t *fusePlanDesc, const miopenFusionDirection_t fuseDirection, const miopenTensorDescriptor_t inputDesc)
Creates the kenrel fusion plan descriptor object.
miopenStatus_t miopenCreateOpBiasForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *biasOp, const miopenTensorDescriptor_t bDesc)
Creates a forward bias operator.
@ miopenHorizontalFusion
Definition: miopen.h:3297
@ miopenVerticalFusion
Definition: miopen.h:3296
miopenStatus_t miopenBackendExecute(miopenHandle_t handle, miopenBackendDescriptor_t executionPlan, miopenBackendDescriptor_t variantPack)
Executes a graph.
miopenBackendHeurMode_t
Operation mode of CUDNN_BACKEND_ENGINEHEUR_DESCRIPTOR.
Definition: miopen.h:6959
miopenPointwiseMode_t
Intended poinwise math operation for a pointwise operation descriptor.
Definition: miopen.h:6759
miopenStatus_t miopenBackendFinalize(miopenBackendDescriptor_t descriptor)
Finalizes a backend descriptor.
miopenStatus_t miopenBackendInitialize(miopenBackendDescriptor_t descriptor, miopenBackendDescriptorType_t descriptorType, size_t sizeInBytes)
Repurposes an instance of miopenBackendDescriptor_t.
miopenBackendAttributeName_t
Backend Descriptor's Attribute.
Definition: miopen.h:6466
miopenRngDistribution_t
Distribution for random number generation.
Definition: miopen.h:6935
miopenBackendDescriptorType_t
Descriptor type.
Definition: miopen.h:6423
miopenStatus_t miopenBackendSetAttribute(miopenBackendDescriptor_t descriptor, miopenBackendAttributeName_t attributeName, miopenBackendAttributeType_t attributeType, int64_t elementCount, void *arrayOfElements)
Sets an attribute of a descriptor.
miopenStatus_t miopenBackendGetAttribute(miopenBackendDescriptor_t descriptor, miopenBackendAttributeName_t attributeName, miopenBackendAttributeType_t attributeType, int64_t requestedElementCount, int64_t *elementCount, void *arrayOfElements)
Retrieves backend descriptor's attribute.
miopenStatus_t miopenBackendCreateDescriptor(miopenBackendDescriptorType_t descriptorType, miopenBackendDescriptor_t *descriptor)
Backend descriptor.
miopenAlphaBetaCase_t
Definition: miopen.h:6942
miopenStatus_t miopenBackendDestroyDescriptor(miopenBackendDescriptor_t descriptor)
Destroys an instance of miopenBackendDescriptor_t.
miopenBackendAttributeType_t
Data type of an attribute of a backend descriptor.
Definition: miopen.h:6720
@ MIOPEN_HEUR_MODE_INSTANT
Definition: miopen.h:6960
@ MIOPEN_HEUR_MODE_A
Definition: miopen.h:6963
@ MIOPEN_HEUR_MODE_B
Definition: miopen.h:6961
@ MIOPEN_HEUR_MODES_COUNT
Definition: miopen.h:6964
@ MIOPEN_HEUR_MODE_FALLBACK
Definition: miopen.h:6962
@ MIOPEN_POINTWISE_SOFTPLUS_FWD
Definition: miopen.h:6847
@ MIOPEN_POINTWISE_ELU_FWD
Definition: miopen.h:6840
@ MIOPEN_POINTWISE_RELU_FWD
Definition: miopen.h:6831
@ MIOPEN_POINTWISE_DIV
Definition: miopen.h:6768
@ MIOPEN_POINTWISE_SIGMOID_BWD
Definition: miopen.h:6865
@ MIOPEN_POINTWISE_POW
Definition: miopen.h:6784
@ MIOPEN_POINTWISE_MOD
Definition: miopen.h:6778
@ MIOPEN_POINTWISE_SQRT
Definition: miopen.h:6817
@ MIOPEN_POINTWISE_BINARY_SELECT
Definition: miopen.h:6922
@ MIOPEN_POINTWISE_GELU_BWD
Definition: miopen.h:6873
@ MIOPEN_POINTWISE_MIN
Definition: miopen.h:6774
@ MIOPEN_POINTWISE_CMP_NEQ
Definition: miopen.h:6892
@ MIOPEN_POINTWISE_FLOOR
Definition: miopen.h:6802
@ MIOPEN_POINTWISE_RSQRT
Definition: miopen.h:6811
@ MIOPEN_POINTWISE_CMP_EQ
Definition: miopen.h:6889
@ MIOPEN_POINTWISE_CMP_GE
Definition: miopen.h:6899
@ MIOPEN_POINTWISE_ADD_SQUARE
Definition: miopen.h:6765
@ MIOPEN_POINTWISE_ERF
Definition: miopen.h:6823
@ MIOPEN_POINTWISE_SWISH_FWD
Definition: miopen.h:6850
@ MIOPEN_POINTWISE_LOG
Definition: miopen.h:6805
@ MIOPEN_POINTWISE_SUB
Definition: miopen.h:6787
@ MIOPEN_POINTWISE_NEG
Definition: miopen.h:6808
@ MIOPEN_POINTWISE_LOGICAL_AND
Definition: miopen.h:6909
@ MIOPEN_POINTWISE_SWISH_BWD
Definition: miopen.h:6879
@ MIOPEN_POINTWISE_GELU_APPROX_TANH_FWD
Definition: miopen.h:6855
@ MIOPEN_POINTWISE_SIN
Definition: miopen.h:6814
@ MIOPEN_POINTWISE_RECIPROCAL
Definition: miopen.h:6926
@ MIOPEN_POINTWISE_GELU_APPROX_TANH_BWD
Definition: miopen.h:6886
@ MIOPEN_POINTWISE_GELU_FWD
Definition: miopen.h:6844
@ MIOPEN_POINTWISE_ABS
Definition: miopen.h:6790
@ MIOPEN_POINTWISE_CMP_LT
Definition: miopen.h:6902
@ MIOPEN_POINTWISE_EXP
Definition: miopen.h:6799
@ MIOPEN_POINTWISE_GEN_INDEX
Definition: miopen.h:6918
@ MIOPEN_POINTWISE_CEIL
Definition: miopen.h:6793
@ MIOPEN_POINTWISE_LOGICAL_NOT
Definition: miopen.h:6915
@ MIOPEN_POINTWISE_SIGMOID_FWD
Definition: miopen.h:6837
@ MIOPEN_POINTWISE_SOFTPLUS_BWD
Definition: miopen.h:6876
@ MIOPEN_POINTWISE_LOGICAL_OR
Definition: miopen.h:6912
@ MIOPEN_POINTWISE_TAN
Definition: miopen.h:6820
@ MIOPEN_POINTWISE_ELU_BWD
Definition: miopen.h:6869
@ MIOPEN_POINTWISE_IDENTITY
Definition: miopen.h:6828
@ MIOPEN_POINTWISE_CMP_LE
Definition: miopen.h:6906
@ MIOPEN_POINTWISE_COS
Definition: miopen.h:6796
@ MIOPEN_POINTWISE_TANH_BWD
Definition: miopen.h:6862
@ MIOPEN_POINTWISE_MUL
Definition: miopen.h:6781
@ MIOPEN_POINTWISE_TANH_FWD
Definition: miopen.h:6834
@ MIOPEN_POINTWISE_RELU_BWD
Definition: miopen.h:6859
@ MIOPEN_POINTWISE_ADD
Definition: miopen.h:6761
@ MIOPEN_POINTWISE_MAX
Definition: miopen.h:6771
@ MIOPEN_POINTWISE_CMP_GT
Definition: miopen.h:6895
@ MIOPEN_ATTR_OPERATION_NORM_BWD_MODE
Definition: miopen.h:6683
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_W
Definition: miopen.h:6513
@ MIOPEN_ATTR_RESAMPLE_NAN_PROPAGATION
Definition: miopen.h:6637
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_XDESC
Definition: miopen.h:6640
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_W
Definition: miopen.h:6519
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_ALPHA
Definition: miopen.h:6510
@ MIOPEN_ATTR_OPERATION_SIGNAL_MODE
Definition: miopen.h:6661
@ MIOPEN_ATTR_OPERATION_RNG_DESC
Definition: miopen.h:6707
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_BETA
Definition: miopen.h:6511
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC
Definition: miopen.h:6624
@ MIOPEN_ATTR_OPERATION_NORM_BWD_INV_VARIANCE_DESC
Definition: miopen.h:6686
@ MIOPEN_ATTR_OPERATION_NORM_FWD_EPSILON_DESC
Definition: miopen.h:6674
@ MIOPEN_ATTR_OPERATIONGRAPH_OPS
Definition: miopen.h:6563
@ MIOPEN_ATTR_KNOB_INFO_MAXIMUM_VALUE
Definition: miopen.h:6587
@ MIOPEN_ATTR_CONVOLUTION_POST_PADDINGS
Definition: miopen.h:6482
@ MIOPEN_ATTR_OPERATION_SIGNAL_YDESC
Definition: miopen.h:6665
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DSCALE_DESC
Definition: miopen.h:6690
@ MIOPEN_ATTR_OPERATION_NORM_BWD_PEER_STAT_DESCS
Definition: miopen.h:6693
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_YDESC
Definition: miopen.h:6654
@ MIOPEN_ATTR_CONVOLUTION_PRE_PADDINGS
Definition: miopen.h:6483
@ MIOPEN_ATTR_REDUCTION_OPERATOR
Definition: miopen.h:6611
@ MIOPEN_ATTR_OPERATION_MATMUL_DESC
Definition: miopen.h:6605
@ MIOPEN_ATTR_CONVOLUTION_DILATIONS
Definition: miopen.h:6480
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_DYDESC
Definition: miopen.h:6648
@ MIOPEN_ATTR_OPERATION_POINTWISE_ALPHA1
Definition: miopen.h:6532
@ MIOPEN_ATTR_RESAMPLE_SPATIAL_DIMS
Definition: miopen.h:6632
@ MIOPEN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS
Definition: miopen.h:6498
@ MIOPEN_ATTR_OPERATION_NORM_FWD_MEAN_DESC
Definition: miopen.h:6670
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_MEAN_DESC
Definition: miopen.h:6552
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC
Definition: miopen.h:6620
@ MIOPEN_ATTR_KNOB_INFO_TYPE
Definition: miopen.h:6586
@ MIOPEN_ATTR_LAYOUT_INFO_TYPES
Definition: miopen.h:6584
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_Y_SUM_DESC
Definition: miopen.h:6546
@ MIOPEN_ATTR_OPERATIONGRAPH_HANDLE
Definition: miopen.h:6562
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DYDESC
Definition: miopen.h:6687
@ MIOPEN_ATTR_RNG_UNIFORM_DIST_MINIMUM
Definition: miopen.h:6702
@ MIOPEN_ATTR_POINTWISE_MATH_PREC
Definition: miopen.h:6468
@ MIOPEN_ATTR_OPERATION_MATMUL_GEMM_N_OVERRIDE_DESC
Definition: miopen.h:6608
@ MIOPEN_ATTR_OPERATION_GENSTATS_MODE
Definition: miopen.h:6538
@ MIOPEN_ATTR_KNOB_CHOICE_KNOB_VALUE
Definition: miopen.h:6508
@ MIOPEN_ATTR_VARIANT_PACK_INTERMEDIATES
Definition: miopen.h:6580
@ MIOPEN_ATTR_OPERATION_REDUCTION_YDESC
Definition: miopen.h:6615
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_BETA
Definition: miopen.h:6523
@ MIOPEN_ATTR_VARIANT_PACK_WORKSPACE
Definition: miopen.h:6581
@ MIOPEN_ATTR_TENSOR_IS_BY_VALUE
Definition: miopen.h:6574
@ MIOPEN_ATTR_OPERATION_NORM_FWD_MODE
Definition: miopen.h:6667
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_CONV_DESC
Definition: miopen.h:6512
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_STATS_MODE
Definition: miopen.h:6544
@ MIOPEN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_VAR_DESC
Definition: miopen.h:6677
@ MIOPEN_ATTR_OPERATION_RESHAPE_XDESC
Definition: miopen.h:6695
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_XDESC
Definition: miopen.h:6653
@ MIOPEN_ATTR_OPERATION_POINTWISE_XDESC
Definition: miopen.h:6529
@ MIOPEN_ATTR_VARIANT_PACK_UNIQUE_IDS
Definition: miopen.h:6578
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC
Definition: miopen.h:6623
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_ALPHA
Definition: miopen.h:6643
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_SCALE_DESC
Definition: miopen.h:6548
@ MIOPEN_ATTR_OPERATION_SIGNAL_VALUE
Definition: miopen.h:6663
@ MIOPEN_ATTR_OPERATION_SIGNAL_FLAGDESC
Definition: miopen.h:6662
@ MIOPEN_ATTR_OPERATION_POINTWISE_TDESC
Definition: miopen.h:6536
@ MIOPEN_ATTR_ENGINEHEUR_RESULTS
Definition: miopen.h:6488
@ MIOPEN_ATTR_TENSOR_BYTE_ALIGNMENT
Definition: miopen.h:6566
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_X
Definition: miopen.h:6526
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC
Definition: miopen.h:6558
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS
Definition: miopen.h:6628
@ MIOPEN_ATTR_OPERATION_GENSTATS_MATH_PREC
Definition: miopen.h:6539
@ MIOPEN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_MEAN_DESC
Definition: miopen.h:6676
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EQ_SCALE_DESC
Definition: miopen.h:6556
@ MIOPEN_ATTR_EXECUTION_PLAN_HANDLE
Definition: miopen.h:6495
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC
Definition: miopen.h:6622
@ MIOPEN_ATTR_OPERATION_CONCAT_OUTPUT_DESC
Definition: miopen.h:6659
@ MIOPEN_ATTR_OPERATION_NORM_BWD_EPSILON_DESC
Definition: miopen.h:6689
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_BETA
Definition: miopen.h:6517
@ MIOPEN_ATTR_EXECUTION_PLAN_WORKSPACE_SIZE
Definition: miopen.h:6497
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DX
Definition: miopen.h:6520
@ MIOPEN_ATTR_TENSOR_VECTOR_COUNT
Definition: miopen.h:6570
@ MIOPEN_ATTR_OPERATION_MATMUL_CDESC
Definition: miopen.h:6604
@ MIOPEN_ATTR_REDUCTION_COMP_TYPE
Definition: miopen.h:6612
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_BETA
Definition: miopen.h:6651
@ MIOPEN_ATTR_TENSOR_VECTORIZED_DIMENSION
Definition: miopen.h:6571
@ MIOPEN_ATTR_TENSOR_DIMENSIONS
Definition: miopen.h:6568
@ MIOPEN_ATTR_OPERATION_GENSTATS_SUMDESC
Definition: miopen.h:6541
@ MIOPEN_ATTR_OPERATION_CONCAT_INPLACE_INDEX
Definition: miopen.h:6658
@ MIOPEN_ATTR_OPERATION_POINTWISE_ALPHA2
Definition: miopen.h:6533
@ MIOPEN_ATTR_ENGINE_NUMERICAL_NOTE
Definition: miopen.h:6594
@ MIOPEN_ATTR_ENGINE_BEHAVIOR_NOTE
Definition: miopen.h:6596
@ MIOPEN_ATTR_EXECUTION_PLAN_JSON_REPRESENTATION
Definition: miopen.h:6500
@ MIOPEN_ATTR_RESAMPLE_STRIDES
Definition: miopen.h:6635
@ MIOPEN_ATTR_POINTWISE_ELU_ALPHA
Definition: miopen.h:6473
@ MIOPEN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_VAR_DESC
Definition: miopen.h:6679
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_IDXDESC
Definition: miopen.h:6649
@ MIOPEN_ATTR_OPERATION_RNG_SEED
Definition: miopen.h:6706
@ MIOPEN_ATTR_OPERATION_NORM_BWD_XDESC
Definition: miopen.h:6684
@ MIOPEN_ATTR_OPERATION_POINTWISE_DXDESC
Definition: miopen.h:6534
@ MIOPEN_ATTR_OPERATION_CONCAT_INPUT_DESCS
Definition: miopen.h:6657
@ MIOPEN_ATTR_RESAMPLE_MODE
Definition: miopen.h:6630
@ MIOPEN_ATTR_RNG_DISTRIBUTION
Definition: miopen.h:6698
@ MIOPEN_ATTR_OPERATION_NORM_BWD_MEAN_DESC
Definition: miopen.h:6685
@ MIOPEN_ATTR_OPERATION_MATMUL_GEMM_M_OVERRIDE_DESC
Definition: miopen.h:6607
@ MIOPEN_ATTR_OPERATION_NORM_FWD_PHASE
Definition: miopen.h:6668
@ MIOPEN_ATTR_POINTWISE_RELU_LOWER_CLIP_SLOPE
Definition: miopen.h:6472
@ MIOPEN_ATTR_OPERATION_RESHAPE_YDESC
Definition: miopen.h:6696
@ MIOPEN_ATTR_VARIANT_PACK_DATA_POINTERS
Definition: miopen.h:6579
@ MIOPEN_ATTR_POINTWISE_AXIS
Definition: miopen.h:6476
@ MIOPEN_ATTR_OPERATION_NORM_FWD_YDESC
Definition: miopen.h:6680
@ MIOPEN_ATTR_POINTWISE_RELU_LOWER_CLIP
Definition: miopen.h:6470
@ MIOPEN_ATTR_ENGINE_OPERATION_GRAPH
Definition: miopen.h:6591
@ MIOPEN_ATTR_OPERATION_MATMUL_BDESC
Definition: miopen.h:6603
@ MIOPEN_ATTR_TENSOR_DATA_TYPE
Definition: miopen.h:6567
@ MIOPEN_ATTR_OPERATION_SIGNAL_XDESC
Definition: miopen.h:6664
@ MIOPEN_ATTR_KNOB_INFO_MINIMUM_VALUE
Definition: miopen.h:6588
@ MIOPEN_ATTR_OPERATION_NORM_FWD_BIAS_DESC
Definition: miopen.h:6673
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_DESC
Definition: miopen.h:6645
@ MIOPEN_ATTR_RESAMPLE_PRE_PADDINGS
Definition: miopen.h:6634
@ MIOPEN_ATTR_MATMUL_COMP_TYPE
Definition: miopen.h:6599
@ MIOPEN_ATTR_TENSOR_UNIQUE_ID
Definition: miopen.h:6572
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC
Definition: miopen.h:6626
@ MIOPEN_ATTR_OPERATION_CONCAT_AXIS
Definition: miopen.h:6656
@ MIOPEN_ATTR_OPERATION_RNG_YDESC
Definition: miopen.h:6705
@ MIOPEN_ATTR_ENGINE_GLOBAL_INDEX
Definition: miopen.h:6592
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_CONV_DESC
Definition: miopen.h:6518
@ MIOPEN_ATTR_ENGINEHEUR_OPERATION_GRAPH
Definition: miopen.h:6487
@ MIOPEN_ATTR_TENSOR_RAGGED_OFFSET_DESC
Definition: miopen.h:6576
@ MIOPEN_ATTR_POINTWISE_SOFTPLUS_BETA
Definition: miopen.h:6474
@ MIOPEN_ATTR_TENSOR_IS_VIRTUAL
Definition: miopen.h:6573
@ MIOPEN_ATTR_ENGINECFG_KNOB_CHOICES
Definition: miopen.h:6493
@ MIOPEN_ATTR_MATMUL_PADDING_VALUE
Definition: miopen.h:6600
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EXP_AVERATE_FACTOR_DESC
Definition: miopen.h:6560
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_SAVED_INV_STD_DESC
Definition: miopen.h:6555
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_X
Definition: miopen.h:6514
@ MIOPEN_ATTR_KNOB_INFO_STRIDE
Definition: miopen.h:6589
@ MIOPEN_ATTR_RESAMPLE_WINDOW_DIMS
Definition: miopen.h:6636
@ MIOPEN_ATTR_OPERATION_POINTWISE_YDESC
Definition: miopen.h:6531
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_YDESC
Definition: miopen.h:6641
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC
Definition: miopen.h:6621
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DY
Definition: miopen.h:6521
@ MIOPEN_ATTR_CONVOLUTION_CONV_MODE
Definition: miopen.h:6479
@ MIOPEN_ATTR_OPERATION_REDUCTION_XDESC
Definition: miopen.h:6614
@ MIOPEN_ATTR_EXECUTION_PLAN_RUN_ONLY_INTERMEDIATE_UIDS
Definition: miopen.h:6499
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_MATH_PREC
Definition: miopen.h:6545
@ MIOPEN_ATTR_ENGINE_SM_COUNT_TARGET
Definition: miopen.h:6597
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EQ_BIAS_DESC
Definition: miopen.h:6557
@ MIOPEN_ATTR_KNOB_CHOICE_KNOB_TYPE
Definition: miopen.h:6507
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_DXDESC
Definition: miopen.h:6647
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_MEAN_DESC
Definition: miopen.h:6550
@ MIOPEN_ATTR_OPERATION_POINTWISE_DYDESC
Definition: miopen.h:6535
@ MIOPEN_ATTR_OPERATION_NORM_FWD_EXP_AVG_FACTOR_DESC
Definition: miopen.h:6675
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC
Definition: miopen.h:6627
@ MIOPEN_ATTR_OPERATION_RNG_OFFSET_DESC
Definition: miopen.h:6708
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_Y
Definition: miopen.h:6515
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_VAR_DESC
Definition: miopen.h:6551
@ MIOPEN_ATTR_ENGINE_LAYOUT_INFO
Definition: miopen.h:6595
@ MIOPEN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID
Definition: miopen.h:6502
@ MIOPEN_ATTR_CONVOLUTION_COMP_TYPE
Definition: miopen.h:6478
@ MIOPEN_ATTR_RESAMPLE_COMP_TYPE
Definition: miopen.h:6631
@ MIOPEN_ATTR_ENGINECFG_ENGINE
Definition: miopen.h:6491
@ MIOPEN_ATTR_RESAMPLE_POST_PADDINGS
Definition: miopen.h:6633
@ MIOPEN_ATTR_RESAMPLE_PADDING_MODE
Definition: miopen.h:6638
@ MIOPEN_ATTR_CONVOLUTION_SPATIAL_DIMS
Definition: miopen.h:6484
@ MIOPEN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_MEAN_DESC
Definition: miopen.h:6678
@ MIOPEN_ATTR_OPERATION_GENSTATS_XDESC
Definition: miopen.h:6540
@ MIOPEN_ATTR_OPERATION_NORM_FWD_INV_VARIANCE_DESC
Definition: miopen.h:6671
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_Y_SQ_SUM_DESC
Definition: miopen.h:6547
@ MIOPEN_ATTR_ENGINE_KNOB_INFO
Definition: miopen.h:6593
@ MIOPEN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT
Definition: miopen.h:6606
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DW
Definition: miopen.h:6525
@ MIOPEN_ATTR_TENSOR_REORDERING_MODE
Definition: miopen.h:6575
@ MIOPEN_ATTR_INTERMEDIATE_INFO_SIZE
Definition: miopen.h:6503
@ MIOPEN_ATTR_OPERATION_MATMUL_GEMM_K_OVERRIDE_DESC
Definition: miopen.h:6609
@ MIOPEN_ATTR_OPERATION_POINTWISE_PW_DESCRIPTOR
Definition: miopen.h:6528
@ MIOPEN_ATTR_RNG_NORMAL_DIST_STANDARD_DEVIATION
Definition: miopen.h:6700
@ MIOPEN_ATTR_INTERMEDIATE_INFO_DEPENDENT_DATA_UIDS
Definition: miopen.h:6504
@ MIOPEN_ATTR_LAYOUT_INFO_TENSOR_UID
Definition: miopen.h:6583
@ MIOPEN_ATTR_ENGINEHEUR_MODE
Definition: miopen.h:6486
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_ALPHA
Definition: miopen.h:6650
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_DESC
Definition: miopen.h:6652
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC
Definition: miopen.h:6559
@ MIOPEN_ATTR_OPERATION_POINTWISE_BDESC
Definition: miopen.h:6530
@ MIOPEN_ATTR_POINTWISE_MODE
Definition: miopen.h:6467
@ MIOPEN_ATTR_ENGINECFG_INTERMEDIATE_INFO
Definition: miopen.h:6492
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DY
Definition: miopen.h:6527
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DXDESC
Definition: miopen.h:6692
@ MIOPEN_ATTR_POINTWISE_NAN_PROPAGATION
Definition: miopen.h:6469
@ MIOPEN_ATTR_INTERMEDIATE_INFO_DEPENDENT_ATTRIBUTES
Definition: miopen.h:6505
@ MIOPEN_ATTR_POINTWISE_RELU_UPPER_CLIP
Definition: miopen.h:6471
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC
Definition: miopen.h:6625
@ MIOPEN_ATTR_RNG_BERNOULLI_DIST_PROBABILITY
Definition: miopen.h:6703
@ MIOPEN_ATTR_ENGINEHEUR_SM_COUNT_TARGET
Definition: miopen.h:6489
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC
Definition: miopen.h:6549
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_VAR_DESC
Definition: miopen.h:6553
@ MIOPEN_ATTR_RNG_NORMAL_DIST_MEAN
Definition: miopen.h:6699
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC
Definition: miopen.h:6618
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC
Definition: miopen.h:6619
@ MIOPEN_ATTR_OPERATION_NORM_FWD_PEER_STAT_DESCS
Definition: miopen.h:6681
@ MIOPEN_ATTR_OPERATION_NORM_FWD_SCALE_DESC
Definition: miopen.h:6672
@ MIOPEN_ATTR_OPERATION_GENSTATS_SQSUMDESC
Definition: miopen.h:6542
@ MIOPEN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG
Definition: miopen.h:6496
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_BETA
Definition: miopen.h:6644
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DBIAS_DESC
Definition: miopen.h:6691
@ MIOPEN_ATTR_OPERATION_NORM_BWD_SCALE_DESC
Definition: miopen.h:6688
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_ALPHA
Definition: miopen.h:6516
@ MIOPEN_ATTR_RNG_UNIFORM_DIST_MAXIMUM
Definition: miopen.h:6701
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_CONV_DESC
Definition: miopen.h:6524
@ MIOPEN_ATTR_TENSOR_STRIDES
Definition: miopen.h:6569
@ MIOPEN_ATTR_CONVOLUTION_FILTER_STRIDES
Definition: miopen.h:6481
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_ALPHA
Definition: miopen.h:6522
@ MIOPEN_ATTR_POINTWISE_SWISH_BETA
Definition: miopen.h:6475
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_IDXDESC
Definition: miopen.h:6642
@ MIOPEN_ATTR_OPERATION_REDUCTION_DESC
Definition: miopen.h:6616
@ MIOPEN_ATTR_OPERATION_NORM_FWD_XDESC
Definition: miopen.h:6669
@ MIOPEN_ATTR_OPERATION_MATMUL_ADESC
Definition: miopen.h:6602
@ MIOPEN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT
Definition: miopen.h:6564
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_SAVED_MEAN_DESC
Definition: miopen.h:6554
@ MIOPEN_RNG_DISTRIBUTION_BERNOULLI
Definition: miopen.h:6936
@ MIOPEN_RNG_DISTRIBUTION_UNIFORM
Definition: miopen.h:6937
@ MIOPEN_RNG_DISTRIBUTION_NORMAL
Definition: miopen.h:6938
@ MIOPEN_BACKEND_OPERATION_CONCAT_DESCRIPTOR
Definition: miopen.h:6434
@ MIOPEN_BACKEND_RESAMPLE_DESCRIPTOR
Definition: miopen.h:6452
@ MIOPEN_BACKEND_ENGINECFG_DESCRIPTOR
Definition: miopen.h:6426
@ MIOPEN_BACKEND_POINTWISE_DESCRIPTOR
Definition: miopen.h:6450
@ MIOPEN_BACKEND_OPERATION_RESAMPLE_FWD_DESCRIPTOR
Definition: miopen.h:6445
@ MIOPEN_BACKEND_CONVOLUTION_DESCRIPTOR
Definition: miopen.h:6424
@ MIOPEN_BACKEND_OPERATION_RNG_DESCRIPTOR
Definition: miopen.h:6447
@ MIOPEN_BACKEND_KNOB_INFO_DESCRIPTOR
Definition: miopen.h:6431
@ MIOPEN_BACKEND_RNG_DESCRIPTOR
Definition: miopen.h:6453
@ MIOPEN_BACKEND_OPERATION_POINTWISE_DESCRIPTOR
Definition: miopen.h:6442
@ MIOPEN_BACKEND_OPERATION_NORM_FORWARD_DESCRIPTOR
Definition: miopen.h:6441
@ MIOPEN_BACKEND_ENGINEHEUR_DESCRIPTOR
Definition: miopen.h:6427
@ MIOPEN_BACKEND_OPERATION_RESHAPE_DESCRIPTOR
Definition: miopen.h:6446
@ MIOPEN_BACKEND_LAYOUT_INFO_DESCRIPTOR
Definition: miopen.h:6432
@ MIOPEN_BACKEND_OPERATION_REDUCTION_DESCRIPTOR
Definition: miopen.h:6443
@ MIOPEN_BACKEND_TENSOR_DESCRIPTOR
Definition: miopen.h:6454
@ MIOPEN_BACKEND_OPERATION_RESAMPLE_BWD_DESCRIPTOR
Definition: miopen.h:6444
@ MIOPEN_BACKEND_OPERATIONGRAPH_DESCRIPTOR
Definition: miopen.h:6449
@ MIOPEN_BACKEND_OPERATION_CONVOLUTION_FORWARD_DESCRIPTOR
Definition: miopen.h:6437
@ MIOPEN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_FILTER_DESCRIPTOR
Definition: miopen.h:6436
@ MIOPEN_BACKEND_INTERMEDIATE_INFO_DESCRIPTOR
Definition: miopen.h:6429
@ MIOPEN_BACKEND_ENGINE_DESCRIPTOR
Definition: miopen.h:6425
@ MIOPEN_BACKEND_MATMUL_DESCRIPTOR
Definition: miopen.h:6433
@ MIOPEN_BACKEND_OPERATION_GEN_STATS_DESCRIPTOR
Definition: miopen.h:6438
@ MIOPEN_BACKEND_VARIANT_PACK_DESCRIPTOR
Definition: miopen.h:6455
@ MIOPEN_BACKEND_REDUCTION_DESCRIPTOR
Definition: miopen.h:6451
@ MIOPEN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_DATA_DESCRIPTOR
Definition: miopen.h:6435
@ MIOPEN_BACKEND_OPERATION_MATMUL_DESCRIPTOR
Definition: miopen.h:6439
@ MIOPEN_BACKEND_OPERATION_NORM_BACKWARD_DESCRIPTOR
Definition: miopen.h:6440
@ MIOPEN_BACKEND_OPERATION_SIGNAL_DESCRIPTOR
Definition: miopen.h:6448
@ MIOPEN_BACKEND_EXECUTION_PLAN_DESCRIPTOR
Definition: miopen.h:6428
@ MIOPEN_BACKEND_KNOB_CHOICE_DESCRIPTOR
Definition: miopen.h:6430
@ SCALE
Definition: miopen.h:6949
@ BILINEAR
Definition: miopen.h:6950
@ DEFAULT
Definition: miopen.h:6948
@ ERROR_STATE
Definition: miopen.h:6951
@ MIOPEN_TYPE_RNG_DISTRIBUTION
Definition: miopen.h:6750
@ MIOPEN_TYPE_FLOAT
Definition: miopen.h:6725
@ MIOPEN_TYPE_NUMERICAL_NOTE
Definition: miopen.h:6732
@ MIOPEN_TYPE_RESAMPLE_MODE
Definition: miopen.h:6742
@ MIOPEN_TYPE_INT32
Definition: miopen.h:6744
@ MIOPEN_TYPE_POINTWISE_MODE
Definition: miopen.h:6735
@ MIOPEN_TYPE_HANDLE
Definition: miopen.h:6721
@ MIOPEN_TYPE_HEUR_MODE
Definition: miopen.h:6729
@ MIOPEN_TYPE_CONVOLUTION_MODE
Definition: miopen.h:6728
@ MIOPEN_TYPE_TENSOR_REORDERING_MODE
Definition: miopen.h:6741
@ MIOPEN_TYPE_BOOLEAN
Definition: miopen.h:6723
@ MIOPEN_TYPE_NORM_MODE
Definition: miopen.h:6748
@ MIOPEN_TYPE_FRACTION
Definition: miopen.h:6747
@ MIOPEN_TYPE_BACKEND_DESCRIPTOR
Definition: miopen.h:6736
@ MIOPEN_TYPE_ATTRIB_NAME
Definition: miopen.h:6734
@ MIOPEN_TYPE_BEHAVIOR_NOTE
Definition: miopen.h:6740
@ MIOPEN_TYPE_DATA_TYPE
Definition: miopen.h:6722
@ MIOPEN_TYPE_NAN_PROPOGATION
Definition: miopen.h:6731
@ MIOPEN_TYPE_DOUBLE
Definition: miopen.h:6726
@ MIOPEN_TYPE_SIGNAL_MODE
Definition: miopen.h:6746
@ MIOPEN_TYPE_CHAR
Definition: miopen.h:6745
@ MIOPEN_TYPE_PADDING_MODE
Definition: miopen.h:6743
@ MIOPEN_TYPE_INT64
Definition: miopen.h:6724
@ MIOPEN_TYPE_REDUCTION_OPERATOR_TYPE
Definition: miopen.h:6739
@ MIOPEN_TYPE_LAYOUT_TYPE
Definition: miopen.h:6733
@ MIOPEN_TYPE_GENSTATS_MODE
Definition: miopen.h:6737
@ MIOPEN_TYPE_VOID_PTR
Definition: miopen.h:6727
@ MIOPEN_TYPE_BN_FINALIZE_STATS_MODE
Definition: miopen.h:6738
@ MIOPEN_TYPE_KNOB_TYPE
Definition: miopen.h:6730
@ MIOPEN_TYPE_NORM_FWD_PHASE
Definition: miopen.h:6749
miopenStatus_t miopenSetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc, miopenLRNMode_t mode, unsigned int lrnN, double lrnAlpha, double lrnBeta, double lrnK)
Sets a LRN layer descriptor details.
miopenStatus_t miopenCreateLRNDescriptor(miopenLRNDescriptor_t *lrnDesc)
Creates a local response normalization (LRN) layer descriptor.
miopenStatus_t miopenGetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc, miopenLRNMode_t *mode, unsigned int *lrnN, double *lrnAlpha, double *lrnBeta, double *lrnK)
Gets a LRN layer descriptor details.
miopenStatus_t miopenLRNBackward(miopenHandle_t handle, const miopenLRNDescriptor_t lrnDesc, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, const void *workSpace)
Execute a LRN backward layer.
miopenStatus_t miopenLRNGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Determine the workspace requirements.
miopenLRNMode_t
Definition: miopen.h:480
miopenStatus_t miopenLRNForward(miopenHandle_t handle, const miopenLRNDescriptor_t lrnDesc, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, bool do_backward, void *workSpace)
Execute a LRN forward layer.
miopenStatus_t miopenDestroyLRNDescriptor(miopenLRNDescriptor_t lrnDesc)
Destroys the LRN descriptor object.
miopenStatus_t miopenGetCTCLossWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t probsDesc, const miopenTensorDescriptor_t gradientsDesc, const int *labels, const int *labelLengths, const int *inputLengths, miopenCTCLossAlgo_t algo, const miopenCTCLossDescriptor_t ctcLossDesc, size_t *workSpaceSize)
Query the amount of memory required to execute miopenCTCLoss.
miopenStatus_t miopenGetSoftMarginLossForwardWorkspaceSize(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, miopenTensorDescriptor_t targetDesc, miopenTensorDescriptor_t outputDesc, miopenLossReductionMode_t reduction, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the SoftMarginLossForward call.
miopenLossReductionMode_t
Definition: miopen.h:8008
miopenStatus_t miopenGetMultiMarginLossForwardWorkspaceSize(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, miopenTensorDescriptor_t targetDesc, miopenTensorDescriptor_t weightDesc, miopenTensorDescriptor_t outputDesc, long p, float margin, miopenLossReductionMode_t reduction, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the MultiMarginLossForward call.
miopenCTCLossAlgo_t
Definition: miopen.h:5123
miopenStatus_t miopenSetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc, miopenDataType_t dataType, const int blank_label_id, bool apply_softmax_layer)
Set the details of a CTC loss function descriptor.
miopenStatus_t miopenCTCLoss(miopenHandle_t handle, const miopenTensorDescriptor_t probsDesc, const void *probs, const int *labels, const int *labelLengths, const int *inputLengths, void *losses, const miopenTensorDescriptor_t gradientsDesc, void *gradients, miopenCTCLossAlgo_t algo, const miopenCTCLossDescriptor_t ctcLossDesc, void *workSpace, size_t workSpaceSize)
Execute forward inference for CTCLoss layer.
miopenStatus_t miopenGetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc, miopenDataType_t *dataType, int *blank_label_id, bool *apply_softmax_layer)
Retrieves a CTC loss function descriptor's details.
miopenStatus_t miopenCreateCTCLossDescriptor(miopenCTCLossDescriptor_t *ctcLossDesc)
Create a CTC loss function Descriptor.
miopenStatus_t miopenMultiMarginLossForward(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, const void *input, miopenTensorDescriptor_t targetDesc, const void *target, miopenTensorDescriptor_t weightDesc, const void *weight, miopenTensorDescriptor_t outputDesc, void *output, long p, float margin, miopenLossReductionMode_t reduction, void *workspace, size_t workspaceSizeInBytes)
Execute a MultiMarginLoss forward layer.
miopenStatus_t miopenSoftMarginLossBackward(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, const void *input, miopenTensorDescriptor_t targetDesc, const void *target, miopenTensorDescriptor_t doutputDesc, const void *doutput, miopenTensorDescriptor_t dinputDesc, void *dinput, miopenLossReductionMode_t reduction)
Execute a SoftMarginLoss backward layer.
miopenStatus_t miopenSoftMarginLossForward(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, const void *input, miopenTensorDescriptor_t targetDesc, const void *target, miopenTensorDescriptor_t outputDesc, void *output, miopenLossReductionMode_t reduction, void *workspace=nullptr, size_t workspaceSizeInBytes=0)
Execute a SoftMarginLoss forward layer.
miopenStatus_t miopenDestroyCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc)
Destroys a CTC loss function descriptor object.
@ MIOPEN_CTC_LOSS_ALGO_DETERMINISTIC
Definition: miopen.h:5124
miopenRNNMode_t
Definition: miopen.h:3730
miopenStatus_t miopenGetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc, int *hiddenSize, int *layer, miopenDropoutDescriptor_t *dropoutDesc, miopenRNNInputMode_t *inputMode, miopenRNNDirectionMode_t *dirMode, miopenRNNMode_t *rnnMode, miopenRNNBiasMode_t *biasMode, miopenRNNAlgo_t *algoMode, miopenDataType_t *dataType)
Retrieves a RNN layer descriptor's details version 2. This version enables retrieving information of ...
miopenRNNInputMode_t
Definition: miopen.h:3741
miopenStatus_t miopenSetRNNLayerBias(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, void *w, const int biasID, miopenTensorDescriptor_t biasDesc, const void *layerBias)
Sets a bias for a specific layer in an RNN stack.
miopenStatus_t miopenRNNBackwardWeightsSeqTensor(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const miopenSeqTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t hDesc, const void *hx, const miopenSeqTensorDescriptor_t yDesc, const void *y, void *dw, size_t weightSpaceSize, void *workSpace, size_t workSpaceNumBytes, const void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward weights for recurrent layer.
miopenStatus_t miopenGetRNNParamsSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, miopenTensorDescriptor_t xDesc, size_t *numBytes, miopenDataType_t dtype)
Query the amount of parameter memory required for RNN training.
miopenStatus_t miopenGetRNNLayerBiasOffset(miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, const int biasID, miopenTensorDescriptor_t biasDesc, size_t *layerBiasOffset)
Gets a bias index offset for a specific layer in an RNN stack.
miopenStatus_t miopenGetRNNLayerParamOffset(miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, const int paramID, miopenTensorDescriptor_t paramDesc, size_t *layerParamOffset)
Gets an index offset for a specific weight matrix for a layer in the RNN stack.
miopenRNNDirectionMode_t
Definition: miopen.h:3761
miopenStatus_t miopenRNNBackwardSeqData(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const miopenSeqTensorDescriptor_t yDesc, const void *y, const void *dy, const miopenTensorDescriptor_t hDesc, const void *hx, const void *dhy, void *dhx, const miopenTensorDescriptor_t cDesc, const void *cx, const void *dcy, void *dcx, const miopenSeqTensorDescriptor_t xDesc, void *dx, const void *w, size_t weightSpaceSize, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward data for recurrent layer.
miopenRNNBiasMode_t
Definition: miopen.h:3770
miopenStatus_t miopenGetRNNLayerBias(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, const void *w, const int biasID, miopenTensorDescriptor_t biasDesc, void *layerBias)
Gets a bias for a specific layer in an RNN stack.
miopenStatus_t miopenRNNBackwardWeights(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, const void *x, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t *yDesc, const void *y, const miopenTensorDescriptor_t dwDesc, void *dw, void *workSpace, size_t workSpaceNumBytes, const void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward weights for recurrent layer.
miopenStatus_t miopenGetRNNTrainingReserveSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Query the amount of memory required for RNN training.
miopenStatus_t miopenGetRNNLayerBiasSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, const int biasID, size_t *numBytes)
Gets the number of bytes of a bias.
miopenStatus_t miopenSetRNNDescriptor(miopenRNNDescriptor_t rnnDesc, const int hsize, const int nlayers, miopenRNNInputMode_t inMode, miopenRNNDirectionMode_t direction, miopenRNNMode_t rnnMode, miopenRNNBiasMode_t biasMode, miopenRNNAlgo_t algo, miopenDataType_t dataType)
Set the details of the RNN descriptor.
miopenRNNBaseLayout_t
Definition: miopen.h:3805
miopenStatus_t miopenRNNBackwardData(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *yDesc, const void *y, const miopenTensorDescriptor_t *dyDesc, const void *dy, const miopenTensorDescriptor_t dhyDesc, const void *dhy, const miopenTensorDescriptor_t dcyDesc, const void *dcy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t cxDesc, const void *cx, const miopenTensorDescriptor_t *dxDesc, void *dx, const miopenTensorDescriptor_t dhxDesc, void *dhx, const miopenTensorDescriptor_t dcxDesc, void *dcx, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward data for recurrent layer.
miopenStatus_t miopenGetRNNDescriptor(miopenRNNDescriptor_t rnnDesc, miopenRNNMode_t *rnnMode, miopenRNNAlgo_t *algoMode, miopenRNNInputMode_t *inputMode, miopenRNNDirectionMode_t *dirMode, miopenRNNBiasMode_t *biasMode, int *hiddenSize, int *layer)
Retrieves a RNN layer descriptor's details.
miopenRNNAlgo_t
Definition: miopen.h:3750
miopenStatus_t miopenGetRNNTempSpaceSizes(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, miopenSeqTensorDescriptor_t xDesc, miopenRNNFWDMode_t fwdMode, size_t *workSpaceSize, size_t *reserveSpaceSize)
Query the amount of additional memory required for this RNN layer execution.
miopenStatus_t miopenGetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc, miopenRNNPaddingMode_t *paddingMode)
This function retrieves the RNN padding mode from the RNN descriptor.
miopenStatus_t miopenRNNForward(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, miopenRNNFWDMode_t fwdMode, const miopenSeqTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t hDesc, const void *hx, void *hy, const miopenTensorDescriptor_t cDesc, const void *cx, void *cy, const miopenSeqTensorDescriptor_t yDesc, void *y, const void *w, size_t weightSpaceSize, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute forward training for recurrent layer.
miopenStatus_t miopenGetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc, miopenDataType_t *dataType, miopenRNNBaseLayout_t *layout, int *maxSequenceLen, int *batchSize, int *vectorSize, int sequenceLenArrayLimit, int *sequenceLenArray, void *paddingMarker)
Get shape of RNN seqData tensor.
miopenStatus_t miopenGetRNNInputTensorSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int seqLen, miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Obtain a the size in bytes of the RNN input tensor.
miopenRNNFWDMode_t
Definition: miopen.h:3796
miopenStatus_t miopenSetRNNLayerParam(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, void *w, const int paramID, miopenTensorDescriptor_t paramDesc, const void *layerParam)
Sets a weight matrix for a specific layer in an RNN stack.
miopenStatus_t miopenGetRNNLayerParamSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, const int paramID, size_t *numBytes)
Gets the number of bytes of a parameter matrix.
miopenStatus_t miopenCreateRNNDescriptor(miopenRNNDescriptor_t *rnnDesc)
Create a RNN layer Descriptor.
miopenRNNGEMMalgoMode_t
Definition: miopen.h:3779
miopenStatus_t miopenGetRNNLayerParam(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, const void *w, const int paramID, miopenTensorDescriptor_t paramDesc, void *layerParam)
Gets a weight matrix for a specific layer in an RNN stack.
miopenStatus_t miopenGetRNNWorkspaceSize(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Query the amount of memory required to execute the RNN layer.
miopenStatus_t miopenSetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc, miopenDataType_t dataType, miopenRNNBaseLayout_t layout, int maxSequenceLen, int batchSize, int vectorSize, const int *sequenceLenArray, void *paddingMarker)
Set shape of RNN seqData tensor.
miopenStatus_t miopenGetRNNParamsDescriptor(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, miopenDataType_t dtype)
Obtain a weight tensor descriptor for RNNs.
miopenStatus_t miopenRNNForwardTraining(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, const void *x, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t cxDesc, const void *cx, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t *yDesc, void *y, const miopenTensorDescriptor_t hyDesc, void *hy, const miopenTensorDescriptor_t cyDesc, void *cy, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute forward training for recurrent layer.
miopenRNNPaddingMode_t
Definition: miopen.h:3787
miopenStatus_t miopenSetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc, const int hsize, const int nlayers, miopenDropoutDescriptor_t dropoutDesc, miopenRNNInputMode_t inMode, miopenRNNDirectionMode_t direction, miopenRNNMode_t rnnMode, miopenRNNBiasMode_t biasMode, miopenRNNAlgo_t algo, miopenDataType_t dataType)
Set the details of the RNN descriptor version 2. This version enables the use of dropout in rnn.
miopenStatus_t miopenDestroyRNNDescriptor(miopenRNNDescriptor_t rnnDesc)
Destroys the tensor descriptor object.
miopenStatus_t miopenGetRNNHiddenTensorSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int seqLen, miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Obtain a the size in bytes of the RNN hidden tensor.
miopenStatus_t miopenSetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc, miopenRNNPaddingMode_t paddingMode)
Sets a bias for a specific layer in an RNN stack.
miopenStatus_t miopenRNNForwardInference(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, const void *x, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t cxDesc, const void *cx, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t *yDesc, void *y, const miopenTensorDescriptor_t hyDesc, void *hy, const miopenTensorDescriptor_t cyDesc, void *cy, void *workSpace, size_t workSpaceNumBytes)
Execute forward inference for RNN layer.
@ miopenRNNTANH
Definition: miopen.h:3732
@ miopenLSTM
Definition: miopen.h:3733
@ miopenGRU
Definition: miopen.h:3734
@ miopenRNNRELU
Definition: miopen.h:3731
@ miopenRNNlinear
Definition: miopen.h:3742
@ miopenRNNskip
Definition: miopen.h:3743
@ miopenRNNbidirection
Definition: miopen.h:3763
@ miopenRNNunidirection
Definition: miopen.h:3762
@ miopenRNNwithBias
Definition: miopen.h:3772
@ miopenRNNNoBias
Definition: miopen.h:3771
@ miopenRNNDataSeqMajorPadded
Definition: miopen.h:3808
@ miopenRNNDataSeqMajorNotPadded
Definition: miopen.h:3807
@ miopenRNNDataBatchMajorPadded
Definition: miopen.h:3809
@ miopenRNNDataUnknownLayout
Definition: miopen.h:3806
@ miopenRNNfundamental
Definition: miopen.h:3753
@ miopenRNNdefault
Definition: miopen.h:3751
@ miopenRNNTraining
Definition: miopen.h:3797
@ miopenRNNInference
Definition: miopen.h:3798
@ miopenRNNAlgoGEMM
Definition: miopen.h:3780
@ miopenRNNIOWithPadding
Definition: miopen.h:3789
@ miopenRNNIONotPadded
Definition: miopen.h:3788
miopenStatus_t miopenGetPReLUBackwardWorkspaceSize(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, miopenTensorDescriptor_t weightDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the PReLU backward call.
miopenStatus_t miopenPReLUBackward(miopenHandle_t handle, void *workspace, size_t workspaceSizeInBytes, miopenTensorDescriptor_t inputDesc, const void *input, miopenTensorDescriptor_t weightDesc, const void *weight, miopenTensorDescriptor_t doutputDesc, const void *doutput, miopenTensorDescriptor_t dinputDesc, void *dinput, miopenTensorDescriptor_t dweightDesc, void *dweight)
Execute a PReLU backward layer.
miopenStatus_t miopenReduceExtremeForward(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const void *x, const int32_t dim, const miopenReduceExtremeOp_t reduceExtremeOp, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t indiceDesc, void *indice)
Find the the extreme (minimum, maximum) value and index of a tensor across Dimension.
miopenReduceExtremeOp_t
Definition: miopen.h:6167
miopenStatus_t miopenRoPEBackward(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t cosDesc, const void *cos, const miopenTensorDescriptor_t sinDesc, const void *sin, const miopenTensorDescriptor_t dxDesc, void *dx)
Execute a rope backward layer.
miopenStatus_t miopenRoPEForward(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t cosDesc, const void *cos, const miopenTensorDescriptor_t sinDesc, const void *sin, const miopenTensorDescriptor_t yDesc, void *y)
Execute a rope forward layer.
miopenStatus_t miopenFusedAdam(miopenHandle_t handle, const miopenTensorDescriptor_t paramDesc, void *param, const miopenTensorDescriptor_t gradDesc, const void *grad, const miopenTensorDescriptor_t expAvgDesc, void *expAvg, const miopenTensorDescriptor_t expAvgSqDesc, void *expAvgSq, const miopenTensorDescriptor_t maxExpAvgSqDesc, void *maxExpAvgSq, const miopenTensorDescriptor_t stateStepDesc, void *stateStep, const unsigned int state_step, const float lr, const float beta1, const float beta2, const float weight_decay, const float eps, const bool amsgrad, const bool maximize, const bool adamw, const miopenTensorDescriptor_t gradScaleDesc, const void *gradScale, const miopenTensorDescriptor_t foundInfDesc, const void *foundInf)
Perform Fused Adam optimization for a single tensor (Adaptive Moment Estimation).
miopenStatus_t miopenTransformersAdamW(miopenHandle_t handle, const miopenTensorDescriptor_t paramDesc, void *param, const miopenTensorDescriptor_t gradDesc, const void *grad, const miopenTensorDescriptor_t expAvgDesc, void *expAvg, const miopenTensorDescriptor_t expAvgSqDesc, void *expAvgSq, const miopenTensorDescriptor_t stateStepDesc, void *stateStep, const unsigned int state_step, const float lr, const float beta1, const float beta2, const float weight_decay, const float eps, const bool correct_bias, const miopenTensorDescriptor_t gradScaleDesc, const void *gradScale, const miopenTensorDescriptor_t foundInfDesc, const void *foundInf)
Implements Adam algorithm with weight decay fix as introduced in Decoupled Weight Decay Regularizatio...
miopenStatus_t miopenFusedAdamWithOutput(miopenHandle_t handle, const miopenTensorDescriptor_t paramInDesc, void *paramIn, const miopenTensorDescriptor_t paramOutDesc, void *paramOut, const miopenTensorDescriptor_t paramOutFloat16Desc, void *paramOutFloat16, const miopenTensorDescriptor_t gradInDesc, const void *gradIn, const miopenTensorDescriptor_t expAvgInDesc, void *expAvgIn, const miopenTensorDescriptor_t expAvgOutDesc, void *expAvgOut, const miopenTensorDescriptor_t expAvgSqInDesc, void *expAvgSqIn, const miopenTensorDescriptor_t expAvgSqOutDesc, void *expAvgSqOut, const miopenTensorDescriptor_t maxExpAvgSqInDesc, void *maxExpAvgSqIn, const miopenTensorDescriptor_t maxExpAvgSqOutDesc, void *maxExpAvgSqOut, const miopenTensorDescriptor_t stateStepInDesc, void *stateStepIn, const miopenTensorDescriptor_t stateStepOutDesc, void *stateStepOut, const unsigned int state_step, const float lr, const float beta1, const float beta2, const float weight_decay, const float eps, const bool amsgrad, const bool maximize, const bool adamw, const miopenTensorDescriptor_t gradScaleDesc, const void *gradScale, const miopenTensorDescriptor_t foundInfDesc, const void *foundInf)
Execute single tensor Adam optimization and receive the result in a separate output tensor.
miopenStatus_t miopenTransformersAdamWWithOutput(miopenHandle_t handle, const miopenTensorDescriptor_t paramInDesc, void *paramIn, const miopenTensorDescriptor_t paramOutDesc, void *paramOut, const miopenTensorDescriptor_t paramOutFloat16Desc, void *paramOutFloat16, const miopenTensorDescriptor_t gradInDesc, const void *gradIn, const miopenTensorDescriptor_t expAvgInDesc, void *expAvgIn, const miopenTensorDescriptor_t expAvgOutDesc, void *expAvgOut, const miopenTensorDescriptor_t expAvgSqInDesc, void *expAvgSqIn, const miopenTensorDescriptor_t expAvgSqOutDesc, void *expAvgSqOut, const miopenTensorDescriptor_t stateStepInDesc, void *stateStepIn, const miopenTensorDescriptor_t stateStepOutDesc, void *stateStepOut, const unsigned int state_step, const float lr, const float beta1, const float beta2, const float weight_decay, const float eps, const float step_size, const bool correct_bias, const miopenTensorDescriptor_t gradScaleDesc, const void *gradScale, const miopenTensorDescriptor_t foundInfDesc, const void *foundInf)
Execute single tensor Adam optimization and receive the result in a separate output tensor.
miopenReduceTensorIndices_t
Definition: miopen.h:607
miopenStatus_t miopenSetReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc, miopenReduceTensorOp_t reduceTensorOp, miopenDataType_t reduceTensorCompType, miopenNanPropagation_t reduceTensorNanOpt, miopenReduceTensorIndices_t reduceTensorIndices, miopenIndicesType_t reduceTensorIndicesType)
Initialize a ReduceTensor descriptor object.
miopenStatus_t miopenCreateReduceTensorDescriptor(miopenReduceTensorDescriptor_t *reduceTensorDesc)
Creates the ReduceTensor descriptor object.
miopenReduceTensorOp_t
Definition: miopen.h:572
miopenIndicesType_t
Definition: miopen.h:617
miopenStatus_t miopenReduceTensor(miopenHandle_t handle, const miopenReduceTensorDescriptor_t reduceTensorDesc, void *indices, size_t indicesSizeInBytes, void *workspace, size_t workspaceSizeInBytes, const void *alpha, const miopenTensorDescriptor_t aDesc, const void *A, const void *beta, const miopenTensorDescriptor_t cDesc, void *C)
TensorReduce function doing reduction on tensor A by implementing C = alpha * reduceOp(A)
miopenStatus_t miopenGetReductionIndicesSize(miopenHandle_t handle, const miopenReduceTensorDescriptor_t reduceTensorDesc, const miopenTensorDescriptor_t aDesc, const miopenTensorDescriptor_t cDesc, size_t *sizeInBytes)
Helper function to query the minimum index space size required by the ReduceTensor call.
miopenStatus_t miopenDestroyReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc)
Destroy the ReduceTensor descriptor object.
miopenStatus_t miopenGetReductionWorkspaceSize(miopenHandle_t handle, const miopenReduceTensorDescriptor_t reduceTensorDesc, const miopenTensorDescriptor_t aDesc, const miopenTensorDescriptor_t cDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the ReduceTensor call.
miopenStatus_t miopenGetReduceTensorDescriptor(const miopenReduceTensorDescriptor_t reduceTensorDesc, miopenReduceTensorOp_t *reduceTensorOp, miopenDataType_t *reduceTensorCompType, miopenNanPropagation_t *reduceTensorNanOpt, miopenReduceTensorIndices_t *reduceTensorIndices, miopenIndicesType_t *reduceTensorIndicesType)
Query a ReduceTensor descriptor object.
miopenStatus_t miopenActivationForward(miopenHandle_t handle, const miopenActivationDescriptor_t activDesc, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Execute an activation forward layer.
miopenStatus_t miopenGLUBackward(miopenHandle_t handle, const miopenTensorDescriptor_t inputDesc, const void *input, const miopenTensorDescriptor_t outputGradDesc, const void *outputGrad, const miopenTensorDescriptor_t inputGradDesc, void *inputGrad, const uint32_t dim)
Execute a GLU backward layer.
miopenStatus_t miopenActivationBackward(miopenHandle_t handle, const miopenActivationDescriptor_t activDesc, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx)
Execute a activation backwards layer.
miopenActivationMode_t
Definition: miopen.h:519
miopenStatus_t miopenSetActivationDescriptor(const miopenActivationDescriptor_t activDesc, miopenActivationMode_t mode, double activAlpha, double activBeta, double activGamma)
Sets the activation layer descriptor details.
miopenStatus_t miopenCreateActivationDescriptor(miopenActivationDescriptor_t *activDesc)
Creates the Activation descriptor object.
miopenStatus_t miopenGetActivationDescriptor(const miopenActivationDescriptor_t activDesc, miopenActivationMode_t *mode, double *activAlpha, double *activBeta, double *activGamma)
Gets the activation layer descriptor details.
miopenStatus_t miopenGLUForward(miopenHandle_t handle, const miopenTensorDescriptor_t inputDesc, const void *input, const miopenTensorDescriptor_t outputDesc, void *output, const uint32_t dim)
Execute a GLU forward layer.
miopenStatus_t miopenDestroyActivationDescriptor(miopenActivationDescriptor_t activDesc)
Destroys the activation descriptor object.
miopenStatus_t miopenBatchNormalizationForwardInference(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, void *alpha, void *beta, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc, void *bnScale, void *bnBias, void *estimatedMean, void *estimatedVariance, double epsilon)
Execute forward inference layer for batch normalization.
miopenStatus_t miopenBatchNormalizationForwardInference_V2(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, void *alpha, void *beta, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t scaleDesc, const miopenTensorDescriptor_t biasDesc, const miopenTensorDescriptor_t estMeanDesc, const miopenTensorDescriptor_t estVarianceDesc, void *bnScale, void *bnBias, void *estimatedMean, void *estimatedVariance, double epsilon)
Execute forward inference layer for batch normalization.
miopenStatus_t miopenBatchNormalizationForwardTraining(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, void *alpha, void *beta, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc, void *bnScale, void *bnBias, double expAvgFactor, void *resultRunningMean, void *resultRunningVariance, double epsilon, void *resultSaveMean, void *resultSaveInvVariance)
Execute forward training layer for batch normalization.
miopenStatus_t miopenBatchNormalizationForwardTraining_V2(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, void *alpha, void *beta, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t scaleDesc, const miopenTensorDescriptor_t biasVarDesc, const miopenTensorDescriptor_t savedMeanDesc, const miopenTensorDescriptor_t savedVarDesc, void *bnScale, void *bnBias, double expAvgFactor, void *resultRunningMean, void *resultRunningVariance, double epsilon, void *resultSaveMean, void *resultSaveInvVariance)
Execute forward training layer for batch normalization.
miopenStatus_t miopenBatchNormalizationBackward_V2(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, const void *alphaDataDiff, const void *betaDataDiff, const void *alphaParamDiff, const void *betaParamDiff, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t dxDesc, void *dx, const miopenTensorDescriptor_t scaleDesc, const miopenTensorDescriptor_t biasDesc, const miopenTensorDescriptor_t savedMeanDesc, const miopenTensorDescriptor_t savedVarDesc, const void *bnScale, void *resultBnScaleDiff, void *resultBnBiasDiff, double epsilon, const void *savedMean, const void *savedInvVariance)
Execute backwards propagation layer for batch normalization.
miopenStatus_t miopenBatchNormalizationBackward(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, const void *alphaDataDiff, const void *betaDataDiff, const void *alphaParamDiff, const void *betaParamDiff, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t dxDesc, void *dx, const miopenTensorDescriptor_t bnScaleBiasDiffDesc, const void *bnScale, void *resultBnScaleDiff, void *resultBnBiasDiff, double epsilon, const void *savedMean, const void *savedInvVariance)
Execute backwards propagation layer for batch normalization.
miopenBatchNormMode_t
Definition: miopen.h:509
miopenStatus_t miopenDeriveBNTensorDescriptor(miopenTensorDescriptor_t derivedBnDesc, const miopenTensorDescriptor_t xDesc, miopenBatchNormMode_t bn_mode)
Derive tensor for gamma and beta from input tensor descriptor.
miopenStatus_t miopenCatForward(miopenHandle_t handle, const int32_t xCount, const miopenTensorDescriptor_t *xDescs, const void *const *xs, const miopenTensorDescriptor_t yDesc, void *y, const int32_t dim)
Execute a cat forward layer.
miopenStatus_t miopenInitConvolutionNdDescriptor(miopenConvolutionDescriptor_t convDesc, int spatialDim, const int *padA, const int *strideA, const int *dilationA, miopenConvolutionMode_t c_mode)
Creates a N-dimensional convolution layer descriptor.
miopenStatus_t miopenConvolutionForwardImmediate(miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, void *y, void *workSpace, size_t workSpaceSize, const uint64_t solution_id)
Executes the Forward convolution operation based on the provided solution ID.
miopenStatus_t miopenConvolutionBackwardDataCompileSolution(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, const uint64_t solution_id)
Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionBac...
miopenStatus_t miopenConvolutionForwardGetSolutionWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, const uint64_t solution_id, size_t *workSpaceSize)
Returns the workspace size required for a particular solution id.
miopenStatus_t miopenConvolutionForward(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, miopenConvFwdAlgorithm_t algo, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, void *workSpace, size_t workSpaceSize)
Execute a forward convolution layer.
miopenStatus_t miopenGetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc, int *groupCount)
Get the number of groups to be used in Group/Depthwise convolution.
miopenStatus_t miopenInitConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc, miopenConvolutionMode_t c_mode, int pad_h, int pad_w, int stride_h, int stride_w, int dilation_h, int dilation_w)
Creates a 2-D convolution layer descriptor.
miopenConvAlgorithm_t
Definition: miopen.h:1214
miopenStatus_t miopenConvolutionBackwardData(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, miopenConvBwdDataAlgorithm_t algo, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, void *workSpace, size_t workSpaceSize)
Execute a backward data convolution layer.
miopenStatus_t miopenGetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc, const miopenConvolutionAttrib_t attr, int *value)
Get the attribute of the convolution descriptor.
miopenStatus_t miopenGetConvolutionNdForwardOutputDim(miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t inputTensorDesc, const miopenTensorDescriptor_t filterDesc, int *nDim, int *outputTensorDimA)
Get the shape of a resulting N-dimensional tensor from a (N-2)-dimensional convolution.
miopenStatus_t miopenConvolutionBackwardWeightsCompileSolution(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, const uint64_t solution_id)
Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionBac...
miopenStatus_t miopenFindConvolutionBackwardWeightsAlgorithm(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, void *dw, const int requestAlgoCount, int *returnedAlgoCount, miopenConvAlgoPerf_t *perfResults, void *workSpace, size_t workSpaceSize, bool exhaustiveSearch)
Search and run the backwards weights convolutional algorithms and return a list of kernel times.
miopenStatus_t miopenGetConvolutionForwardOutputDim(miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t inputTensorDesc, const miopenTensorDescriptor_t filterDesc, int *n, int *c, int *h, int *w)
Get the shape of a resulting 4-D tensor from a 2-D convolution.
miopenConvFwdAlgorithm_t
Definition: miopen.h:1177
miopenStatus_t miopenConvolutionForwardGetWorkSpaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Query the workspace size required for a forward convolution algorithm.
miopenStatus_t miopenCreateConvolutionDescriptor(miopenConvolutionDescriptor_t *convDesc)
Creates a convolution layer descriptor.
miopenStatus_t miopenConvolutionBackwardWeightsGetSolution(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, const size_t maxSolutionCount, size_t *solutionCount, miopenConvSolution_t *solutions)
Query the applicable solutions for a backward convolution w-r-t weights as described by input,...
miopenStatus_t miopenGetConvolutionNdDescriptor(miopenConvolutionDescriptor_t convDesc, int requestedSpatialDim, int *spatialDim, int *padA, int *strideA, int *dilationA, miopenConvolutionMode_t *c_mode)
Retrieves a N-dimensional convolution layer descriptor's details.
miopenConvBwdDataAlgorithm_t
Definition: miopen.h:1200
miopenConvolutionAttrib_t
Definition: miopen.h:629
miopenStatus_t miopenConvolutionBackwardWeightsGetWorkSpaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, size_t *workSpaceSize)
Get the GPU memory required for the backward weights convolution algorithm.
miopenStatus_t miopenConvolutionBackwardWeightsImmediate(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, void *dw, void *workSpace, size_t workSpaceSize, const uint64_t solution_id)
Executes the Backward convolution w-r-t weights operation based on the provided solution ID.
miopenStatus_t miopenFindConvolutionBackwardDataAlgorithm(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, void *dx, const int requestAlgoCount, int *returnedAlgoCount, miopenConvAlgoPerf_t *perfResults, void *workSpace, size_t workSpaceSize, bool exhaustiveSearch)
Search and run the backwards data convolution algorithms and return a list of kernel times.
miopenStatus_t miopenConvolutionBackwardDataGetSolution(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, const size_t maxSolutionCount, size_t *solutionCount, miopenConvSolution_t *solutions)
Query the applicable solutions for a backward convolution w-r-t data as described by input,...
miopenStatus_t miopenConvolutionForwardBias(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t bDesc, const void *b, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Calculate element-wise scale and shift of a tensor via a bias tensor.
miopenConvolutionMode_t
Definition: miopen.h:434
miopenStatus_t miopenSetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc, const miopenConvolutionAttrib_t attr, int value)
Set the attribute of the convolution descriptor.
miopenStatus_t miopenConvolutionBackwardDataImmediate(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, void *dx, void *workSpace, size_t workSpaceSize, const uint64_t solution_id)
Executes the Backward convolution w-r-t data operation based on the provided solution ID.
miopenStatus_t miopenSetTransposeConvNdOutputPadding(miopenConvolutionDescriptor_t convDesc, int spatialDim, const int *adjA)
Set the output padding to be used in N-dimensional Transpose convolution.
miopenStatus_t miopenSetTransposeConvOutputPadding(miopenConvolutionDescriptor_t convDesc, int adj_h, int adj_w)
Set the output padding to be used in 2-D Transpose convolution.
miopenStatus_t miopenGetConvolutionSpatialDim(miopenConvolutionDescriptor_t convDesc, int *spatialDim)
Retrieves the spatial dimension of a convolution layer descriptor.
miopenConvBwdWeightsAlgorithm_t
Definition: miopen.h:1189
miopenStatus_t miopenConvolutionForwardCompileSolution(miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, const uint64_t solution_id)
Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionFor...
miopenStatus_t miopenConvolutionBackwardDataGetSolutionCount(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, size_t *solutionCount)
Query the maximum number of solutions applicable for the given input/output and weights tensor descri...
miopenStatus_t miopenConvolutionBackwardWeights(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, miopenConvBwdWeightsAlgorithm_t algo, const void *beta, const miopenTensorDescriptor_t dwDesc, void *dw, void *workSpace, size_t workSpaceSize)
Execute a backward weights convolution layer.
miopenStatus_t miopenConvolutionBackwardDataGetWorkSpaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, size_t *workSpaceSize)
Query the workspace size required for a backward data convolution algorithm.
miopenStatus_t miopenFindConvolutionForwardAlgorithm(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, void *y, const int requestAlgoCount, int *returnedAlgoCount, miopenConvAlgoPerf_t *perfResults, void *workSpace, size_t workSpaceSize, bool exhaustiveSearch)
Search and run the forward convolutional algorithms and return a list of kernel times.
miopenStatus_t miopenDestroyConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc)
Destroys the tensor descriptor object.
miopenStatus_t miopenConvolutionBackwardWeightsGetSolutionCount(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, size_t *solutionCount)
Query the maximum number of solutions applicable for the given input/output and weights tensor descri...
miopenStatus_t miopenSetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc, int groupCount)
Set the number of groups to be used in Group/Depthwise convolution.
miopenStatus_t miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, const uint64_t solution_id, size_t *workSpaceSize)
Returns the workspace size required for a particular solution id.
miopenStatus_t miopenConvolutionForwardGetSolution(miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, const size_t maxSolutionCount, size_t *solutionCount, miopenConvSolution_t *solutions)
Query the applicable solutions for a convolution configuration described by input,...
miopenStatus_t miopenGetConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc, miopenConvolutionMode_t *c_mode, int *pad_h, int *pad_w, int *stride_h, int *stride_w, int *dilation_h, int *dilation_w)
Retrieves a 2-D convolution layer descriptor's details.
miopenStatus_t miopenConvolutionForwardGetSolutionCount(miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, size_t *solutionCount)
Query the maximum number of solutions applicable for the given input/output and weights tensor descri...
miopenStatus_t miopenConvolutionBackwardDataGetSolutionWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, const uint64_t solution_id, size_t *workSpaceSize)
Returns the workspace size required for a particular solution id.
miopenStatus_t miopenConvolutionBackwardBias(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t dyDesc, const void *dy, const void *beta, const miopenTensorDescriptor_t dbDesc, void *db)
Calculates the gradient with respect to the bias.
@ miopenConvolutionAlgoDirect
Definition: miopen.h:1216
@ miopenConvolutionAlgoWinograd
Definition: miopen.h:1218
@ miopenConvolutionAlgoFFT
Definition: miopen.h:1217
@ miopenConvolutionAlgoImplicitGEMM
Definition: miopen.h:1219
@ miopenConvolutionAlgoGEMM
Definition: miopen.h:1215
@ miopenConvolutionFwdAlgoFFT
Definition: miopen.h:1180
@ miopenConvolutionFwdAlgoImplicitGEMM
Definition: miopen.h:1182
@ miopenConvolutionFwdAlgoGEMM
Definition: miopen.h:1178
@ miopenConvolutionFwdAlgoWinograd
Definition: miopen.h:1181
@ miopenConvolutionFwdAlgoDirect
Definition: miopen.h:1179
@ miopenTransposeBwdDataAlgoGEMM
Definition: miopen.h:1205
@ miopenConvolutionBwdDataAlgoDirect
Definition: miopen.h:1202
@ miopenConvolutionBwdDataAlgoGEMM
Definition: miopen.h:1201
@ miopenConvolutionBwdDataAlgoFFT
Definition: miopen.h:1203
@ miopenConvolutionBwdDataAlgoWinograd
Definition: miopen.h:1204
@ miopenConvolutionBwdDataAlgoImplicitGEMM
Definition: miopen.h:1207
@ miopenConvolutionBwdWeightsAlgoGEMM
Definition: miopen.h:1190
@ miopenConvolutionBwdWeightsAlgoWinograd
Definition: miopen.h:1192
@ miopenConvolutionBwdWeightsAlgoDirect
Definition: miopen.h:1191
@ miopenConvolutionBwdWeightsAlgoImplicitGEMM
Definition: miopen.h:1193
miopenStatus_t miopenDestroyDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc)
Destroys the dropout descriptor object.
miopenRNGType_t
Definition: miopen.h:5243
miopenStatus_t miopenDropoutGetStatesSize(miopenHandle_t handle, size_t *stateSizeInBytes)
Query the amount of memory required to store the states of the random number generators.
miopenStatus_t miopenDropoutGetReserveSpaceSize(const miopenTensorDescriptor_t xDesc, size_t *reserveSpaceSizeInBytes)
Query the amount of memory required to run dropout.
miopenStatus_t miopenDropoutForward(miopenHandle_t handle, const miopenDropoutDescriptor_t dropoutDesc, const miopenTensorDescriptor_t noise_shape, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, void *reserveSpace, size_t reserveSpaceSizeInBytes)
Execute forward dropout operation.
miopenStatus_t miopenGetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc, miopenHandle_t handle, float *dropout, void **states, unsigned long long *seed, bool *use_mask, bool *state_evo, miopenRNGType_t *rng_mode)
Get the details of the dropout descriptor.
miopenStatus_t miopenCreateDropoutDescriptor(miopenDropoutDescriptor_t *dropoutDesc)
Creates the dropout descriptor object.
miopenStatus_t miopenDropoutBackward(miopenHandle_t handle, const miopenDropoutDescriptor_t dropoutDesc, const miopenTensorDescriptor_t noise_shape, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t dxDesc, void *dx, void *reserveSpace, size_t reserveSpaceSizeInBytes)
Execute backward dropout operation.
miopenStatus_t miopenRestoreDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc, miopenHandle_t handle, float dropout, void *states, size_t stateSizeInBytes, unsigned long long seed, bool use_mask, bool state_evo, miopenRNGType_t rng_mode)
Restore the dropout descriptor to a saved state.
miopenStatus_t miopenSetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc, miopenHandle_t handle, float dropout, void *states, size_t stateSizeInBytes, unsigned long long seed, bool use_mask, bool state_evo, miopenRNGType_t rng_mode)
Initialize the dropout descriptor.
@ MIOPEN_RNG_PSEUDO_XORWOW
Definition: miopen.h:5244
miopenFindResultsOrder_t
Definition: miopen.h:5674
miopenStatus_t miopenGetSolutionSolverId(miopenSolution_t solution, uint64_t *solverId)
Reads id of the solver referred by the solution.
miopenStatus_t miopenSetSoftmaxDescriptor(miopenSoftmaxDescriptor_t softmaxDesc, float alpha, float beta, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode)
Sets the softmax descriptor details.
miopenStatus_t miopenGetSolutionTime(miopenSolution_t solution, float *time)
Reads the time spent to execute the solution the last it was run.
miopenStatus_t miopenGetMhaDescriptor(miopenMhaDescriptor_t mhaDesc, float *scale)
Gets the Mha descriptor details.
miopenMhaMask_t
Initializes a problem object describing a Mha operation.
Definition: miopen.h:5702
miopenStatus_t miopenSetMhaDescriptor(miopenMhaDescriptor_t mhaDesc, float scale)
Sets the Mha descriptor details.
miopenStatus_t miopenSetFindOptionWorkspaceLimit(miopenFindOptions_t options, size_t value)
Sets the workspace limit find option. Default value is maximum of size_t.
miopenStatus_t miopenSetFindOptionPreallocatedTensor(miopenFindOptions_t options, miopenTensorArgumentId_t id, void *buffer)
Attaches a preallocated tensor to find options. If not used, buffers are allocated by MIOpen internal...
miopenStatus_t miopenCreateSoftmaxProblem(miopenProblem_t *problem, miopenSoftmaxDescriptor_t operatorDesc, miopenProblemDirection_t direction)
Initializes a problem object describing a softmax operation.
miopenStatus_t miopenDestroyFindOptions(miopenFindOptions_t options)
Destroys miopenFindOptions object.
miopenStatus_t miopenSetFindOptionAttachBinaries(miopenFindOptions_t options, unsigned attach)
Forces library to attach kernel binaries to solutions for later saving. This allows zero lookup miope...
miopenStatus_t miopenFuseProblems(miopenProblem_t problem1, miopenProblem_t problem2)
miopenStatus_t miopenGetSolutionSize(miopenSolution_t solution, size_t *size)
Reads the expected size of a solution.
miopenTensorArgumentId_t
Definition: miopen.h:5593
miopenStatus_t miopenFindSolutions(miopenHandle_t handle, miopenProblem_t problem, miopenFindOptions_t options, miopenSolution_t *solutions, size_t *numSolutions, size_t maxSolutions)
Finds solutions to a problem by running different applicable solutions. Memory is automatically alloc...
miopenStatus_t miopenSetFindOptionTuning(miopenFindOptions_t options, int value)
Sets the tuning find option. Default value is zero.
miopenStatus_t miopenGetSolutionWorkspaceSize(miopenSolution_t solution, size_t *workspaceSize)
Reads the amount of workspace required to exectute the solution.
miopenStatus_t miopenSetFindOptionResultsOrder(miopenFindOptions_t options, miopenFindResultsOrder_t value)
Sets the results order find option. Default value is miopenFindResultsOrderByTime.
miopenStatus_t miopenRunSolution(miopenHandle_t handle, miopenSolution_t solution, size_t nInputs, const miopenTensorArgument_t *tensors, void *workspace, size_t workspaceSize)
Runs the solution using the passed in buffers.
miopenStatus_t miopenCreateMhaProblem(miopenProblem_t *problem, miopenMhaDescriptor_t operatorDesc, miopenProblemDirection_t direction)
miopenProblemDirection_t
Definition: miopen.h:5580
miopenStatus_t miopenCreateBatchnormProblem(miopenProblem_t *problem, miopenBatchNormMode_t mode, bool runningMeanVariance, miopenProblemDirection_t direction)
Initializes a problem object describing an activation operation.
miopenStatus_t miopenCreateMhaDescriptor(miopenMhaDescriptor_t *mhaDesc)
Creates the mha descriptor object.
miopenStatus_t miopenDestroySolution(miopenSolution_t solution)
Destroys solution object.
miopenStatus_t miopenLoadSolution(miopenSolution_t *solution, const char *data, size_t size)
Loads solution object from binary data.
miopenStatus_t miopenSaveSolution(miopenSolution_t solution, char *data)
Saves a solution object as binary data.
miopenStatus_t miopenGetSolverIdConvAlgorithm(uint64_t solverId, miopenConvAlgorithm_t *result)
Gets the convolution algorithm implemented by a solver.
miopenStatus_t miopenSetFindOptionPreallocatedWorkspace(miopenFindOptions_t options, void *buffer, size_t size)
Attaches the preallocated workspace to find options. Allocated by the library by default.
miopenStatus_t miopenCreateActivationProblem(miopenProblem_t *problem, miopenActivationDescriptor_t operatorDesc, miopenProblemDirection_t direction)
Initializes a problem object describing an activation operation.
miopenStatus_t miopenDestroyProblem(miopenProblem_t problem)
Destroys a problem object.
miopenStatus_t miopenCreateFindOptions(miopenFindOptions_t *options)
Initializes miopenFindOptions object.
miopenStatus_t miopenGetSoftmaxDescriptor(const miopenSoftmaxDescriptor_t softmaxDesc, float *alpha, float *beta, miopenSoftmaxAlgorithm_t *algorithm, miopenSoftmaxMode_t *mode)
Gets the softmax layer descriptor details.
miopenStatus_t miopenCreateConvProblem(miopenProblem_t *problem, miopenConvolutionDescriptor_t operatorDesc, miopenProblemDirection_t direction)
Initializes a problem object describing a convolution operation.
miopenStatus_t miopenCreateBiasProblem(miopenProblem_t *problem, miopenProblemDirection_t direction)
Initializes a problem object describing an bias operation.
miopenStatus_t miopenSetProblemTensorDescriptor(miopenProblem_t problem, miopenTensorArgumentId_t id, const miopenTensorDescriptor_t descriptor)
Sets a tensor descriptor for the specified argument.
miopenStatus_t miopenCreateSoftmaxDescriptor(miopenSoftmaxDescriptor_t *softmaxDesc)
Creates the Softmax descriptor object.
@ miopenFindResultsOrderByWorkspaceSize
Definition: miopen.h:5676
@ miopenFindResultsOrderByTime
Definition: miopen.h:5675
@ miopenMhaMaskCausal
Definition: miopen.h:5704
@ miopenMhaMaskNone
Definition: miopen.h:5703
@ miopenTensorMhaDescaleS
Definition: miopen.h:5605
@ miopenTensorMhaO
Definition: miopen.h:5611
@ miopenTensorMhaAmaxDV
Definition: miopen.h:5629
@ miopenTensorBatchnormScaleDiff
Definition: miopen.h:5652
@ miopenTensorMhaMask
Definition: miopen.h:5663
@ miopenTensorMhaDescaleDS
Definition: miopen.h:5619
@ miopenTensorMhaDropoutSeed
Definition: miopen.h:5609
@ miopenTensorBatchnormSavedMean
Definition: miopen.h:5649
@ miopenTensorActivationDY
Definition: miopen.h:5637
@ miopenTensorBatchnormDX
Definition: miopen.h:5657
@ miopenTensorMhaDescaleV
Definition: miopen.h:5604
@ miopenTensorMhaK
Definition: miopen.h:5599
@ miopenTensorConvolutionX
Definition: miopen.h:5595
@ miopenTensorMhaAmaxDK
Definition: miopen.h:5628
@ miopenTensorMhaScaleDS
Definition: miopen.h:5620
@ miopenTensorBatchnormBias
Definition: miopen.h:5655
@ miopenTensorMhaM
Definition: miopen.h:5614
@ miopenTensorBatchnormRunningMean
Definition: miopen.h:5647
@ miopenTensorMhaDropoutProbability
Definition: miopen.h:5608
@ miopenTensorSoftmaxY
Definition: miopen.h:5642
@ miopenTensorSoftmaxDY
Definition: miopen.h:5644
@ miopenTensorMhaDescaleO
Definition: miopen.h:5617
@ miopenTensorMhaScaleO
Definition: miopen.h:5607
@ miopenScalarBatchnormExpAvgFactor
Definition: miopen.h:5665
@ miopenTensorBatchnormScale
Definition: miopen.h:5651
@ miopenTensorBatchnormRunningVariance
Definition: miopen.h:5648
@ miopenTensorActivationDX
Definition: miopen.h:5636
@ miopenTensorMhaScaleDK
Definition: miopen.h:5622
@ miopenTensorMhaV
Definition: miopen.h:5601
@ miopenTensorMhaAmaxS
Definition: miopen.h:5613
@ miopenTensorBatchnormBiasDiff
Definition: miopen.h:5656
@ miopenTensorBatchnormSavedVariance
Definition: miopen.h:5650
@ miopenTensorActivationX
Definition: miopen.h:5634
@ miopenTensorMhaScaleDV
Definition: miopen.h:5623
@ miopenTensorMhaAmaxO
Definition: miopen.h:5612
@ miopenScalarBatchnormEpsilon
Definition: miopen.h:5666
@ miopenTensorMhaScaleDQ
Definition: miopen.h:5621
@ miopenTensorSoftmaxDX
Definition: miopen.h:5643
@ miopenTensorMhaAmaxDS
Definition: miopen.h:5630
@ miopenTensorMhaDV
Definition: miopen.h:5626
@ miopenTensorMhaQ
Definition: miopen.h:5600
@ miopenTensorMhaAmaxDQ
Definition: miopen.h:5627
@ miopenTensorConvolutionY
Definition: miopen.h:5597
@ miopenTensorBatchnormEstimatedMean
Definition: miopen.h:5653
@ miopenTensorBatchnormDY
Definition: miopen.h:5658
@ miopenTensorMhaZInv
Definition: miopen.h:5615
@ miopenTensorMhaDescaleQ
Definition: miopen.h:5603
@ miopenTensorMhaBias
Definition: miopen.h:5631
@ miopenTensorBatchnormEstimatedVariance
Definition: miopen.h:5654
@ miopenTensorArgumentIsScalar
Definition: miopen.h:5661
@ miopenTensorArgumentIdInvalid
Definition: miopen.h:5594
@ miopenTensorMhaDO
Definition: miopen.h:5616
@ miopenTensorMhaDescaleDO
Definition: miopen.h:5618
@ miopenTensorConvolutionW
Definition: miopen.h:5596
@ miopenTensorMhaDescaleK
Definition: miopen.h:5602
@ miopenTensorMhaDropoutOffset
Definition: miopen.h:5610
@ miopenTensorBiasY
Definition: miopen.h:5639
@ miopenTensorMhaDQ
Definition: miopen.h:5624
@ miopenTensorSoftmaxX
Definition: miopen.h:5641
@ miopenTensorBatchnormY
Definition: miopen.h:5646
@ miopenTensorMhaScaleS
Definition: miopen.h:5606
@ miopenTensorBias
Definition: miopen.h:5640
@ miopenTensorActivationY
Definition: miopen.h:5635
@ miopenTensorBatchnormX
Definition: miopen.h:5645
@ miopenTensorBiasX
Definition: miopen.h:5638
@ miopenTensorMhaDK
Definition: miopen.h:5625
@ miopenProblemDirectionBackwardWeights
Definition: miopen.h:5583
@ miopenProblemDirectionInference
Definition: miopen.h:5585
@ miopenProblemDirectionForward
Definition: miopen.h:5581
@ miopenProblemDirectionBackward
Definition: miopen.h:5582
miopenStatus_t miopenGetGetitemWorkspaceSize(miopenHandle_t handle, uint32_t indexCount, const miopenTensorDescriptor_t *indexDescs, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the getitem call.
miopenStatus_t miopenGetitemBackward(miopenHandle_t handle, void *workspace, size_t workspaceSizeInBytes, const miopenTensorDescriptor_t dyDesc, const void *dy, uint32_t indexCount, const miopenTensorDescriptor_t *indexDescs, const void *const *indexs, const miopenTensorDescriptor_t dxDesc, void *dx, const miopenTensorDescriptor_t errorDesc, void *error, uint32_t dimCount, const int32_t *dims, uint32_t sliceCount, const int32_t *slices, uint32_t offset)
Execute a getitem backward layer.
miopenStatus_t miopenGroupNormForward(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t biasDesc, const void *bias, const uint64_t num_groups, const float epsilon, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t meanDesc, void *mean, const miopenTensorDescriptor_t rstdDesc, void *rstd)
Execute a groupnorm forward layer.
miopenStatus_t miopenCreateWithStream(miopenHandle_t *handle, miopenAcceleratorQueue_t stream)
Create a MIOpen handle with an accelerator stream.
miopenStatus_t miopenDestroy(miopenHandle_t handle)
Destroys the MIOpen handle.
void(* miopenDeallocatorFunction)(void *context, void *memory)
Custom deallocator function.
Definition: miopen.h:158
miopenStatus_t miopenGetStream(miopenHandle_t handle, miopenAcceleratorQueue_t *streamID)
Get the previously created accelerator command queue.
miopenStatus_t miopenEnableProfiling(miopenHandle_t handle, bool enable)
Enable profiling to retrieve kernel time.
miopenStatus_t miopenGetVersion(size_t *major, size_t *minor, size_t *patch)
Method to return version of MIOpen.
miopenStatus_t
Definition: miopen.h:109
miopenStatus_t miopenSetAllocator(miopenHandle_t handle, miopenAllocatorFunction allocator, miopenDeallocatorFunction deallocator, void *allocatorContext)
Set allocator for previously created miopenHandle.
miopenF8RoundingMode_t
Definition: miopen.h:125
void *(* miopenAllocatorFunction)(void *context, size_t sizeBytes)
Custom allocator function.
Definition: miopen.h:148
const char * miopenGetErrorString(miopenStatus_t error)
Get character string for an error code.
miopenStatus_t miopenCreate(miopenHandle_t *handle)
Method to create the MIOpen handle object.
miopenStatus_t miopenGetKernelTime(miopenHandle_t handle, float *time)
Get time for last kernel launched.
miopenStatus_t miopenSetStream(miopenHandle_t handle, miopenAcceleratorQueue_t streamID)
Set accelerator command queue previously created.
@ miopenStatusUnsupportedOp
Definition: miopen.h:118
@ miopenStatusGpuOperationsSkipped
Definition: miopen.h:119
@ miopenStatusUnknownError
Definition: miopen.h:117
@ miopenStatusSuccess
Definition: miopen.h:110
@ miopenStatusVersionMismatch
Definition: miopen.h:120
@ miopenStatusAllocFailed
Definition: miopen.h:114
@ miopenStatusNotImplemented
Definition: miopen.h:116
@ miopenStatusBadParm
Definition: miopen.h:113
@ miopenStatusNotInitialized
Definition: miopen.h:111
@ miopenStatusInternalError
Definition: miopen.h:115
@ miopenStatusInvalidValue
Definition: miopen.h:112
@ miopenF8RoundingModeStandard
Definition: miopen.h:126
@ miopenF8RoundingModeStochastic
Definition: miopen.h:127
miopenStatus_t miopenKthvalueForward(miopenHandle_t handle, miopenTensorDescriptor_t inputDesc, const void *input, miopenTensorDescriptor_t outputDesc, void *output, miopenTensorDescriptor_t indicesDesc, size_t *indices, size_t k, int32_t dim=-1, bool keepDim=false)
Execute a Kthvalue forward layer.
miopenStatus_t miopenLayerNormForward(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t biasDesc, const void *bias, const float epsilon, const int32_t normalized_dim, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t meanDesc, void *mean, const miopenTensorDescriptor_t rstdDesc, void *rstd)
Execute a layernorm forward layer.
miopenStatus_t miopenT5LayerNormBackward(miopenHandle_t handle, miopenNormMode_t mode, void *workspace, size_t workspaceSizeInBytes, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t rstdDesc, const void *rstd, const miopenTensorDescriptor_t dxDesc, void *dx, const miopenTensorDescriptor_t dwDesc, void *dw)
Execute a T5layernorm backward layer.
miopenStatus_t miopenT5LayerNormForward(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const float epsilon, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t rstdDesc, void *rstd)
Execute a T5layernorm forward layer.
miopenNormMode_t
Definition: miopen.h:490
miopenStatus_t miopenGetT5LayerNormBackwardWorkspaceSize(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenTensorDescriptor_t weightDesc, const miopenTensorDescriptor_t rstdDesc, const miopenTensorDescriptor_t dxDesc, const miopenTensorDescriptor_t dwDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the T5layernorm backward call.
miopenStatus_t miopenAddLayerNormForward(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t x2Desc, const void *x2, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t biasDesc, const void *bias, const float epsilon, const int32_t normalized_dim, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t meanDesc, void *mean, const miopenTensorDescriptor_t rstdDesc, void *rstd)
Execute a add and layernorm forward layer.
miopenStatus_t miopenSet2dPoolingDescriptor(miopenPoolingDescriptor_t poolDesc, miopenPoolingMode_t mode, int windowHeight, int windowWidth, int pad_h, int pad_w, int stride_h, int stride_w)
Sets a 2-D pooling layer descriptor details.
miopenStatus_t miopenSetPoolingWorkSpaceIndexMode(miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t workspace_index)
Set workspace index mode for pooling layer. The default mode is miopenPoolingWorkSpaceIndexMask.
miopenStatus_t miopenGetPoolingForwardOutputDim(const miopenPoolingDescriptor_t poolDesc, const miopenTensorDescriptor_t tensorDesc, int *n, int *c, int *h, int *w)
Gets the shape of the output tensor for 2-D pooling.
miopenStatus_t miopenPoolingGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Get the amount of GPU memory required for pooling.
miopenStatus_t miopenSetNdPoolingDescriptor(miopenPoolingDescriptor_t poolDesc, const miopenPoolingMode_t mode, int nbDims, const int *windowDimA, const int *padA, const int *stridesA)
Set details of a N-D pooling layer descriptor.
miopenStatus_t miopenPoolingForward(miopenHandle_t handle, const miopenPoolingDescriptor_t poolDesc, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, bool do_backward, void *workSpace, size_t workSpaceSize)
Execute a forward pooling layer.
miopenPoolingMode_t
Definition: miopen.h:457
miopenStatus_t miopenPoolingGetWorkSpaceSizeV2(const miopenPoolingDescriptor_t poolDesc, const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Get the amount of GPU memory required for pooling.
miopenStatus_t miopenGetPoolingWorkSpaceIndexMode(miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t *workspace_index)
Get workspace index mode for pooling layer.
miopenIndexType_t
Definition: miopen.h:410
miopenStatus_t miopenGetPoolingIndexType(miopenPoolingDescriptor_t poolDesc, miopenIndexType_t *index_type)
Get the index data type for pooling layer. The index type to any of the miopenIndexType_t sizes; 8,...
miopenPoolingWorkspaceIndexMode_t
Definition: miopen.h:470
miopenStatus_t miopenGetPoolingNdForwardOutputDim(const miopenPoolingDescriptor_t poolDesc, const miopenTensorDescriptor_t tensorDesc, int dims, int *tensorDimArr)
Gets the shape of the output tensor for N-D pooling.
miopenStatus_t miopenGetNdPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc, int nbDimsRequested, miopenPoolingMode_t *mode, int *nbDims, int *windowDimA, int *padA, int *stridesA)
Get details of a N-D pooling layer descriptor.
miopenStatus_t miopenCreatePoolingDescriptor(miopenPoolingDescriptor_t *poolDesc)
Creates a pooling layer descriptor.
miopenStatus_t miopenSetPoolingIndexType(miopenPoolingDescriptor_t poolDesc, miopenIndexType_t index_type)
Set index data type for pooling layer. The default indexing type is uint8_t. Users can set the index ...
miopenStatus_t miopenGet2dPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc, miopenPoolingMode_t *mode, int *windowHeight, int *windowWidth, int *pad_h, int *pad_w, int *stride_h, int *stride_w)
Gets a 2-D pooling layer descriptor details.
miopenStatus_t miopenDestroyPoolingDescriptor(miopenPoolingDescriptor_t poolDesc)
Destroys the pooling descriptor object.
miopenStatus_t miopenPoolingBackward(miopenHandle_t handle, const miopenPoolingDescriptor_t poolDesc, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, void *workSpace)
Execute a backward pooling layer.
miopenStatus_t miopenReduceCalculationForward(miopenHandle_t handle, miopenReduceCalculationNanPropagation_t nanPropagation, void *workspace, size_t workspaceSizeInBytes, const miopenTensorDescriptor_t xDesc, const void *x, const int32_t dim, const miopenReduceCalculationOp_t reduceCalculationOp, const miopenTensorDescriptor_t reduceDesc, void *y)
Execute a reducecalculation forward layer.
miopenReduceCalculationOp_t
Definition: miopen.h:6107
miopenStatus_t miopenGetReduceCalculationWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const int32_t dim, const miopenReduceCalculationOp_t reduceCalculationOp, const miopenTensorDescriptor_t reduceDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the ReduceTensor call.
@ MIOPEN_REDUCE_CALCULATION_PROD
Definition: miopen.h:6108
@ MIOPEN_REDUCE_CALCULATION_SUM
Definition: miopen.h:6110
miopenStatus_t miopenSoftmaxBackward_V2(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode)
Execute a softmax backwards layer with expanded modes and algorithms.
miopenStatus_t miopenSoftmaxForward(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Execute a softmax forward layer.
miopenStatus_t miopenSoftmaxForward_V2(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode)
Execute a softmax forward layer with expanded modes and algorithms.
miopenStatus_t miopenSoftmaxBackward(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx)
Execute a softmax backwards layer.
miopenSoftmaxMode_t
Definition: miopen.h:552
miopenSoftmaxAlgorithm_t
Definition: miopen.h:541
miopenStatus_t miopenDestroySeqTensorDescriptor(miopenSeqTensorDescriptor_t tensorDesc)
Destroys the sequence data tensor descriptor.
miopenStatus_t miopenGetTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t *dataType, int *dimsA, int *stridesA)
Get the details of the N-dimensional tensor descriptor.
miopenStatus_t miopenSetNdTensorDescriptorWithLayout(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, miopenTensorLayout_t tensorLayout, const int *lens, int num_lens)
Set shape of ND tensor with specific layout.
miopenStatus_t miopenSetTensor(miopenHandle_t handle, const miopenTensorDescriptor_t yDesc, void *y, const void *alpha)
Fills a tensor with a single value.
miopenStatus_t miopenOpTensor(miopenHandle_t handle, miopenTensorOp_t tensorOp, const void *alpha1, const miopenTensorDescriptor_t aDesc, const void *A, const void *alpha2, const miopenTensorDescriptor_t bDesc, const void *B, const void *beta, const miopenTensorDescriptor_t cDesc, void *C)
Execute element-wise tensor operations.
miopenStatus_t miopenGetTensorNumBytes(miopenTensorDescriptor_t tensorDesc, size_t *numBytes)
Returns number of bytes associated with tensor descriptor.
miopenStatus_t miopenGet4dTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t *dataType, int *n, int *c, int *h, int *w, int *nStride, int *cStride, int *hStride, int *wStride)
Get the details of the tensor descriptor.
miopenTensorLayout_t
Definition: miopen.h:393
miopenStatus_t miopenTransformTensor(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Copies one tensor to another tensor with a different layout/scale.
miopenStatus_t miopenCreateTensorDescriptor(miopenTensorDescriptor_t *tensorDesc)
Create a Tensor Descriptor.
miopenStatus_t miopenSetTensorDescriptorV2(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int nbDims, const size_t *dimsA, const size_t *stridesA)
Set shape of N-dimensional tensor.
miopenStatus_t miopenScaleTensor(miopenHandle_t handle, const miopenTensorDescriptor_t yDesc, void *y, const void *alpha)
Scales all elements in a tensor by a single value.
miopenStatus_t miopenSetTensorCastType(miopenTensorDescriptor_t tensorDesc, miopenDataType_t cast_type)
Set the tensor cast type.
miopenStatus_t miopenSet4dTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int n, int c, int h, int w)
Set shape of 4D tensor.
miopenStatus_t miopenSet4dTensorDescriptorEx(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int n, int c, int h, int w, int nStride, int cStride, int hStride, int wStride)
Set shape and stride of 4D tensor.
miopenDataType_t
Definition: miopen.h:368
miopenStatus_t miopenCreateSeqTensorDescriptor(miopenSeqTensorDescriptor_t *tensorDesc)
Create a Tensor Descriptor for sequence data.
miopenTensorOp_t
Definition: miopen.h:422
miopenStatus_t miopenGetTensorDescriptorSize(miopenTensorDescriptor_t tensorDesc, int *size)
Set shape of N-dimensional tensor.
miopenStatus_t miopenDestroyTensorDescriptor(miopenTensorDescriptor_t tensorDesc)
Destroys the tensor descriptor.
miopenStatus_t miopenSetTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int nbDims, const int *dimsA, const int *stridesA)
Set shape of N-dimensional tensor.
miopenPaddingMode_t
Definition: miopen.h:446
@ miopenPaddingDefault
Definition: miopen.h:447
@ miopenPaddingSame
Definition: miopen.h:448
@ miopenPaddingValid
Definition: miopen.h:449
miopenReduceCalculationNanPropagation_t
Definition: miopen.h:6091
@ MIOPEN_REDUCE_CALCULATION_PROPAGATE_NAN
Definition: miopen.h:6093
@ MIOPEN_REDUCE_CALCULATION_NOT_PROPAGATE_NAN
Definition: miopen.h:6092
#define MIOPEN_DECLARE_OBJECT(name)
Definition: miopen.h:79
miopenNanPropagation_t
Definition: miopen.h:597
@ MIOPEN_PROPAGATE_NAN
Definition: miopen.h:599
@ MIOPEN_NOT_PROPAGATE_NAN
Definition: miopen.h:598
@ MIOPEN_LOSS_REDUCTION_MEAN
Definition: miopen.h:8011
@ MIOPEN_LOSS_REDUCTION_SUM
Definition: miopen.h:8010
@ MIOPEN_LOSS_REDUCTION_NONE
Definition: miopen.h:8009
@ miopenPoolingAverage
Definition: miopen.h:459
@ miopenPoolingAverageInclusive
Definition: miopen.h:460
@ miopenPoolingMax
Definition: miopen.h:458
@ miopenTensorCHWN
Definition: miopen.h:396
@ miopenTensorNHWC
Definition: miopen.h:395
@ miopenTensorNDHWC
Definition: miopen.h:402
@ miopenTensorNCHW
Definition: miopen.h:394
@ miopenTensorCHWNc4
Definition: miopen.h:399
@ miopenTensorNCHWc8
Definition: miopen.h:398
@ miopenTensorNCDHW
Definition: miopen.h:401
@ miopenTensorCHWNc8
Definition: miopen.h:400
@ miopenTensorNCHWc4
Definition: miopen.h:397
@ MIOPEN_REDUCE_TENSOR_FLATTENED_INDICES
Definition: miopen.h:609
@ MIOPEN_REDUCE_TENSOR_NO_INDICES
Definition: miopen.h:608
@ miopenActivationLEAKYRELU
Definition: miopen.h:529
@ miopenActivationPASTHRU
Definition: miopen.h:520
@ miopenActivationABS
Definition: miopen.h:525
@ miopenActivationLOGISTIC
Definition: miopen.h:521
@ miopenActivationCLIPPEDRELU
Definition: miopen.h:527
@ miopenActivationRELU
Definition: miopen.h:523
@ miopenActivationPOWER
Definition: miopen.h:526
@ miopenActivationELU
Definition: miopen.h:531
@ miopenActivationSOFTRELU
Definition: miopen.h:524
@ miopenActivationTANH
Definition: miopen.h:522
@ MIOPEN_REDUCE_TENSOR_MUL
Definition: miopen.h:574
@ MIOPEN_REDUCE_TENSOR_MAX
Definition: miopen.h:578
@ MIOPEN_REDUCE_TENSOR_AVG
Definition: miopen.h:582
@ MIOPEN_REDUCE_TENSOR_NORM1
Definition: miopen.h:584
@ MIOPEN_REDUCE_TENSOR_AMAX
Definition: miopen.h:580
@ MIOPEN_REDUCE_TENSOR_MIN
Definition: miopen.h:576
@ MIOPEN_REDUCE_TENSOR_ADD
Definition: miopen.h:573
@ MIOPEN_REDUCE_TENSOR_NORM2
Definition: miopen.h:586
@ MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC
Definition: miopen.h:634
@ MIOPEN_CONVOLUTION_ATTRIB_FP8_ROUNDING_MODE
Definition: miopen.h:638
@ MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL
Definition: miopen.h:630
@ miopenIndexUint16
Definition: miopen.h:412
@ miopenIndexUint64
Definition: miopen.h:414
@ miopenIndexUint32
Definition: miopen.h:413
@ miopenIndexUint8
Definition: miopen.h:411
@ miopenFloat
Definition: miopen.h:370
@ miopenBFloat16
Definition: miopen.h:374
@ miopenInt8
Definition: miopen.h:372
@ miopenInt32
Definition: miopen.h:371
@ miopenHalf
Definition: miopen.h:369
@ miopenBFloat8
Definition: miopen.h:379
@ miopenInt64
Definition: miopen.h:384
@ miopenDouble
Definition: miopen.h:376
@ miopenFloat8
Definition: miopen.h:378
@ MIOPEN_8BIT_INDICES
Definition: miopen.h:621
@ MIOPEN_32BIT_INDICES
Definition: miopen.h:618
@ MIOPEN_16BIT_INDICES
Definition: miopen.h:620
@ MIOPEN_64BIT_INDICES
Definition: miopen.h:619
@ miopenPoolingWorkspaceIndexImage
Definition: miopen.h:472
@ miopenPoolingWorkspaceIndexMask
Definition: miopen.h:471
@ miopenDepthwise
Definition: miopen.h:438
@ miopenGroupConv
Definition: miopen.h:437
@ miopenTranspose
Definition: miopen.h:436
@ miopenConvolution
Definition: miopen.h:435
@ MIOPEN_ELEMENTWISE_AFFINE_FUSED_ADD
Definition: miopen.h:494
@ MIOPEN_WEIGHT_BIAS
Definition: miopen.h:492
@ MIOPEN_ELEMENTWISE_AFFINE
Definition: miopen.h:491
@ MIOPEN_WEIGHT_BIAS_T5
Definition: miopen.h:500
@ MIOPEN_ELEMENTWISE_AFFINE_T5
Definition: miopen.h:498
@ MIOPEN_WEIGHT_BIAS_FUSED_ADD
Definition: miopen.h:496
@ MIOPEN_REDUCE_EXTREME_ARGMAX
Definition: miopen.h:6170
@ MIOPEN_REDUCE_EXTREME_MIN
Definition: miopen.h:6172
@ MIOPEN_REDUCE_EXTREME_MAX
Definition: miopen.h:6174
@ MIOPEN_REDUCE_EXTREME_ARGMIN
Definition: miopen.h:6168
@ miopenTensorOpMin
Definition: miopen.h:425
@ miopenTensorOpAdd
Definition: miopen.h:423
@ miopenTensorOpMul
Definition: miopen.h:424
@ miopenTensorOpMax
Definition: miopen.h:426
@ miopenBNSpatial
Definition: miopen.h:511
@ miopenBNPerActivation
Definition: miopen.h:510
@ miopenLRNWithinChannel
Definition: miopen.h:481
@ miopenLRNCrossChannel
Definition: miopen.h:482
@ MIOPEN_SOFTMAX_MODE_INSTANCE
Definition: miopen.h:553
@ MIOPEN_SOFTMAX_MODE_CHANNEL
Definition: miopen.h:554
@ MIOPEN_SOFTMAX_FAST
Definition: miopen.h:542
@ MIOPEN_SOFTMAX_ACCURATE
Definition: miopen.h:543
@ MIOPEN_SOFTMAX_LOG
Definition: miopen.h:544
Perf struct for forward, backward filter, or backward data algorithms.
Definition: miopen.h:1229
miopenConvFwdAlgorithm_t fwd_algo
Definition: miopen.h:1232
miopenConvBwdDataAlgorithm_t bwd_data_algo
Definition: miopen.h:1236
size_t memory
Definition: miopen.h:1240
miopenConvBwdWeightsAlgorithm_t bwd_weights_algo
Definition: miopen.h:1233
float time
Definition: miopen.h:1239
Performance struct for forward, backward filter, or backward data algorithms in immediate mode.
Definition: miopen.h:1253
miopenConvAlgorithm_t algorithm
Definition: miopen.h:1260
uint64_t solution_id
Definition: miopen.h:1259
size_t workspace_size
Definition: miopen.h:1257
float time
Definition: miopen.h:1254
Values of a tensor or scalar argument for the miopenRunSolution function.
Definition: miopen.h:5905
miopenTensorArgumentId_t id
Definition: miopen.h:5908
void * buffer
Definition: miopen.h:5918
miopenTensorDescriptor_t * descriptor
Definition: miopen.h:5914