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

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

MIOpen: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/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 sum
68  * @defgroup ReduceExtreme
69  * @defgroup groupnorm
70  * @defgroup cat
71  * @defgroup SGD
72  *
73  */
74 
76 #define MIOPEN_DECLARE_OBJECT(name) \
77  struct name \
78  { \
79  }; \
80  typedef struct name* name##_t;
81 
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85 
86 #if MIOPEN_BACKEND_OPENCL
87 typedef cl_command_queue miopenAcceleratorQueue_t;
88 #elif MIOPEN_BACKEND_HIP
89 typedef hipStream_t miopenAcceleratorQueue_t;
90 #endif
91 
95 MIOPEN_DECLARE_OBJECT(miopenHandle);
96 
105 typedef enum
106 {
119 
120 #ifdef MIOPEN_BETA_API
121 typedef enum
122 {
126 #endif
127 
135 MIOPEN_EXPORT const char* miopenGetErrorString(miopenStatus_t error);
136 
145 typedef void* (*miopenAllocatorFunction)(void* context, size_t sizeBytes);
146 
155 typedef void (*miopenDeallocatorFunction)(void* context, void* memory);
156 
170 MIOPEN_EXPORT miopenStatus_t miopenGetVersion(size_t* major, size_t* minor, size_t* patch);
171 
180 MIOPEN_EXPORT miopenStatus_t miopenCreate(miopenHandle_t* handle);
181 
193 MIOPEN_EXPORT miopenStatus_t miopenCreateWithStream(miopenHandle_t* handle,
194  miopenAcceleratorQueue_t stream);
195 
202 MIOPEN_EXPORT miopenStatus_t miopenDestroy(miopenHandle_t handle);
203 
211 MIOPEN_EXPORT miopenStatus_t miopenSetStream(miopenHandle_t handle,
212  miopenAcceleratorQueue_t streamID);
213 
221 MIOPEN_EXPORT miopenStatus_t miopenGetStream(miopenHandle_t handle,
222  miopenAcceleratorQueue_t* streamID);
223 
240 MIOPEN_EXPORT miopenStatus_t miopenSetAllocator(miopenHandle_t handle,
241  miopenAllocatorFunction allocator,
242  miopenDeallocatorFunction deallocator,
243  void* allocatorContext);
244 
256 MIOPEN_EXPORT miopenStatus_t miopenGetKernelTime(miopenHandle_t handle, float* time);
257 
265 MIOPEN_EXPORT miopenStatus_t miopenEnableProfiling(miopenHandle_t handle, bool enable);
267 // CLOSEOUT HANDLE DOXYGEN GROUP
268 
276 MIOPEN_DECLARE_OBJECT(miopenFusionOpDescriptor);
277 
285 MIOPEN_DECLARE_OBJECT(miopenTensorDescriptor);
286 
293 MIOPEN_DECLARE_OBJECT(miopenSeqTensorDescriptor);
294 
302 MIOPEN_DECLARE_OBJECT(miopenConvolutionDescriptor);
303 
311 MIOPEN_DECLARE_OBJECT(miopenPoolingDescriptor);
312 
320 MIOPEN_DECLARE_OBJECT(miopenLRNDescriptor);
321 
328 MIOPEN_DECLARE_OBJECT(miopenActivationDescriptor);
329 
333 MIOPEN_DECLARE_OBJECT(miopenRNNDescriptor);
334 
338 MIOPEN_DECLARE_OBJECT(miopenCTCLossDescriptor);
339 
343 MIOPEN_DECLARE_OBJECT(miopenDropoutDescriptor);
344 
348 MIOPEN_DECLARE_OBJECT(miopenReduceTensorDescriptor);
349 
353 MIOPEN_DECLARE_OBJECT(miopenMhaDescriptor);
354 
358 MIOPEN_DECLARE_OBJECT(miopenSoftmaxDescriptor);
359 
364 typedef enum
365 {
370  // miopenInt8x4 = 4, /*!< Pack of 4x Int8 in NCHW_VECT_C format (Support discontinued) */
371  miopenBFloat16 = 5,
374 #ifdef MIOPEN_BETA_API
377 #else
378 // miopenReserved1 = 7,
379 // miopenReserved2 = 8,
380 #endif
383 
389 typedef enum
390 {
401 
406 typedef enum
407 {
413 
418 typedef enum
419 {
425 
430 typedef enum
431 {
437 
442 typedef enum
443 {
448 
453 typedef enum
454 {
459 
466 typedef enum
467 {
471 
476 typedef enum
477 {
481 #ifdef MIOPEN_BETA_API
486 typedef enum
487 {
490  1,
492  2,
496  4,
500 #endif
505 typedef enum
506 {
510 
515 typedef enum
516 {
525  7,
527  8,
529  9,
532 
537 typedef enum
538 {
543 
548 typedef enum
549 {
552  1,
554 
562 #define MIOPEN_API_VERSION_REDUCE_TENSOR 1
563 
568 typedef enum
569 {
572  1,
574  2,
576  3,
578  4,
580  5,
582  6,
585  // MIOPEN_REDUCE_TENSOR_MUL_NO_ZEROS =
586  // 8, /*!< the operation is same as MUL, but does not have the zero values considered */
588 
593 typedef enum
594 {
598 
603 typedef enum
604 {
608 
613 typedef enum
614 {
620 
625 typedef enum
626 {
628  0,
632  1,
634 #ifdef MIOPEN_BETA_API
636  2,
640 #else
641 // miopenReserved1 = 2,
642 #endif
644 
656 MIOPEN_EXPORT miopenStatus_t miopenCreateTensorDescriptor(miopenTensorDescriptor_t* tensorDesc);
657 
671  miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int n, int c, int h, int w);
672 
683 MIOPEN_EXPORT miopenStatus_t
684 miopenSetNdTensorDescriptorWithLayout(miopenTensorDescriptor_t tensorDesc,
685  miopenDataType_t dataType,
686  miopenTensorLayout_t tensorLayout,
687  const int* lens,
688  int num_lens);
708 MIOPEN_EXPORT miopenStatus_t miopenSet4dTensorDescriptorEx(miopenTensorDescriptor_t tensorDesc,
709  miopenDataType_t dataType,
710  int n,
711  int c,
712  int h,
713  int w,
714  int nStride,
715  int cStride,
716  int hStride,
717  int wStride);
718 
735 MIOPEN_EXPORT miopenStatus_t miopenGet4dTensorDescriptor(miopenTensorDescriptor_t tensorDesc,
736  miopenDataType_t* dataType,
737  int* n,
738  int* c,
739  int* h,
740  int* w,
741  int* nStride,
742  int* cStride,
743  int* hStride,
744  int* wStride);
745 
756 MIOPEN_EXPORT miopenStatus_t miopenSetTensorDescriptor(miopenTensorDescriptor_t tensorDesc,
757  miopenDataType_t dataType,
758  int nbDims,
759  const int* dimsA,
760  const int* stridesA);
761 
762 #ifdef MIOPEN_BETA_API
765 MIOPEN_EXPORT miopenStatus_t miopenSetTensorDescriptorV2(miopenTensorDescriptor_t tensorDesc,
766  miopenDataType_t dataType,
767  int nbDims,
768  const size_t* dimsA,
769  const size_t* stridesA);
770 #endif
771 
772 #ifdef MIOPEN_BETA_API
782 MIOPEN_EXPORT miopenStatus_t miopenSetTensorCastType(miopenTensorDescriptor_t tensorDesc,
783  miopenDataType_t cast_type);
784 #endif
785 
794 MIOPEN_EXPORT miopenStatus_t miopenGetTensorDescriptorSize(miopenTensorDescriptor_t tensorDesc,
795  int* size);
796 
805 MIOPEN_EXPORT miopenStatus_t miopenGetTensorDescriptor(miopenTensorDescriptor_t tensorDesc,
806  miopenDataType_t* dataType,
807  int* dimsA,
808  int* stridesA);
809 
815 MIOPEN_EXPORT miopenStatus_t miopenDestroyTensorDescriptor(miopenTensorDescriptor_t tensorDesc);
816 
823 MIOPEN_EXPORT miopenStatus_t
824 miopenCreateSeqTensorDescriptor(miopenSeqTensorDescriptor_t* tensorDesc);
825 
831 MIOPEN_EXPORT miopenStatus_t
832 miopenDestroySeqTensorDescriptor(miopenSeqTensorDescriptor_t tensorDesc);
833 
853 MIOPEN_EXPORT miopenStatus_t miopenOpTensor(miopenHandle_t handle,
854  miopenTensorOp_t tensorOp,
855  const void* alpha1,
856  const miopenTensorDescriptor_t aDesc,
857  const void* A,
858  const void* alpha2,
859  const miopenTensorDescriptor_t bDesc,
860  const void* B,
861  const void* beta,
862  const miopenTensorDescriptor_t cDesc,
863  void* C);
864 
875 MIOPEN_EXPORT miopenStatus_t miopenSetTensor(miopenHandle_t handle,
876  const miopenTensorDescriptor_t yDesc,
877  void* y,
878  const void* alpha);
879 
890 MIOPEN_EXPORT miopenStatus_t miopenScaleTensor(miopenHandle_t handle,
891  const miopenTensorDescriptor_t yDesc,
892  void* y,
893  const void* alpha);
894 
901 MIOPEN_EXPORT miopenStatus_t miopenGetTensorNumBytes(miopenTensorDescriptor_t tensorDesc,
902  size_t* numBytes);
903 
921 MIOPEN_EXPORT miopenStatus_t miopenTransformTensor(miopenHandle_t handle,
922  const void* alpha,
923  const miopenTensorDescriptor_t xDesc,
924  const void* x,
925  const void* beta,
926  const miopenTensorDescriptor_t yDesc,
927  void* y);
928 
930 // CLOSEOUT TENSOR DOXYGEN GROUP
931 
942 MIOPEN_EXPORT miopenStatus_t
943 miopenCreateConvolutionDescriptor(miopenConvolutionDescriptor_t* convDesc);
944 
960 MIOPEN_EXPORT miopenStatus_t miopenInitConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc,
962  int pad_h,
963  int pad_w,
964  int stride_h,
965  int stride_w,
966  int dilation_h,
967  int dilation_w);
968 
979 MIOPEN_EXPORT miopenStatus_t
980 miopenInitConvolutionNdDescriptor(miopenConvolutionDescriptor_t convDesc,
981  int spatialDim,
982  const int* padA,
983  const int* strideA,
984  const int* dilationA,
985  miopenConvolutionMode_t c_mode);
986 
993 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionSpatialDim(miopenConvolutionDescriptor_t convDesc,
994  int* spatialDim);
995 
1011 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc,
1012  miopenConvolutionMode_t* c_mode,
1013  int* pad_h,
1014  int* pad_w,
1015  int* stride_h,
1016  int* stride_w,
1017  int* dilation_h,
1018  int* dilation_w);
1019 
1031 MIOPEN_EXPORT miopenStatus_t
1032 miopenGetConvolutionNdDescriptor(miopenConvolutionDescriptor_t convDesc,
1033  int requestedSpatialDim,
1034  int* spatialDim,
1035  int* padA,
1036  int* strideA,
1037  int* dilationA,
1038  miopenConvolutionMode_t* c_mode);
1039 
1046 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc,
1047  int* groupCount);
1048 
1062 MIOPEN_EXPORT miopenStatus_t miopenSetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc,
1063  int groupCount);
1064 
1077 MIOPEN_EXPORT miopenStatus_t
1078 miopenSetTransposeConvOutputPadding(miopenConvolutionDescriptor_t convDesc, int adj_h, int adj_w);
1079 
1093  miopenConvolutionDescriptor_t convDesc, int spatialDim, const int* adjA);
1094 
1112 MIOPEN_EXPORT miopenStatus_t
1113 miopenGetConvolutionForwardOutputDim(miopenConvolutionDescriptor_t convDesc,
1114  const miopenTensorDescriptor_t inputTensorDesc,
1115  const miopenTensorDescriptor_t filterDesc,
1116  int* n,
1117  int* c,
1118  int* h,
1119  int* w);
1120 
1134 MIOPEN_EXPORT miopenStatus_t
1135 miopenGetConvolutionNdForwardOutputDim(miopenConvolutionDescriptor_t convDesc,
1136  const miopenTensorDescriptor_t inputTensorDesc,
1137  const miopenTensorDescriptor_t filterDesc,
1138  int* nDim,
1139  int* outputTensorDimA);
1140 
1146 MIOPEN_EXPORT miopenStatus_t
1147 miopenDestroyConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc);
1148 
1155 MIOPEN_EXPORT miopenStatus_t miopenSetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc,
1156  const miopenConvolutionAttrib_t attr,
1157  int value);
1158 
1165 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc,
1166  const miopenConvolutionAttrib_t attr,
1167  int* value);
1168 
1173 typedef enum
1174 {
1181 
1185 typedef enum
1186 {
1192 
1196 typedef enum
1197 {
1203  4,
1206 
1210 typedef enum
1211 {
1218 
1225 typedef struct
1226 {
1227  union
1228  {
1234  };
1235 
1236  float time;
1237  size_t memory;
1240 
1249 typedef struct
1250 {
1251  float time;
1256  uint64_t solution_id;
1260 
1276 MIOPEN_EXPORT miopenStatus_t
1278  const miopenTensorDescriptor_t wDesc,
1279  const miopenTensorDescriptor_t xDesc,
1280  const miopenConvolutionDescriptor_t convDesc,
1281  const miopenTensorDescriptor_t yDesc,
1282  size_t* solutionCount);
1283 
1307 MIOPEN_EXPORT miopenStatus_t
1309  const miopenTensorDescriptor_t wDesc,
1310  const miopenTensorDescriptor_t xDesc,
1311  const miopenConvolutionDescriptor_t convDesc,
1312  const miopenTensorDescriptor_t yDesc,
1313  const size_t maxSolutionCount,
1314  size_t* solutionCount,
1315  miopenConvSolution_t* solutions);
1316 
1334 MIOPEN_EXPORT miopenStatus_t
1336  const miopenTensorDescriptor_t wDesc,
1337  const miopenTensorDescriptor_t xDesc,
1338  const miopenConvolutionDescriptor_t convDesc,
1339  const miopenTensorDescriptor_t yDesc,
1340  const uint64_t solution_id,
1341  size_t* workSpaceSize);
1342 
1360 MIOPEN_EXPORT miopenStatus_t
1362  const miopenTensorDescriptor_t wDesc,
1363  const miopenTensorDescriptor_t xDesc,
1364  const miopenConvolutionDescriptor_t convDesc,
1365  const miopenTensorDescriptor_t yDesc,
1366  const uint64_t solution_id);
1367 
1385 MIOPEN_EXPORT miopenStatus_t
1387  const miopenTensorDescriptor_t wDesc,
1388  const void* w,
1389  const miopenTensorDescriptor_t xDesc,
1390  const void* x,
1391  const miopenConvolutionDescriptor_t convDesc,
1392  const miopenTensorDescriptor_t yDesc,
1393  void* y,
1394  void* workSpace,
1395  size_t workSpaceSize,
1396  const uint64_t solution_id);
1397 
1415 MIOPEN_EXPORT miopenStatus_t
1417  const miopenTensorDescriptor_t dyDesc,
1418  const miopenTensorDescriptor_t wDesc,
1419  const miopenConvolutionDescriptor_t convDesc,
1420  const miopenTensorDescriptor_t dxDesc,
1421  size_t* solutionCount);
1422 
1447 MIOPEN_EXPORT miopenStatus_t
1449  const miopenTensorDescriptor_t dyDesc,
1450  const miopenTensorDescriptor_t wDesc,
1451  const miopenConvolutionDescriptor_t convDesc,
1452  const miopenTensorDescriptor_t dxDesc,
1453  const size_t maxSolutionCount,
1454  size_t* solutionCount,
1455  miopenConvSolution_t* solutions);
1456 
1474 MIOPEN_EXPORT miopenStatus_t
1476  const miopenTensorDescriptor_t dyDesc,
1477  const miopenTensorDescriptor_t wDesc,
1478  const miopenConvolutionDescriptor_t convDesc,
1479  const miopenTensorDescriptor_t dxDesc,
1480  const uint64_t solution_id,
1481  size_t* workSpaceSize);
1482 
1501 MIOPEN_EXPORT miopenStatus_t
1503  const miopenTensorDescriptor_t dyDesc,
1504  const miopenTensorDescriptor_t wDesc,
1505  const miopenConvolutionDescriptor_t convDesc,
1506  const miopenTensorDescriptor_t dxDesc,
1507  const uint64_t solution_id);
1508 
1526 MIOPEN_EXPORT miopenStatus_t
1528  const miopenTensorDescriptor_t dyDesc,
1529  const void* dy,
1530  const miopenTensorDescriptor_t wDesc,
1531  const void* w,
1532  const miopenConvolutionDescriptor_t convDesc,
1533  const miopenTensorDescriptor_t dxDesc,
1534  void* dx,
1535  void* workSpace,
1536  size_t workSpaceSize,
1537  const uint64_t solution_id);
1538 
1556 MIOPEN_EXPORT miopenStatus_t
1558  const miopenTensorDescriptor_t dyDesc,
1559  const miopenTensorDescriptor_t xDesc,
1560  const miopenConvolutionDescriptor_t convDesc,
1561  const miopenTensorDescriptor_t dwDesc,
1562  size_t* solutionCount);
1563 
1587 MIOPEN_EXPORT miopenStatus_t
1589  const miopenTensorDescriptor_t dyDesc,
1590  const miopenTensorDescriptor_t xDesc,
1591  const miopenConvolutionDescriptor_t convDesc,
1592  const miopenTensorDescriptor_t dwDesc,
1593  const size_t maxSolutionCount,
1594  size_t* solutionCount,
1595  miopenConvSolution_t* solutions);
1596 
1615  miopenHandle_t handle,
1616  const miopenTensorDescriptor_t dyDesc,
1617  const miopenTensorDescriptor_t xDesc,
1618  const miopenConvolutionDescriptor_t convDesc,
1619  const miopenTensorDescriptor_t dwDesc,
1620  const uint64_t solution_id,
1621  size_t* workSpaceSize);
1622 
1640 MIOPEN_EXPORT miopenStatus_t
1642  const miopenTensorDescriptor_t dyDesc,
1643  const miopenTensorDescriptor_t xDesc,
1644  const miopenConvolutionDescriptor_t convDesc,
1645  const miopenTensorDescriptor_t dwDesc,
1646  const uint64_t solution_id);
1647 
1666 MIOPEN_EXPORT miopenStatus_t
1668  const miopenTensorDescriptor_t dyDesc,
1669  const void* dy,
1670  const miopenTensorDescriptor_t xDesc,
1671  const void* x,
1672  const miopenConvolutionDescriptor_t convDesc,
1673  const miopenTensorDescriptor_t dwDesc,
1674  void* dw,
1675  void* workSpace,
1676  size_t workSpaceSize,
1677  const uint64_t solution_id);
1678 
1705 MIOPEN_EXPORT miopenStatus_t
1707  const miopenTensorDescriptor_t wDesc,
1708  const miopenTensorDescriptor_t xDesc,
1709  const miopenConvolutionDescriptor_t convDesc,
1710  const miopenTensorDescriptor_t yDesc,
1711  size_t* workSpaceSize);
1712 
1756 MIOPEN_EXPORT miopenStatus_t
1758  const miopenTensorDescriptor_t xDesc,
1759  const void* x,
1760  const miopenTensorDescriptor_t wDesc,
1761  const void* w,
1762  const miopenConvolutionDescriptor_t convDesc,
1763  const miopenTensorDescriptor_t yDesc,
1764  void* y,
1765  const int requestAlgoCount,
1766  int* returnedAlgoCount,
1767  miopenConvAlgoPerf_t* perfResults,
1768  void* workSpace,
1769  size_t workSpaceSize,
1770  bool exhaustiveSearch);
1771 
1806 MIOPEN_EXPORT miopenStatus_t miopenConvolutionForward(miopenHandle_t handle,
1807  const void* alpha,
1808  const miopenTensorDescriptor_t xDesc,
1809  const void* x,
1810  const miopenTensorDescriptor_t wDesc,
1811  const void* w,
1812  const miopenConvolutionDescriptor_t convDesc,
1814  const void* beta,
1815  const miopenTensorDescriptor_t yDesc,
1816  void* y,
1817  void* workSpace,
1818  size_t workSpaceSize);
1819 
1835 MIOPEN_EXPORT miopenStatus_t miopenConvolutionForwardBias(miopenHandle_t handle,
1836  const void* alpha,
1837  const miopenTensorDescriptor_t bDesc,
1838  const void* b,
1839  const void* beta,
1840  const miopenTensorDescriptor_t yDesc,
1841  void* y);
1842 
1870 MIOPEN_EXPORT miopenStatus_t
1872  const miopenTensorDescriptor_t dyDesc,
1873  const miopenTensorDescriptor_t wDesc,
1874  const miopenConvolutionDescriptor_t convDesc,
1875  const miopenTensorDescriptor_t dxDesc,
1876  size_t* workSpaceSize);
1877 
1921 MIOPEN_EXPORT miopenStatus_t
1923  const miopenTensorDescriptor_t dyDesc,
1924  const void* dy,
1925  const miopenTensorDescriptor_t wDesc,
1926  const void* w,
1927  const miopenConvolutionDescriptor_t convDesc,
1928  const miopenTensorDescriptor_t dxDesc,
1929  void* dx,
1930  const int requestAlgoCount,
1931  int* returnedAlgoCount,
1932  miopenConvAlgoPerf_t* perfResults,
1933  void* workSpace,
1934  size_t workSpaceSize,
1935  bool exhaustiveSearch);
1936 
1970 MIOPEN_EXPORT miopenStatus_t
1971 miopenConvolutionBackwardData(miopenHandle_t handle,
1972  const void* alpha,
1973  const miopenTensorDescriptor_t dyDesc,
1974  const void* dy,
1975  const miopenTensorDescriptor_t wDesc,
1976  const void* w,
1977  const miopenConvolutionDescriptor_t convDesc,
1979  const void* beta,
1980  const miopenTensorDescriptor_t dxDesc,
1981  void* dx,
1982  void* workSpace,
1983  size_t workSpaceSize);
1984 
2012 MIOPEN_EXPORT miopenStatus_t
2014  const miopenTensorDescriptor_t dyDesc,
2015  const miopenTensorDescriptor_t xDesc,
2016  const miopenConvolutionDescriptor_t convDesc,
2017  const miopenTensorDescriptor_t dwDesc,
2018  size_t* workSpaceSize);
2019 
2063 MIOPEN_EXPORT miopenStatus_t
2065  const miopenTensorDescriptor_t dyDesc,
2066  const void* dy,
2067  const miopenTensorDescriptor_t xDesc,
2068  const void* x,
2069  const miopenConvolutionDescriptor_t convDesc,
2070  const miopenTensorDescriptor_t dwDesc,
2071  void* dw,
2072  const int requestAlgoCount,
2073  int* returnedAlgoCount,
2074  miopenConvAlgoPerf_t* perfResults,
2075  void* workSpace,
2076  size_t workSpaceSize,
2077  bool exhaustiveSearch);
2078 
2112 MIOPEN_EXPORT miopenStatus_t
2113 miopenConvolutionBackwardWeights(miopenHandle_t handle,
2114  const void* alpha,
2115  const miopenTensorDescriptor_t dyDesc,
2116  const void* dy,
2117  const miopenTensorDescriptor_t xDesc,
2118  const void* x,
2119  const miopenConvolutionDescriptor_t convDesc,
2121  const void* beta,
2122  const miopenTensorDescriptor_t dwDesc,
2123  void* dw,
2124  void* workSpace,
2125  size_t workSpaceSize);
2126 
2142 MIOPEN_EXPORT miopenStatus_t miopenConvolutionBackwardBias(miopenHandle_t handle,
2143  const void* alpha,
2144  const miopenTensorDescriptor_t dyDesc,
2145  const void* dy,
2146  const void* beta,
2147  const miopenTensorDescriptor_t dbDesc,
2148  void* db);
2149 
2151 // CLOSEOUT CONVOLUTIONS DOXYGEN GROUP
2152 
2153 // Pooling APIs
2164 MIOPEN_EXPORT miopenStatus_t miopenCreatePoolingDescriptor(miopenPoolingDescriptor_t* poolDesc);
2165 
2174 MIOPEN_EXPORT miopenStatus_t miopenSetPoolingIndexType(miopenPoolingDescriptor_t poolDesc,
2175  miopenIndexType_t index_type);
2176 
2184 MIOPEN_EXPORT miopenStatus_t miopenGetPoolingIndexType(miopenPoolingDescriptor_t poolDesc,
2185  miopenIndexType_t* index_type);
2186 
2195  miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t workspace_index);
2196 
2204  miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t* workspace_index);
2205 
2220 MIOPEN_EXPORT miopenStatus_t miopenSet2dPoolingDescriptor(miopenPoolingDescriptor_t poolDesc,
2221  miopenPoolingMode_t mode,
2222  int windowHeight,
2223  int windowWidth,
2224  int pad_h,
2225  int pad_w,
2226  int stride_h,
2227  int stride_w);
2228 
2243 MIOPEN_EXPORT miopenStatus_t miopenGet2dPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc,
2244  miopenPoolingMode_t* mode,
2245  int* windowHeight,
2246  int* windowWidth,
2247  int* pad_h,
2248  int* pad_w,
2249  int* stride_h,
2250  int* stride_w);
2251 
2266 MIOPEN_EXPORT miopenStatus_t
2267 miopenGetPoolingForwardOutputDim(const miopenPoolingDescriptor_t poolDesc,
2268  const miopenTensorDescriptor_t tensorDesc,
2269  int* n,
2270  int* c,
2271  int* h,
2272  int* w);
2273 
2289 MIOPEN_EXPORT miopenStatus_t miopenSetNdPoolingDescriptor(miopenPoolingDescriptor_t poolDesc,
2290  const miopenPoolingMode_t mode,
2291  int nbDims,
2292  const int* windowDimA,
2293  const int* padA,
2294  const int* stridesA);
2295 
2312 MIOPEN_EXPORT miopenStatus_t miopenGetNdPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc,
2313  int nbDimsRequested,
2314  miopenPoolingMode_t* mode,
2315  int* nbDims,
2316  int* windowDimA,
2317  int* padA,
2318  int* stridesA);
2319 
2332 MIOPEN_EXPORT miopenStatus_t
2333 miopenGetPoolingNdForwardOutputDim(const miopenPoolingDescriptor_t poolDesc,
2334  const miopenTensorDescriptor_t tensorDesc,
2335  int dims,
2336  int* tensorDimArr);
2337 
2350 MIOPEN_EXPORT miopenStatus_t miopenPoolingGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc,
2351  size_t* workSpaceSize);
2352 
2365 MIOPEN_EXPORT miopenStatus_t
2366 miopenPoolingGetWorkSpaceSizeV2(const miopenPoolingDescriptor_t poolDesc,
2367  const miopenTensorDescriptor_t yDesc,
2368  size_t* workSpaceSize);
2369 
2390 MIOPEN_EXPORT miopenStatus_t miopenPoolingForward(miopenHandle_t handle,
2391  const miopenPoolingDescriptor_t poolDesc,
2392  const void* alpha,
2393  const miopenTensorDescriptor_t xDesc,
2394  const void* x,
2395  const void* beta,
2396  const miopenTensorDescriptor_t yDesc,
2397  void* y,
2398  bool do_backward,
2399  void* workSpace,
2400  size_t workSpaceSize);
2401 
2422 MIOPEN_EXPORT miopenStatus_t miopenPoolingBackward(miopenHandle_t handle,
2423  const miopenPoolingDescriptor_t poolDesc,
2424  const void* alpha,
2425  const miopenTensorDescriptor_t yDesc,
2426  const void* y,
2427  const miopenTensorDescriptor_t dyDesc,
2428  const void* dy,
2429  const miopenTensorDescriptor_t xDesc,
2430  const void* x,
2431  const void* beta,
2432  const miopenTensorDescriptor_t dxDesc,
2433  void* dx,
2434  void* workSpace);
2435 
2441 MIOPEN_EXPORT miopenStatus_t miopenDestroyPoolingDescriptor(miopenPoolingDescriptor_t poolDesc);
2442 
2444 // CLOSEOUT POOLING DOXYGEN GROUP
2445 
2446 // LRN APIs
2456 MIOPEN_EXPORT miopenStatus_t miopenCreateLRNDescriptor(miopenLRNDescriptor_t* lrnDesc);
2457 
2471 MIOPEN_EXPORT miopenStatus_t miopenSetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc,
2472  miopenLRNMode_t mode,
2473  unsigned int lrnN,
2474  double lrnAlpha,
2475  double lrnBeta,
2476  double lrnK);
2477 
2490 MIOPEN_EXPORT miopenStatus_t miopenGetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc,
2491  miopenLRNMode_t* mode,
2492  unsigned int* lrnN,
2493  double* lrnAlpha,
2494  double* lrnBeta,
2495  double* lrnK);
2496 
2506 MIOPEN_EXPORT miopenStatus_t miopenLRNGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc,
2507  size_t* workSpaceSize);
2508 
2527 MIOPEN_EXPORT miopenStatus_t miopenLRNForward(miopenHandle_t handle,
2528  const miopenLRNDescriptor_t lrnDesc,
2529  const void* alpha,
2530  const miopenTensorDescriptor_t xDesc,
2531  const void* x,
2532  const void* beta,
2533  const miopenTensorDescriptor_t yDesc,
2534  void* y,
2535  bool do_backward,
2536  void* workSpace);
2537 
2555 MIOPEN_EXPORT miopenStatus_t miopenLRNBackward(miopenHandle_t handle,
2556  const miopenLRNDescriptor_t lrnDesc,
2557  const void* alpha,
2558  const miopenTensorDescriptor_t yDesc,
2559  const void* y,
2560  const miopenTensorDescriptor_t dyDesc,
2561  const void* dy,
2562  const miopenTensorDescriptor_t xDesc,
2563  const void* x,
2564  const void* beta,
2565  const miopenTensorDescriptor_t dxDesc,
2566  void* dx,
2567  const void* workSpace);
2568 
2574 MIOPEN_EXPORT miopenStatus_t miopenDestroyLRNDescriptor(miopenLRNDescriptor_t lrnDesc);
2575 
2577 // CLOSEOUT LRN DOXYGEN GROUP
2578 
2579 #ifdef MIOPEN_BETA_API
2580 // LayerNorm APIs
2605 MIOPEN_EXPORT miopenStatus_t miopenLayerNormForward(miopenHandle_t handle,
2606  miopenNormMode_t mode,
2607  const miopenTensorDescriptor_t xDesc,
2608  const void* x,
2609  const miopenTensorDescriptor_t weightDesc,
2610  const void* weight,
2611  const miopenTensorDescriptor_t biasDesc,
2612  const void* bias,
2613  const float epsilon,
2614  const int32_t normalized_dim,
2615  const miopenTensorDescriptor_t yDesc,
2616  void* y,
2617  const miopenTensorDescriptor_t meanDesc,
2618  void* mean,
2619  const miopenTensorDescriptor_t rstdDesc,
2620  void* rstd);
2621 
2623 // CLOSEOUT LAYERNORM DOXYGEN GROUP
2624 #endif
2625 
2626 #ifdef MIOPEN_BETA_API
2627 // Cat APIs
2643 MIOPEN_EXPORT miopenStatus_t miopenCatForward(miopenHandle_t handle,
2644  const int32_t xCount,
2645  const miopenTensorDescriptor_t* xDescs,
2646  const void* const* xs,
2647  const miopenTensorDescriptor_t yDesc,
2648  void* y,
2649  const int32_t dim);
2650 
2652 // CLOSEOUT CAT DOXYGEN GROUP
2653 #endif
2654 
2655 // Batch-Normalization APIs
2677 MIOPEN_EXPORT miopenStatus_t miopenDeriveBNTensorDescriptor(miopenTensorDescriptor_t derivedBnDesc,
2678  const miopenTensorDescriptor_t xDesc,
2679  miopenBatchNormMode_t bn_mode);
2680 
2719 MIOPEN_EXPORT miopenStatus_t
2721  miopenBatchNormMode_t bn_mode,
2722  void* alpha,
2723  void* beta,
2724  const miopenTensorDescriptor_t xDesc,
2725  const void* x,
2726  const miopenTensorDescriptor_t yDesc,
2727  void* y,
2728  const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc,
2729  void* bnScale,
2730  void* bnBias,
2731  double expAvgFactor,
2732  void* resultRunningMean,
2733  void* resultRunningVariance,
2734  double epsilon,
2735  void* resultSaveMean,
2736  void* resultSaveInvVariance);
2737 
2767 MIOPEN_EXPORT miopenStatus_t
2769  miopenBatchNormMode_t bn_mode,
2770  void* alpha,
2771  void* beta,
2772  const miopenTensorDescriptor_t xDesc,
2773  const void* x,
2774  const miopenTensorDescriptor_t yDesc,
2775  void* y,
2776  const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc,
2777  void* bnScale,
2778  void* bnBias,
2779  void* estimatedMean,
2780  void* estimatedVariance,
2781  double epsilon);
2782 
2817 MIOPEN_EXPORT miopenStatus_t
2818 miopenBatchNormalizationBackward(miopenHandle_t handle,
2819  miopenBatchNormMode_t bn_mode,
2820  const void* alphaDataDiff,
2821  const void* betaDataDiff,
2822  const void* alphaParamDiff,
2823  const void* betaParamDiff,
2824  const miopenTensorDescriptor_t xDesc,
2825  const void* x,
2826  const miopenTensorDescriptor_t dyDesc,
2827  const void* dy,
2828  const miopenTensorDescriptor_t dxDesc,
2829  void* dx,
2830  const miopenTensorDescriptor_t bnScaleBiasDiffDesc,
2831  const void* bnScale,
2832  void* resultBnScaleDiff,
2833  void* resultBnBiasDiff,
2834  double epsilon,
2835  const void* savedMean,
2836  const void* savedInvVariance);
2837 
2839 // CLOSEOUT BATCHNORM DOXYGEN GROUP
2840 
2841 // Activation APIs
2851 MIOPEN_EXPORT miopenStatus_t
2852 miopenCreateActivationDescriptor(miopenActivationDescriptor_t* activDesc);
2853 
2865 MIOPEN_EXPORT miopenStatus_t
2866 miopenSetActivationDescriptor(const miopenActivationDescriptor_t activDesc,
2868  double activAlpha,
2869  double activBeta,
2870  double activGamma);
2871 
2883 MIOPEN_EXPORT miopenStatus_t
2884 miopenGetActivationDescriptor(const miopenActivationDescriptor_t activDesc,
2885  miopenActivationMode_t* mode,
2886  double* activAlpha,
2887  double* activBeta,
2888  double* activGamma);
2889 
2902 MIOPEN_EXPORT miopenStatus_t miopenActivationForward(miopenHandle_t handle,
2903  const miopenActivationDescriptor_t activDesc,
2904  const void* alpha,
2905  const miopenTensorDescriptor_t xDesc,
2906  const void* x,
2907  const void* beta,
2908  const miopenTensorDescriptor_t yDesc,
2909  void* y);
2910 
2927 MIOPEN_EXPORT miopenStatus_t miopenActivationBackward(miopenHandle_t handle,
2928  const miopenActivationDescriptor_t activDesc,
2929  const void* alpha,
2930  const miopenTensorDescriptor_t yDesc,
2931  const void* y,
2932  const miopenTensorDescriptor_t dyDesc,
2933  const void* dy,
2934  const miopenTensorDescriptor_t xDesc,
2935  const void* x,
2936  const void* beta,
2937  const miopenTensorDescriptor_t dxDesc,
2938  void* dx);
2939 
2945 MIOPEN_EXPORT miopenStatus_t
2946 miopenDestroyActivationDescriptor(miopenActivationDescriptor_t activDesc);
2947 
2949 // CLOSEOUT ACTIVATION DOXYGEN GROUP
2950 
2951 // Softmax APIs
2969 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxForward(miopenHandle_t handle,
2970  const void* alpha,
2971  const miopenTensorDescriptor_t xDesc,
2972  const void* x,
2973  const void* beta,
2974  const miopenTensorDescriptor_t yDesc,
2975  void* y);
2976 
2992 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxBackward(miopenHandle_t handle,
2993  const void* alpha,
2994  const miopenTensorDescriptor_t yDesc,
2995  const void* y,
2996  const miopenTensorDescriptor_t dyDesc,
2997  const void* dy,
2998  const void* beta,
2999  const miopenTensorDescriptor_t dxDesc,
3000  void* dx);
3001 
3015 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxForward_V2(miopenHandle_t handle,
3016  const void* alpha,
3017  const miopenTensorDescriptor_t xDesc,
3018  const void* x,
3019  const void* beta,
3020  const miopenTensorDescriptor_t yDesc,
3021  void* y,
3022  miopenSoftmaxAlgorithm_t algorithm,
3023  miopenSoftmaxMode_t mode);
3024 
3040 MIOPEN_EXPORT miopenStatus_t miopenSoftmaxBackward_V2(miopenHandle_t handle,
3041  const void* alpha,
3042  const miopenTensorDescriptor_t yDesc,
3043  const void* y,
3044  const miopenTensorDescriptor_t dyDesc,
3045  const void* dy,
3046  const void* beta,
3047  const miopenTensorDescriptor_t dxDesc,
3048  void* dx,
3049  miopenSoftmaxAlgorithm_t algorithm,
3050  miopenSoftmaxMode_t mode);
3051 
3053 // CLOSEOUT SOFTMAX DOXYGEN GROUP
3054 
3058 MIOPEN_DECLARE_OBJECT(miopenFusionPlanDescriptor);
3059 MIOPEN_DECLARE_OBJECT(miopenOperatorDescriptor);
3060 MIOPEN_DECLARE_OBJECT(miopenOperatorArgs);
3061 
3070 typedef enum
3071 {
3075 
3083 MIOPEN_EXPORT miopenStatus_t miopenCreateFusionPlan(miopenFusionPlanDescriptor_t* fusePlanDesc,
3084  const miopenFusionDirection_t fuseDirection,
3085  const miopenTensorDescriptor_t inputDesc);
3086 
3092 MIOPEN_EXPORT miopenStatus_t miopenDestroyFusionPlan(miopenFusionPlanDescriptor_t fusePlanDesc);
3093 
3100 MIOPEN_EXPORT miopenStatus_t miopenCompileFusionPlan(miopenHandle_t handle,
3101  miopenFusionPlanDescriptor_t fusePlanDesc);
3102 
3113 MIOPEN_EXPORT miopenStatus_t miopenFusionPlanGetOp(miopenFusionPlanDescriptor_t fusePlanDesc,
3114  const int op_idx,
3115  miopenFusionOpDescriptor_t* op);
3116 
3124 MIOPEN_EXPORT miopenStatus_t
3125 miopenFusionPlanGetWorkSpaceSize(miopenHandle_t handle,
3126  miopenFusionPlanDescriptor_t fusePlanDesc,
3127  size_t* workSpaceSize,
3129 
3147 MIOPEN_EXPORT miopenStatus_t
3148 miopenFusionPlanConvolutionGetAlgo(miopenFusionPlanDescriptor_t fusePlanDesc,
3149  const int requestAlgoCount,
3150  int* returnedAlgoCount,
3151  miopenConvFwdAlgorithm_t* returnedAlgos);
3152 
3163  miopenFusionPlanDescriptor_t fusePlanDesc, miopenConvFwdAlgorithm_t algo);
3164 
3173 MIOPEN_EXPORT miopenStatus_t miopenCreateOpConvForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3174  miopenFusionOpDescriptor_t* convOp,
3175  miopenConvolutionDescriptor_t convDesc,
3176  const miopenTensorDescriptor_t wDesc);
3177 
3178 //---
3179 
3180 // Activation forward create ops ---
3188 MIOPEN_EXPORT miopenStatus_t
3189 miopenCreateOpActivationForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3190  miopenFusionOpDescriptor_t* activFwdOp,
3191  miopenActivationMode_t mode);
3192 
3193 // Activation backward create ops ---
3201 MIOPEN_EXPORT miopenStatus_t
3202 miopenCreateOpActivationBackward(miopenFusionPlanDescriptor_t fusePlanDesc,
3203  miopenFusionOpDescriptor_t* activBwdOp,
3204  miopenActivationMode_t mode);
3205 
3206 // Bias create ops ---
3214 MIOPEN_EXPORT miopenStatus_t miopenCreateOpBiasForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3215  miopenFusionOpDescriptor_t* biasOp,
3216  const miopenTensorDescriptor_t bDesc);
3217 
3218 // Batch normalization create ops ---
3227 MIOPEN_EXPORT miopenStatus_t
3228 miopenCreateOpBatchNormInference(miopenFusionPlanDescriptor_t fusePlanDesc,
3229  miopenFusionOpDescriptor_t* bnOp,
3230  const miopenBatchNormMode_t bn_mode,
3231  const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc);
3232 
3242 MIOPEN_EXPORT miopenStatus_t
3243 miopenCreateOpBatchNormForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3244  miopenFusionOpDescriptor_t* bnFwdOp,
3245  const miopenBatchNormMode_t bn_mode,
3246  bool runningMeanVariance);
3247 
3255 MIOPEN_EXPORT miopenStatus_t
3256 miopenCreateOpBatchNormBackward(miopenFusionPlanDescriptor_t fusePlanDesc,
3257  miopenFusionOpDescriptor_t* bnBwdOp,
3258  const miopenBatchNormMode_t bn_mode);
3259 
3260 //---
3266 MIOPEN_EXPORT miopenStatus_t miopenCreateOperatorArgs(miopenOperatorArgs_t* args);
3267 
3273 MIOPEN_EXPORT miopenStatus_t miopenDestroyOperatorArgs(miopenOperatorArgs_t args);
3274 
3275 // Convolution set arguments ---
3285 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsConvForward(miopenOperatorArgs_t args,
3286  const miopenFusionOpDescriptor_t convOp,
3287  const void* alpha,
3288  const void* beta,
3289  const void* w);
3290 // Activation set arguments ---
3302 MIOPEN_EXPORT miopenStatus_t
3303 miopenSetOpArgsActivForward(miopenOperatorArgs_t args,
3304  const miopenFusionOpDescriptor_t activFwdOp,
3305  const void* alpha,
3306  const void* beta,
3307  double activAlpha,
3308  double activBeta,
3309  double activGamma);
3310 
3324 MIOPEN_EXPORT miopenStatus_t
3325 miopenSetOpArgsActivBackward(miopenOperatorArgs_t args,
3326  const miopenFusionOpDescriptor_t activBwdOp,
3327  const void* alpha,
3328  const void* beta,
3329  const void* y,
3330  const void* reserved,
3331  double activAlpha,
3332  double activBeta,
3333  double activGamma);
3334 
3335 // Batch Normalization set arguments ---
3349 MIOPEN_EXPORT miopenStatus_t
3350 miopenSetOpArgsBatchNormInference(miopenOperatorArgs_t args,
3351  const miopenFusionOpDescriptor_t bnOp,
3352  const void* alpha,
3353  const void* beta,
3354  const void* bnScale,
3355  const void* bnBias,
3356  const void* estimatedMean,
3357  const void* estimatedVariance,
3358  double epsilon);
3359 
3376 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsBatchNormForward(miopenOperatorArgs_t args,
3377  const miopenFusionOpDescriptor_t bnOp,
3378  const void* alpha,
3379  const void* beta,
3380  const void* bnScale,
3381  const void* bnBias,
3382  void* savedMean,
3383  void* savedInvVariance,
3384  void* runningMean,
3385  void* runningVariance,
3386  double expAvgFactor,
3387  double epsilon);
3388 
3404 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsBatchNormBackward(miopenOperatorArgs_t args,
3405  const miopenFusionOpDescriptor_t bnOp,
3406  const void* alpha,
3407  const void* beta,
3408  const void* x,
3409  const void* bnScale,
3410  const void* bnBias,
3411  void* resultBnScaleDiff,
3412  void* resultBnBiasDiff,
3413  const void* savedMean,
3414  const void* savedInvVariance);
3415 
3416 // Bias forward set arguments ---
3426 MIOPEN_EXPORT miopenStatus_t miopenSetOpArgsBiasForward(miopenOperatorArgs_t args,
3427  const miopenFusionOpDescriptor_t biasOp,
3428  const void* alpha,
3429  const void* beta,
3430  const void* bias);
3443 MIOPEN_EXPORT miopenStatus_t
3444 miopenExecuteFusionPlan(const miopenHandle_t handle,
3445  const miopenFusionPlanDescriptor_t fusePlanDesc,
3446  const miopenTensorDescriptor_t inputDesc,
3447  const void* input,
3448  const miopenTensorDescriptor_t outputDesc,
3449  void* output,
3450  miopenOperatorArgs_t args);
3451 
3475 MIOPEN_EXPORT miopenStatus_t
3477  const void* alpha1,
3478  const miopenTensorDescriptor_t xDesc,
3479  const void* x,
3480  const miopenTensorDescriptor_t wDesc,
3481  const void* w,
3482  const miopenConvolutionDescriptor_t convDesc,
3484  void* workspace,
3485  size_t workspaceSizeInBytes,
3486  const void* alpha2,
3487  const miopenTensorDescriptor_t zDesc,
3488  const void* z,
3489  const miopenTensorDescriptor_t biasDesc,
3490  const void* bias,
3491  const miopenActivationDescriptor_t activationDesc,
3492  const miopenTensorDescriptor_t yDesc,
3493  void* y);
3495 // CLOSEOUT FUSION DOXYGEN GROUP
3496 
3505 typedef enum
3506 {
3511 } miopenRNNMode_t;
3512 
3516 typedef enum
3517 {
3521 
3525 typedef enum
3526 {
3527  miopenRNNdefault = 0,
3530  1,
3531 } miopenRNNAlgo_t;
3532 
3536 typedef enum
3537 {
3541 
3545 typedef enum
3546 {
3550 
3554 typedef enum
3555 {
3558 
3562 typedef enum
3563 {
3567 
3571 typedef enum
3572 {
3576 
3580 typedef enum
3581 {
3587 
3594 MIOPEN_EXPORT miopenStatus_t miopenCreateRNNDescriptor(miopenRNNDescriptor_t* rnnDesc);
3595 
3608 MIOPEN_EXPORT miopenStatus_t miopenGetRNNDescriptor(miopenRNNDescriptor_t rnnDesc,
3609  miopenRNNMode_t* rnnMode,
3610  miopenRNNAlgo_t* algoMode,
3611  miopenRNNInputMode_t* inputMode,
3612  miopenRNNDirectionMode_t* dirMode,
3613  miopenRNNBiasMode_t* biasMode,
3614  int* hiddenSize,
3615  int* layer);
3616 
3633 MIOPEN_EXPORT miopenStatus_t miopenGetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc,
3634  int* hiddenSize,
3635  int* layer,
3636  miopenDropoutDescriptor_t* dropoutDesc,
3637  miopenRNNInputMode_t* inputMode,
3638  miopenRNNDirectionMode_t* dirMode,
3639  miopenRNNMode_t* rnnMode,
3640  miopenRNNBiasMode_t* biasMode,
3641  miopenRNNAlgo_t* algoMode,
3642  miopenDataType_t* dataType);
3643 
3649 MIOPEN_EXPORT miopenStatus_t miopenDestroyRNNDescriptor(miopenRNNDescriptor_t rnnDesc);
3650 
3666 MIOPEN_EXPORT miopenStatus_t miopenSetRNNDescriptor(miopenRNNDescriptor_t rnnDesc,
3667  const int hsize,
3668  const int nlayers,
3669  miopenRNNInputMode_t inMode,
3670  miopenRNNDirectionMode_t direction,
3671  miopenRNNMode_t rnnMode,
3672  miopenRNNBiasMode_t biasMode,
3673  miopenRNNAlgo_t algo,
3674  miopenDataType_t dataType);
3675 
3694 MIOPEN_EXPORT miopenStatus_t miopenSetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc,
3695  const int hsize,
3696  const int nlayers,
3697  miopenDropoutDescriptor_t dropoutDesc,
3698  miopenRNNInputMode_t inMode,
3699  miopenRNNDirectionMode_t direction,
3700  miopenRNNMode_t rnnMode,
3701  miopenRNNBiasMode_t biasMode,
3702  miopenRNNAlgo_t algo,
3703  miopenDataType_t dataType);
3704 
3719 MIOPEN_EXPORT miopenStatus_t
3720 miopenSetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc,
3721  miopenDataType_t dataType,
3722  miopenRNNBaseLayout_t layout,
3723  int maxSequenceLen,
3724  int batchSize,
3725  int vectorSize,
3726  const int* sequenceLenArray,
3727  void* paddingMarker);
3728 
3747 MIOPEN_EXPORT miopenStatus_t
3748 miopenGetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc,
3749  miopenDataType_t* dataType,
3750  miopenRNNBaseLayout_t* layout,
3751  int* maxSequenceLen,
3752  int* batchSize,
3753  int* vectorSize,
3754  int sequenceLenArrayLimit,
3755  int* sequenceLenArray,
3756  void* paddingMarker);
3757 
3774 MIOPEN_EXPORT miopenStatus_t miopenGetRNNWorkspaceSize(miopenHandle_t handle,
3775  const miopenRNNDescriptor_t rnnDesc,
3776  const int sequenceLen,
3777  const miopenTensorDescriptor_t* xDesc,
3778  size_t* numBytes);
3779 
3796 MIOPEN_EXPORT miopenStatus_t miopenGetRNNTrainingReserveSize(miopenHandle_t handle,
3797  miopenRNNDescriptor_t rnnDesc,
3798  const int sequenceLen,
3799  const miopenTensorDescriptor_t* xDesc,
3800  size_t* numBytes);
3801 
3818 MIOPEN_EXPORT miopenStatus_t miopenGetRNNTempSpaceSizes(miopenHandle_t handle,
3819  miopenRNNDescriptor_t rnnDesc,
3820  miopenSeqTensorDescriptor_t xDesc,
3821  miopenRNNFWDMode_t fwdMode,
3822  size_t* workSpaceSize,
3823  size_t* reserveSpaceSize);
3824 
3837 MIOPEN_EXPORT miopenStatus_t miopenGetRNNParamsSize(miopenHandle_t handle,
3838  miopenRNNDescriptor_t rnnDesc,
3839  miopenTensorDescriptor_t xDesc,
3840  size_t* numBytes,
3841  miopenDataType_t dtype);
3842 
3855 MIOPEN_EXPORT miopenStatus_t miopenGetRNNParamsDescriptor(miopenHandle_t handle,
3856  miopenRNNDescriptor_t rnnDesc,
3857  miopenTensorDescriptor_t xDesc,
3858  miopenTensorDescriptor_t wDesc,
3859  miopenDataType_t dtype);
3860 
3878 MIOPEN_EXPORT miopenStatus_t miopenGetRNNInputTensorSize(miopenHandle_t handle,
3879  miopenRNNDescriptor_t rnnDesc,
3880  const int seqLen,
3881  miopenTensorDescriptor_t* xDesc,
3882  size_t* numBytes);
3883 
3896 MIOPEN_EXPORT miopenStatus_t miopenGetRNNHiddenTensorSize(miopenHandle_t handle,
3897  miopenRNNDescriptor_t rnnDesc,
3898  const int seqLen,
3899  miopenTensorDescriptor_t* xDesc,
3900  size_t* numBytes);
3901 
3942 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerParamSize(miopenHandle_t handle,
3943  miopenRNNDescriptor_t rnnDesc,
3944  const int layer,
3945  miopenTensorDescriptor_t xDesc,
3946  const int paramID,
3947  size_t* numBytes);
3948 
3986 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerBiasSize(miopenHandle_t handle,
3987  miopenRNNDescriptor_t rnnDesc,
3988  const int layer,
3989  const int biasID,
3990  size_t* numBytes);
3991 
4050 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerParam(miopenHandle_t handle,
4051  miopenRNNDescriptor_t rnnDesc,
4052  const int layer,
4053  miopenTensorDescriptor_t xDesc,
4054  miopenTensorDescriptor_t wDesc,
4055  const void* w,
4056  const int paramID,
4057  miopenTensorDescriptor_t paramDesc,
4058  void* layerParam);
4059 
4117 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerBias(miopenHandle_t handle,
4118  miopenRNNDescriptor_t rnnDesc,
4119  const int layer,
4120  miopenTensorDescriptor_t xDesc,
4121  miopenTensorDescriptor_t wDesc,
4122  const void* w,
4123  const int biasID,
4124  miopenTensorDescriptor_t biasDesc,
4125  void* layerBias);
4126 
4181 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerParamOffset(miopenRNNDescriptor_t rnnDesc,
4182  const int layer,
4183  miopenTensorDescriptor_t xDesc,
4184  const int paramID,
4185  miopenTensorDescriptor_t paramDesc,
4186  size_t* layerParamOffset);
4187 
4238 MIOPEN_EXPORT miopenStatus_t miopenGetRNNLayerBiasOffset(miopenRNNDescriptor_t rnnDesc,
4239  const int layer,
4240  miopenTensorDescriptor_t xDesc,
4241  const int biasID,
4242  miopenTensorDescriptor_t biasDesc,
4243  size_t* layerBiasOffset);
4244 
4297 MIOPEN_EXPORT miopenStatus_t miopenSetRNNLayerParam(miopenHandle_t handle,
4298  miopenRNNDescriptor_t rnnDesc,
4299  const int layer,
4300  miopenTensorDescriptor_t xDesc,
4301  miopenTensorDescriptor_t wDesc,
4302  void* w,
4303  const int paramID,
4304  miopenTensorDescriptor_t paramDesc,
4305  const void* layerParam);
4306 
4357 MIOPEN_EXPORT miopenStatus_t miopenSetRNNLayerBias(miopenHandle_t handle,
4358  miopenRNNDescriptor_t rnnDesc,
4359  const int layer,
4360  miopenTensorDescriptor_t xDesc,
4361  miopenTensorDescriptor_t wDesc,
4362  void* w,
4363  const int biasID,
4364  miopenTensorDescriptor_t biasDesc,
4365  const void* layerBias);
4366 
4378 MIOPEN_EXPORT miopenStatus_t miopenSetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc,
4379  miopenRNNPaddingMode_t paddingMode);
4380 
4388 MIOPEN_EXPORT miopenStatus_t miopenGetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc,
4389  miopenRNNPaddingMode_t* paddingMode);
4390 
4441 MIOPEN_EXPORT miopenStatus_t miopenRNNForward(miopenHandle_t handle,
4442  const miopenRNNDescriptor_t rnnDesc,
4443  miopenRNNFWDMode_t fwdMode,
4444  const miopenSeqTensorDescriptor_t xDesc,
4445  const void* x,
4446  const miopenTensorDescriptor_t hDesc,
4447  const void* hx,
4448  void* hy,
4449  const miopenTensorDescriptor_t cDesc,
4450  const void* cx,
4451  void* cy,
4452  const miopenSeqTensorDescriptor_t yDesc,
4453  void* y,
4454  const void* w,
4455  size_t weightSpaceSize,
4456  void* workSpace,
4457  size_t workSpaceNumBytes,
4458  void* reserveSpace,
4459  size_t reserveSpaceNumBytes);
4460 
4510 MIOPEN_EXPORT miopenStatus_t miopenRNNBackwardSeqData(miopenHandle_t handle,
4511  const miopenRNNDescriptor_t rnnDesc,
4512  const miopenSeqTensorDescriptor_t yDesc,
4513  const void* y,
4514  const void* dy,
4515  const miopenTensorDescriptor_t hDesc,
4516  const void* hx,
4517  const void* dhy,
4518  void* dhx,
4519  const miopenTensorDescriptor_t cDesc,
4520  const void* cx,
4521  const void* dcy,
4522  void* dcx,
4523  const miopenSeqTensorDescriptor_t xDesc,
4524  void* dx,
4525  const void* w,
4526  size_t weightSpaceSize,
4527  void* workSpace,
4528  size_t workSpaceNumBytes,
4529  void* reserveSpace,
4530  size_t reserveSpaceNumBytes);
4531 
4565 MIOPEN_EXPORT miopenStatus_t
4567  const miopenRNNDescriptor_t rnnDesc,
4568  const miopenSeqTensorDescriptor_t xDesc,
4569  const void* x,
4570  const miopenTensorDescriptor_t hDesc,
4571  const void* hx,
4572  const miopenSeqTensorDescriptor_t yDesc,
4573  const void* y,
4574  void* dw,
4575  size_t weightSpaceSize,
4576  void* workSpace,
4577  size_t workSpaceNumBytes,
4578  const void* reserveSpace,
4579  size_t reserveSpaceNumBytes);
4580 
4638 MIOPEN_EXPORT miopenStatus_t miopenRNNForwardTraining(miopenHandle_t handle,
4639  const miopenRNNDescriptor_t rnnDesc,
4640  const int sequenceLen,
4641  const miopenTensorDescriptor_t* xDesc,
4642  const void* x,
4643  const miopenTensorDescriptor_t hxDesc,
4644  const void* hx,
4645  const miopenTensorDescriptor_t cxDesc,
4646  const void* cx,
4647  const miopenTensorDescriptor_t wDesc,
4648  const void* w,
4649  const miopenTensorDescriptor_t* yDesc,
4650  void* y,
4651  const miopenTensorDescriptor_t hyDesc,
4652  void* hy,
4653  const miopenTensorDescriptor_t cyDesc,
4654  void* cy,
4655  void* workSpace,
4656  size_t workSpaceNumBytes,
4657  void* reserveSpace,
4658  size_t reserveSpaceNumBytes);
4659 
4732 MIOPEN_EXPORT miopenStatus_t miopenRNNBackwardData(miopenHandle_t handle,
4733  const miopenRNNDescriptor_t rnnDesc,
4734  const int sequenceLen,
4735  const miopenTensorDescriptor_t* yDesc,
4736  const void* y,
4737  const miopenTensorDescriptor_t* dyDesc,
4738  const void* dy,
4739  const miopenTensorDescriptor_t dhyDesc,
4740  const void* dhy,
4741  const miopenTensorDescriptor_t dcyDesc,
4742  const void* dcy,
4743  const miopenTensorDescriptor_t wDesc,
4744  const void* w,
4745  const miopenTensorDescriptor_t hxDesc,
4746  const void* hx,
4747  const miopenTensorDescriptor_t cxDesc,
4748  const void* cx,
4749  const miopenTensorDescriptor_t* dxDesc,
4750  void* dx,
4751  const miopenTensorDescriptor_t dhxDesc,
4752  void* dhx,
4753  const miopenTensorDescriptor_t dcxDesc,
4754  void* dcx,
4755  void* workSpace,
4756  size_t workSpaceNumBytes,
4757  void* reserveSpace,
4758  size_t reserveSpaceNumBytes);
4759 
4796 MIOPEN_EXPORT miopenStatus_t miopenRNNBackwardWeights(miopenHandle_t handle,
4797  const miopenRNNDescriptor_t rnnDesc,
4798  const int sequenceLen,
4799  const miopenTensorDescriptor_t* xDesc,
4800  const void* x,
4801  const miopenTensorDescriptor_t hxDesc,
4802  const void* hx,
4803  const miopenTensorDescriptor_t* yDesc,
4804  const void* y,
4805  const miopenTensorDescriptor_t dwDesc,
4806  void* dw,
4807  void* workSpace,
4808  size_t workSpaceNumBytes,
4809  const void* reserveSpace,
4810  size_t reserveSpaceNumBytes);
4811 
4867 MIOPEN_EXPORT miopenStatus_t miopenRNNForwardInference(miopenHandle_t handle,
4868  miopenRNNDescriptor_t rnnDesc,
4869  const int sequenceLen,
4870  const miopenTensorDescriptor_t* xDesc,
4871  const void* x,
4872  const miopenTensorDescriptor_t hxDesc,
4873  const void* hx,
4874  const miopenTensorDescriptor_t cxDesc,
4875  const void* cx,
4876  const miopenTensorDescriptor_t wDesc,
4877  const void* w,
4878  const miopenTensorDescriptor_t* yDesc,
4879  void* y,
4880  const miopenTensorDescriptor_t hyDesc,
4881  void* hy,
4882  const miopenTensorDescriptor_t cyDesc,
4883  void* cy,
4884  void* workSpace,
4885  size_t workSpaceNumBytes);
4886 
4888 // CLOSEOUT RNN DOXYGEN GROUP
4889 
4898 typedef enum
4899 {
4902 
4909 MIOPEN_EXPORT miopenStatus_t miopenCreateCTCLossDescriptor(miopenCTCLossDescriptor_t* ctcLossDesc);
4910 
4920 MIOPEN_EXPORT miopenStatus_t miopenGetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc,
4921  miopenDataType_t* dataType,
4922  int* blank_label_id,
4923  bool* apply_softmax_layer);
4924 
4930 MIOPEN_EXPORT miopenStatus_t miopenDestroyCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc);
4931 
4941 MIOPEN_EXPORT miopenStatus_t miopenSetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc,
4942  miopenDataType_t dataType,
4943  const int blank_label_id,
4944  bool apply_softmax_layer);
4945 
4962 MIOPEN_EXPORT miopenStatus_t
4963 miopenGetCTCLossWorkspaceSize(miopenHandle_t handle,
4964  const miopenTensorDescriptor_t probsDesc,
4965  const miopenTensorDescriptor_t gradientsDesc,
4966  const int* labels,
4967  const int* labelLengths,
4968  const int* inputLengths,
4969  miopenCTCLossAlgo_t algo,
4970  const miopenCTCLossDescriptor_t ctcLossDesc,
4971  size_t* workSpaceSize);
4972 
4992 MIOPEN_EXPORT miopenStatus_t miopenCTCLoss(miopenHandle_t handle,
4993  const miopenTensorDescriptor_t probsDesc,
4994  const void* probs,
4995  const int* labels,
4996  const int* labelLengths,
4997  const int* inputLengths,
4998  void* losses,
4999  const miopenTensorDescriptor_t gradientsDesc,
5000  void* gradients,
5001  miopenCTCLossAlgo_t algo,
5002  const miopenCTCLossDescriptor_t ctcLossDesc,
5003  void* workSpace,
5004  size_t workSpaceSize);
5005 
5007 // CLOSEOUT LossFunction DOXYGEN GROUP
5008 
5009 // Dropout APIs
5018 typedef enum
5019 {
5021 } miopenRNGType_t;
5022 
5028 MIOPEN_EXPORT miopenStatus_t miopenCreateDropoutDescriptor(miopenDropoutDescriptor_t* dropoutDesc);
5029 
5035 MIOPEN_EXPORT miopenStatus_t miopenDestroyDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc);
5036 
5045 MIOPEN_EXPORT miopenStatus_t miopenDropoutGetReserveSpaceSize(const miopenTensorDescriptor_t xDesc,
5046  size_t* reserveSpaceSizeInBytes);
5047 
5056 MIOPEN_EXPORT miopenStatus_t miopenDropoutGetStatesSize(miopenHandle_t handle,
5057  size_t* stateSizeInBytes);
5058 
5075 MIOPEN_EXPORT miopenStatus_t miopenGetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5076  miopenHandle_t handle,
5077  float* dropout,
5078  void** states,
5079  unsigned long long* seed,
5080  bool* use_mask,
5081  bool* state_evo,
5082  miopenRNGType_t* rng_mode);
5083 
5106 MIOPEN_EXPORT miopenStatus_t miopenRestoreDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5107  miopenHandle_t handle,
5108  float dropout,
5109  void* states,
5110  size_t stateSizeInBytes,
5111  unsigned long long seed,
5112  bool use_mask,
5113  bool state_evo,
5114  miopenRNGType_t rng_mode);
5115 
5135 MIOPEN_EXPORT miopenStatus_t miopenSetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5136  miopenHandle_t handle,
5137  float dropout,
5138  void* states,
5139  size_t stateSizeInBytes,
5140  unsigned long long seed,
5141  bool use_mask,
5142  bool state_evo,
5143  miopenRNGType_t rng_mode);
5144 
5162 MIOPEN_EXPORT miopenStatus_t miopenDropoutForward(miopenHandle_t handle,
5163  const miopenDropoutDescriptor_t dropoutDesc,
5164  const miopenTensorDescriptor_t noise_shape,
5165  const miopenTensorDescriptor_t xDesc,
5166  const void* x,
5167  const miopenTensorDescriptor_t yDesc,
5168  void* y,
5169  void* reserveSpace,
5170  size_t reserveSpaceSizeInBytes);
5171 
5189 MIOPEN_EXPORT miopenStatus_t miopenDropoutBackward(miopenHandle_t handle,
5190  const miopenDropoutDescriptor_t dropoutDesc,
5191  const miopenTensorDescriptor_t noise_shape,
5192  const miopenTensorDescriptor_t dyDesc,
5193  const void* dy,
5194  const miopenTensorDescriptor_t dxDesc,
5195  void* dx,
5196  void* reserveSpace,
5197  size_t reserveSpaceSizeInBytes);
5198 
5200 // CLOSEOUT DROPOUT DOXYGEN GROUP
5201 
5202 // TensorReduce APIs
5213 MIOPEN_EXPORT miopenStatus_t
5214 miopenCreateReduceTensorDescriptor(miopenReduceTensorDescriptor_t* reduceTensorDesc);
5215 
5221 MIOPEN_EXPORT miopenStatus_t
5222 miopenDestroyReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc);
5223 
5236 MIOPEN_EXPORT miopenStatus_t
5237 miopenSetReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc,
5238  miopenReduceTensorOp_t reduceTensorOp,
5239  miopenDataType_t reduceTensorCompType,
5240  miopenNanPropagation_t reduceTensorNanOpt,
5241  miopenReduceTensorIndices_t reduceTensorIndices,
5242  miopenIndicesType_t reduceTensorIndicesType);
5243 
5259 MIOPEN_EXPORT miopenStatus_t
5260 miopenGetReduceTensorDescriptor(const miopenReduceTensorDescriptor_t reduceTensorDesc,
5261  miopenReduceTensorOp_t* reduceTensorOp,
5262  miopenDataType_t* reduceTensorCompType,
5263  miopenNanPropagation_t* reduceTensorNanOpt,
5264  miopenReduceTensorIndices_t* reduceTensorIndices,
5265  miopenIndicesType_t* reduceTensorIndicesType);
5266 
5276 MIOPEN_EXPORT miopenStatus_t
5277 miopenGetReductionIndicesSize(miopenHandle_t handle,
5278  const miopenReduceTensorDescriptor_t reduceTensorDesc,
5279  const miopenTensorDescriptor_t aDesc,
5280  const miopenTensorDescriptor_t cDesc,
5281  size_t* sizeInBytes);
5282 
5292 MIOPEN_EXPORT miopenStatus_t
5293 miopenGetReductionWorkspaceSize(miopenHandle_t handle,
5294  const miopenReduceTensorDescriptor_t reduceTensorDesc,
5295  const miopenTensorDescriptor_t aDesc,
5296  const miopenTensorDescriptor_t cDesc,
5297  size_t* sizeInBytes);
5298 
5322 MIOPEN_EXPORT miopenStatus_t
5323 miopenReduceTensor(miopenHandle_t handle,
5324  const miopenReduceTensorDescriptor_t reduceTensorDesc,
5325  void* indices,
5326  size_t indicesSizeInBytes,
5327  void* workspace,
5328  size_t workspaceSizeInBytes,
5329  const void* alpha,
5330  const miopenTensorDescriptor_t aDesc,
5331  const void* A,
5332  const void* beta,
5333  const miopenTensorDescriptor_t cDesc,
5334  void* C);
5335 
5337 // CLOSEOUT TensorReduce DOXYGEN GROUP
5338 
5339 // Find 2.0 API
5350 MIOPEN_DECLARE_OBJECT(miopenProblem);
5351 
5355 typedef enum
5356 {
5360 #ifdef MIOPEN_BETA_API
5362 #endif
5364 
5368 typedef enum
5369 {
5374 
5407 
5408 #ifdef MIOPEN_BETA_API
5434 #endif
5435 
5437 
5438 #ifdef MIOPEN_BETA_API
5441 #endif
5443 
5447 typedef enum
5448 {
5452 
5460 MIOPEN_EXPORT miopenStatus_t miopenCreateConvProblem(miopenProblem_t* problem,
5461  miopenConvolutionDescriptor_t operatorDesc,
5462  miopenProblemDirection_t direction);
5463 
5472 MIOPEN_EXPORT miopenStatus_t miopenCreateMhaProblem(miopenProblem_t* problem,
5473  miopenMhaDescriptor_t operatorDesc,
5474  miopenProblemDirection_t direction);
5475 
5482 MIOPEN_EXPORT miopenStatus_t miopenCreateMhaDescriptor(miopenMhaDescriptor_t* mhaDesc);
5483 
5493 MIOPEN_EXPORT miopenStatus_t miopenSetMhaDescriptor(miopenMhaDescriptor_t mhaDesc, float scale);
5494 
5504 MIOPEN_EXPORT miopenStatus_t miopenGetMhaDescriptor(miopenMhaDescriptor_t mhaDesc, float* scale);
5505 
5512 MIOPEN_EXPORT miopenStatus_t miopenCreateSoftmaxDescriptor(miopenSoftmaxDescriptor_t* softmaxDesc);
5513 
5525 MIOPEN_EXPORT miopenStatus_t miopenSetSoftmaxDescriptor(miopenSoftmaxDescriptor_t softmaxDesc,
5526  float alpha,
5527  float beta,
5528  miopenSoftmaxAlgorithm_t algorithm,
5529  miopenSoftmaxMode_t mode);
5530 
5542 MIOPEN_EXPORT miopenStatus_t miopenGetSoftmaxDescriptor(const miopenSoftmaxDescriptor_t softmaxDesc,
5543  float* alpha,
5544  float* beta,
5545  miopenSoftmaxAlgorithm_t* algorithm,
5546  miopenSoftmaxMode_t* mode);
5547 
5553 MIOPEN_EXPORT miopenStatus_t miopenDestroyProblem(miopenProblem_t problem);
5554 
5562 MIOPEN_EXPORT miopenStatus_t
5563 miopenSetProblemTensorDescriptor(miopenProblem_t problem,
5565  const miopenTensorDescriptor_t descriptor);
5566 
5569 MIOPEN_DECLARE_OBJECT(miopenFindOptions);
5570 
5576 MIOPEN_EXPORT miopenStatus_t miopenCreateFindOptions(miopenFindOptions_t* options);
5577 
5583 MIOPEN_EXPORT miopenStatus_t miopenDestroyFindOptions(miopenFindOptions_t options);
5584 
5591 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionTuning(miopenFindOptions_t options, int value);
5592 
5599 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionResultsOrder(miopenFindOptions_t options,
5600  miopenFindResultsOrder_t value);
5601 
5609 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionWorkspaceLimit(miopenFindOptions_t options,
5610  size_t value);
5611 
5619 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionPreallocatedWorkspace(miopenFindOptions_t options,
5620  void* buffer,
5621  size_t size);
5622 
5631 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionPreallocatedTensor(miopenFindOptions_t options,
5633  void* buffer);
5634 
5637 MIOPEN_DECLARE_OBJECT(miopenSolution);
5638 
5650 MIOPEN_EXPORT miopenStatus_t miopenFindSolutions(miopenHandle_t handle,
5651  miopenProblem_t problem,
5652  miopenFindOptions_t options,
5653  miopenSolution_t* solutions,
5654  size_t* numSolutions,
5655  size_t maxSolutions);
5656 
5660 {
5661  /* @brief Identifier of the tensor argument.
5662  */
5664  /* @brief Tensor descriptor to override the value stored in the solution.
5665  *
5666  * Some solvers may support overriding input and output tensor descriptors, but right now there
5667  * is no way to tell from the API. Intended for the future use.
5668  */
5669  miopenTensorDescriptor_t* descriptor;
5670  /* @brief Pointer to the device memory buffer to use for the operation or to the host memory if
5671  * the value is scalar.
5672  */
5673  void* buffer;
5674 };
5675 
5687 MIOPEN_EXPORT miopenStatus_t miopenRunSolution(miopenHandle_t handle,
5688  miopenSolution_t solution,
5689  size_t nInputs,
5690  const miopenTensorArgument_t* tensors,
5691  void* workspace,
5692  size_t workspaceSize);
5693 
5699 MIOPEN_EXPORT miopenStatus_t miopenDestroySolution(miopenSolution_t solution);
5700 
5708 MIOPEN_EXPORT miopenStatus_t miopenLoadSolution(miopenSolution_t* solution,
5709  const char* data,
5710  size_t size);
5711 
5718 MIOPEN_EXPORT miopenStatus_t miopenSaveSolution(miopenSolution_t solution, char* data);
5719 
5726 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionSize(miopenSolution_t solution, size_t* size);
5727 
5734 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionWorkspaceSize(miopenSolution_t solution,
5735  size_t* workspaceSize);
5736 
5743 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionTime(miopenSolution_t solution, float* time);
5744 
5751 MIOPEN_EXPORT miopenStatus_t miopenGetSolutionSolverId(miopenSolution_t solution,
5752  uint64_t* solverId);
5753 
5760 MIOPEN_EXPORT miopenStatus_t miopenGetSolverIdConvAlgorithm(uint64_t solverId,
5761  miopenConvAlgorithm_t* result);
5762 
5763 #ifdef MIOPEN_BETA_API
5764 
5773 MIOPEN_EXPORT miopenStatus_t
5774 miopenCreateActivationProblem(miopenProblem_t* problem,
5775  miopenActivationDescriptor_t operatorDesc,
5776  miopenProblemDirection_t direction);
5777 
5786 MIOPEN_EXPORT miopenStatus_t miopenCreateBatchnormProblem(miopenProblem_t* problem,
5787  miopenBatchNormMode_t mode,
5788  bool runningMeanVariance,
5789  miopenProblemDirection_t direction);
5790 
5810 MIOPEN_EXPORT miopenStatus_t miopenFuseProblems(miopenProblem_t problem1, miopenProblem_t problem2);
5811 
5819 MIOPEN_EXPORT miopenStatus_t miopenCreateBiasProblem(miopenProblem_t* problem,
5820  miopenProblemDirection_t direction);
5821 
5830 MIOPEN_EXPORT miopenStatus_t miopenCreateSoftmaxProblem(miopenProblem_t* problem,
5831  miopenSoftmaxDescriptor_t operatorDesc,
5832  miopenProblemDirection_t direction);
5833 
5834 #endif
5835 
5837 // CLOSEOUT find2 DOXYGEN GROUP
5838 
5839 #ifdef MIOPEN_BETA_API
5840 
5845 typedef enum
5846 {
5850 
5851 // Sum APIs
5866 MIOPEN_EXPORT miopenStatus_t miopenGetSumWorkspaceSize(miopenHandle_t handle,
5867  const miopenTensorDescriptor_t xDesc,
5868  const int32_t dim,
5869  const miopenTensorDescriptor_t yDesc,
5870  size_t* sizeInBytes);
5871 
5885 MIOPEN_EXPORT miopenStatus_t miopenSumForward(miopenHandle_t handle,
5886  miopenSumNanPropagation_t nanPropagation,
5887  void* workspace,
5888  size_t workspaceSizeInBytes,
5889  const miopenTensorDescriptor_t xDesc,
5890  const void* x,
5891  const int32_t dim,
5892  const miopenTensorDescriptor_t yDesc,
5893  void* y);
5894 
5896 // CLOSEOUT SUM DOXYGEN GROUP
5897 #endif
5898 
5899 #ifdef MIOPEN_BETA_API
5900 
5905 typedef enum
5906 {
5908  1,
5910  2,
5912  3,
5914  4,
5916 
5917 // ReduceExtreme APIs
5937 MIOPEN_EXPORT miopenStatus_t
5938 miopenReduceExtremeForward(miopenHandle_t handle,
5939  const miopenTensorDescriptor_t xDesc,
5940  const void* x,
5941  const int32_t dim,
5942  const miopenReduceExtremeOp_t reduceExtremeOp,
5943  const miopenTensorDescriptor_t yDesc,
5944  void* y,
5945  const miopenTensorDescriptor_t indiceDesc,
5946  void* indice);
5947 
5949 // CLOSEOUT REDUCEEXTREME DOXYGEN GROUP
5950 #endif
5951 
5952 #ifdef MIOPEN_BETA_API
5953 // GroupNorm APIs
5978 MIOPEN_EXPORT miopenStatus_t miopenGroupNormForward(miopenHandle_t handle,
5979  miopenNormMode_t mode,
5980  const miopenTensorDescriptor_t xDesc,
5981  const void* x,
5982  const miopenTensorDescriptor_t weightDesc,
5983  const void* weight,
5984  const miopenTensorDescriptor_t biasDesc,
5985  const void* bias,
5986  const uint64_t num_groups,
5987  const float epsilon,
5988  const miopenTensorDescriptor_t yDesc,
5989  void* y,
5990  const miopenTensorDescriptor_t meanDesc,
5991  void* mean,
5992  const miopenTensorDescriptor_t rstdDesc,
5993  void* rstd);
5994 
5996 // CLOSEOUT groupnorm DOXYGEN GROUP
5997 #endif
5998 
5999 #ifdef MIOPEN_BETA_API
6000 // LayerNorm APIs
6027 MIOPEN_EXPORT miopenStatus_t miopenAddLayerNormForward(miopenHandle_t handle,
6028  miopenNormMode_t mode,
6029  const miopenTensorDescriptor_t xDesc,
6030  const void* x,
6031  const miopenTensorDescriptor_t x2Desc,
6032  const void* x2,
6033  const miopenTensorDescriptor_t weightDesc,
6034  const void* weight,
6035  const miopenTensorDescriptor_t biasDesc,
6036  const void* bias,
6037  const float epsilon,
6038  const int32_t normalized_dim,
6039  const miopenTensorDescriptor_t yDesc,
6040  void* y,
6041  const miopenTensorDescriptor_t meanDesc,
6042  void* mean,
6043  const miopenTensorDescriptor_t rstdDesc,
6044  void* rstd);
6045 
6047 // CLOSEOUT LAYERNORM DOXYGEN GROUP
6048 #endif
6049 
6050 #ifdef MIOPEN_BETA_API
6051 // LayerNorm APIs
6071 MIOPEN_EXPORT miopenStatus_t miopenT5LayerNormForward(miopenHandle_t handle,
6072  miopenNormMode_t mode,
6073  const miopenTensorDescriptor_t xDesc,
6074  const void* x,
6075  const miopenTensorDescriptor_t weightDesc,
6076  const void* weight,
6077  const float epsilon,
6078  const miopenTensorDescriptor_t yDesc,
6079  void* y,
6080  const miopenTensorDescriptor_t rstdDesc,
6081  void* rstd);
6082 
6097 MIOPEN_EXPORT miopenStatus_t
6099  miopenNormMode_t mode,
6100  const miopenTensorDescriptor_t dyDesc,
6101  const miopenTensorDescriptor_t xDesc,
6102  const miopenTensorDescriptor_t weightDesc,
6103  const miopenTensorDescriptor_t rstdDesc,
6104  const miopenTensorDescriptor_t dxDesc,
6105  const miopenTensorDescriptor_t dwDesc,
6106  size_t* sizeInBytes);
6107 
6128 MIOPEN_EXPORT miopenStatus_t miopenT5LayerNormBackward(miopenHandle_t handle,
6129  miopenNormMode_t mode,
6130  void* workspace,
6131  size_t workspaceSizeInBytes,
6132  const miopenTensorDescriptor_t dyDesc,
6133  const void* dy,
6134  const miopenTensorDescriptor_t xDesc,
6135  const void* x,
6136  const miopenTensorDescriptor_t weightDesc,
6137  const void* weight,
6138  const miopenTensorDescriptor_t rstdDesc,
6139  const void* rstd,
6140  const miopenTensorDescriptor_t dxDesc,
6141  void* dx,
6142  const miopenTensorDescriptor_t dwDesc,
6143  void* dw);
6145 // CLOSEOUT LAYERNORM DOXYGEN GROUP
6146 #endif
6147 
6148 #ifdef MIOPEN_BETA_API
6149 // Graph API
6161 typedef enum
6162 {
6195 
6203 typedef enum
6204 {
6215 
6223 
6228 
6232 
6239 
6244 
6247 
6275 
6281 
6299 
6303 
6315 
6320 
6323 
6328 
6336 
6339 
6348 
6351 
6355 
6367 
6377 
6384 
6393 
6398 
6404 
6420 
6432 
6435 
6442 
6447 
6449 
6457 typedef enum
6458 {
6490 
6496 typedef enum
6497 {
6500 
6504 
6507 
6510 
6513 
6517 
6520 
6523 
6526 
6529 
6532 
6535 
6538 
6541 
6544 
6547 
6550 
6553 
6556 
6559 
6562 
6567 
6570 
6573 
6576 
6579 
6583 
6586 
6589 
6594 
6598 
6601 
6604 
6608 
6612 
6615 
6618 
6625 
6628 
6631 
6634 
6638 
6641 
6645 
6648 
6651 
6654 
6657 
6661 
6666 
6672 typedef enum
6673 {
6678 
6679 typedef enum
6680 {
6681  /* IDENTITY alpha = 1.0 and beta = 0.0 */
6682  /* SCALE alpha = 4.2 and beta = 0.0 */
6683  /* BILINEAR alpha = 3.2 and beta = 1.1 */
6684  /* ERROR_STATE alpha = 0.0 and beta = 3.1 */
6685 
6686  DEFAULT = 0, /* alpha = 1.0 and beta = 0.0.*/
6687  SCALE = 1, /* alpha with some value and beta 0.0*/
6688  BILINEAR = 2, /* both alpha and beta with some value*/
6689  ERROR_STATE = 3, /* alpha 0.0 and beta with some value, this should not occur.
6690  But used to check for errors.*/
6696 typedef enum
6697 {
6704 
6717 MIOPEN_DECLARE_OBJECT(miopenBackendDescriptor)
6718 
6719 
6733  miopenBackendDescriptorType_t descriptorType, miopenBackendDescriptor_t* descriptor);
6734 
6764 MIOPEN_EXPORT miopenStatus_t miopenBackendSetAttribute(miopenBackendDescriptor_t descriptor,
6765  miopenBackendAttributeName_t attributeName,
6766  miopenBackendAttributeType_t attributeType,
6767  int64_t elementCount,
6768  void* arrayOfElements);
6769 
6786 MIOPEN_EXPORT miopenStatus_t miopenBackendFinalize(miopenBackendDescriptor_t descriptor);
6787 
6822 MIOPEN_EXPORT miopenStatus_t miopenBackendGetAttribute(miopenBackendDescriptor_t descriptor,
6823  miopenBackendAttributeName_t attributeName,
6824  miopenBackendAttributeType_t attributeType,
6825  int64_t requestedElementCount,
6826  int64_t* elementCount,
6827  void* arrayOfElements);
6828 
6848 MIOPEN_EXPORT miopenStatus_t miopenBackendExecute(miopenHandle_t handle,
6849  miopenBackendDescriptor_t executionPlan,
6850  miopenBackendDescriptor_t variantPack);
6851 
6868 MIOPEN_EXPORT miopenStatus_t miopenBackendDestroyDescriptor(miopenBackendDescriptor_t descriptor);
6869 
6887 MIOPEN_EXPORT miopenStatus_t miopenBackendInitialize(miopenBackendDescriptor_t descriptor,
6888  miopenBackendDescriptorType_t descriptorType,
6889  size_t sizeInBytes);
6890 
6892 // CLOSEOUT BackendAPI DOXYGEN GROUP
6893 #endif // MIOPEN_BETA_API
6894 
6895 #ifdef MIOPEN_BETA_API
6896 // FusedAdam APIs
7003 MIOPEN_EXPORT miopenStatus_t miopenFusedAdam(miopenHandle_t handle,
7004  const miopenTensorDescriptor_t paramDesc,
7005  void* param,
7006  const miopenTensorDescriptor_t gradDesc,
7007  const void* grad,
7008  const miopenTensorDescriptor_t expAvgDesc,
7009  void* expAvg,
7010  const miopenTensorDescriptor_t expAvgSqDesc,
7011  void* expAvgSq,
7012  const miopenTensorDescriptor_t maxExpAvgSqDesc,
7013  void* maxExpAvgSq,
7014  const miopenTensorDescriptor_t stateStepDesc,
7015  void* stateStep,
7016  const unsigned int state_step,
7017  const float lr,
7018  const float beta1,
7019  const float beta2,
7020  const float weight_decay,
7021  const float eps,
7022  const bool amsgrad,
7023  const bool maximize,
7024  const bool adamw,
7025  const miopenTensorDescriptor_t gradScaleDesc,
7026  const void* gradScale,
7027  const miopenTensorDescriptor_t foundInfDesc,
7028  const void* foundInf);
7029 
7170 MIOPEN_EXPORT miopenStatus_t
7171 miopenFusedAdamWithOutput(miopenHandle_t handle,
7172  const miopenTensorDescriptor_t paramInDesc,
7173  void* paramIn,
7174  const miopenTensorDescriptor_t paramOutDesc,
7175  void* paramOut,
7176  const miopenTensorDescriptor_t paramOutFloat16Desc,
7177  void* paramOutFloat16,
7178  const miopenTensorDescriptor_t gradInDesc,
7179  const void* gradIn,
7180  const miopenTensorDescriptor_t expAvgInDesc,
7181  void* expAvgIn,
7182  const miopenTensorDescriptor_t expAvgOutDesc,
7183  void* expAvgOut,
7184  const miopenTensorDescriptor_t expAvgSqInDesc,
7185  void* expAvgSqIn,
7186  const miopenTensorDescriptor_t expAvgSqOutDesc,
7187  void* expAvgSqOut,
7188  const miopenTensorDescriptor_t maxExpAvgSqInDesc,
7189  void* maxExpAvgSqIn,
7190  const miopenTensorDescriptor_t maxExpAvgSqOutDesc,
7191  void* maxExpAvgSqOut,
7192  const miopenTensorDescriptor_t stateStepInDesc,
7193  void* stateStepIn,
7194  const miopenTensorDescriptor_t stateStepOutDesc,
7195  void* stateStepOut,
7196  const unsigned int state_step,
7197  const float lr,
7198  const float beta1,
7199  const float beta2,
7200  const float weight_decay,
7201  const float eps,
7202  const bool amsgrad,
7203  const bool maximize,
7204  const bool adamw,
7205  const miopenTensorDescriptor_t gradScaleDesc,
7206  const void* gradScale,
7207  const miopenTensorDescriptor_t foundInfDesc,
7208  const void* foundInf);
7209 
7211 // CLOSEOUT SGD DOXYGEN GROUP
7212 #endif // MIOPEN_BETA_API
7213 
7214 #ifdef __cplusplus
7215 }
7216 #endif
7217 
7218 #ifdef __clang__
7219 #pragma clang diagnostic pop
7220 #endif
7221 
7222 #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:3071
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:3073
@ miopenVerticalFusion
Definition: miopen.h:3072
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:6697
miopenPointwiseMode_t
Intended poinwise math operation for a pointwise operation descriptor.
Definition: miopen.h:6497
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:6204
miopenRngDistribution_t
Distribution for random number generation.
Definition: miopen.h:6673
miopenBackendDescriptorType_t
Descriptor type.
Definition: miopen.h:6162
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:6680
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:6458
@ MIOPEN_HEUR_MODE_INSTANT
Definition: miopen.h:6698
@ MIOPEN_HEUR_MODE_A
Definition: miopen.h:6701
@ MIOPEN_HEUR_MODE_B
Definition: miopen.h:6699
@ MIOPEN_HEUR_MODES_COUNT
Definition: miopen.h:6702
@ MIOPEN_HEUR_MODE_FALLBACK
Definition: miopen.h:6700
@ MIOPEN_POINTWISE_SOFTPLUS_FWD
Definition: miopen.h:6585
@ MIOPEN_POINTWISE_ELU_FWD
Definition: miopen.h:6578
@ MIOPEN_POINTWISE_RELU_FWD
Definition: miopen.h:6569
@ MIOPEN_POINTWISE_DIV
Definition: miopen.h:6506
@ MIOPEN_POINTWISE_SIGMOID_BWD
Definition: miopen.h:6603
@ MIOPEN_POINTWISE_POW
Definition: miopen.h:6522
@ MIOPEN_POINTWISE_MOD
Definition: miopen.h:6516
@ MIOPEN_POINTWISE_SQRT
Definition: miopen.h:6555
@ MIOPEN_POINTWISE_BINARY_SELECT
Definition: miopen.h:6660
@ MIOPEN_POINTWISE_GELU_BWD
Definition: miopen.h:6611
@ MIOPEN_POINTWISE_MIN
Definition: miopen.h:6512
@ MIOPEN_POINTWISE_CMP_NEQ
Definition: miopen.h:6630
@ MIOPEN_POINTWISE_FLOOR
Definition: miopen.h:6540
@ MIOPEN_POINTWISE_RSQRT
Definition: miopen.h:6549
@ MIOPEN_POINTWISE_CMP_EQ
Definition: miopen.h:6627
@ MIOPEN_POINTWISE_CMP_GE
Definition: miopen.h:6637
@ MIOPEN_POINTWISE_ADD_SQUARE
Definition: miopen.h:6503
@ MIOPEN_POINTWISE_ERF
Definition: miopen.h:6561
@ MIOPEN_POINTWISE_SWISH_FWD
Definition: miopen.h:6588
@ MIOPEN_POINTWISE_LOG
Definition: miopen.h:6543
@ MIOPEN_POINTWISE_SUB
Definition: miopen.h:6525
@ MIOPEN_POINTWISE_NEG
Definition: miopen.h:6546
@ MIOPEN_POINTWISE_LOGICAL_AND
Definition: miopen.h:6647
@ MIOPEN_POINTWISE_SWISH_BWD
Definition: miopen.h:6617
@ MIOPEN_POINTWISE_GELU_APPROX_TANH_FWD
Definition: miopen.h:6593
@ MIOPEN_POINTWISE_SIN
Definition: miopen.h:6552
@ MIOPEN_POINTWISE_RECIPROCAL
Definition: miopen.h:6664
@ MIOPEN_POINTWISE_GELU_APPROX_TANH_BWD
Definition: miopen.h:6624
@ MIOPEN_POINTWISE_GELU_FWD
Definition: miopen.h:6582
@ MIOPEN_POINTWISE_ABS
Definition: miopen.h:6528
@ MIOPEN_POINTWISE_CMP_LT
Definition: miopen.h:6640
@ MIOPEN_POINTWISE_EXP
Definition: miopen.h:6537
@ MIOPEN_POINTWISE_GEN_INDEX
Definition: miopen.h:6656
@ MIOPEN_POINTWISE_CEIL
Definition: miopen.h:6531
@ MIOPEN_POINTWISE_LOGICAL_NOT
Definition: miopen.h:6653
@ MIOPEN_POINTWISE_SIGMOID_FWD
Definition: miopen.h:6575
@ MIOPEN_POINTWISE_SOFTPLUS_BWD
Definition: miopen.h:6614
@ MIOPEN_POINTWISE_LOGICAL_OR
Definition: miopen.h:6650
@ MIOPEN_POINTWISE_TAN
Definition: miopen.h:6558
@ MIOPEN_POINTWISE_ELU_BWD
Definition: miopen.h:6607
@ MIOPEN_POINTWISE_IDENTITY
Definition: miopen.h:6566
@ MIOPEN_POINTWISE_CMP_LE
Definition: miopen.h:6644
@ MIOPEN_POINTWISE_COS
Definition: miopen.h:6534
@ MIOPEN_POINTWISE_TANH_BWD
Definition: miopen.h:6600
@ MIOPEN_POINTWISE_MUL
Definition: miopen.h:6519
@ MIOPEN_POINTWISE_TANH_FWD
Definition: miopen.h:6572
@ MIOPEN_POINTWISE_RELU_BWD
Definition: miopen.h:6597
@ MIOPEN_POINTWISE_ADD
Definition: miopen.h:6499
@ MIOPEN_POINTWISE_MAX
Definition: miopen.h:6509
@ MIOPEN_POINTWISE_CMP_GT
Definition: miopen.h:6633
@ MIOPEN_ATTR_OPERATION_NORM_BWD_MODE
Definition: miopen.h:6421
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_W
Definition: miopen.h:6251
@ MIOPEN_ATTR_RESAMPLE_NAN_PROPAGATION
Definition: miopen.h:6375
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_XDESC
Definition: miopen.h:6378
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_W
Definition: miopen.h:6257
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_ALPHA
Definition: miopen.h:6248
@ MIOPEN_ATTR_OPERATION_SIGNAL_MODE
Definition: miopen.h:6399
@ MIOPEN_ATTR_OPERATION_RNG_DESC
Definition: miopen.h:6445
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_BETA
Definition: miopen.h:6249
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC
Definition: miopen.h:6362
@ MIOPEN_ATTR_OPERATION_NORM_BWD_INV_VARIANCE_DESC
Definition: miopen.h:6424
@ MIOPEN_ATTR_OPERATION_NORM_FWD_EPSILON_DESC
Definition: miopen.h:6412
@ MIOPEN_ATTR_OPERATIONGRAPH_OPS
Definition: miopen.h:6301
@ MIOPEN_ATTR_KNOB_INFO_MAXIMUM_VALUE
Definition: miopen.h:6325
@ MIOPEN_ATTR_CONVOLUTION_POST_PADDINGS
Definition: miopen.h:6220
@ MIOPEN_ATTR_OPERATION_SIGNAL_YDESC
Definition: miopen.h:6403
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DSCALE_DESC
Definition: miopen.h:6428
@ MIOPEN_ATTR_OPERATION_NORM_BWD_PEER_STAT_DESCS
Definition: miopen.h:6431
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_YDESC
Definition: miopen.h:6392
@ MIOPEN_ATTR_CONVOLUTION_PRE_PADDINGS
Definition: miopen.h:6221
@ MIOPEN_ATTR_REDUCTION_OPERATOR
Definition: miopen.h:6349
@ MIOPEN_ATTR_OPERATION_MATMUL_DESC
Definition: miopen.h:6343
@ MIOPEN_ATTR_CONVOLUTION_DILATIONS
Definition: miopen.h:6218
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_DYDESC
Definition: miopen.h:6386
@ MIOPEN_ATTR_OPERATION_POINTWISE_ALPHA1
Definition: miopen.h:6270
@ MIOPEN_ATTR_RESAMPLE_SPATIAL_DIMS
Definition: miopen.h:6370
@ MIOPEN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS
Definition: miopen.h:6236
@ MIOPEN_ATTR_OPERATION_NORM_FWD_MEAN_DESC
Definition: miopen.h:6408
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_MEAN_DESC
Definition: miopen.h:6290
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC
Definition: miopen.h:6358
@ MIOPEN_ATTR_KNOB_INFO_TYPE
Definition: miopen.h:6324
@ MIOPEN_ATTR_LAYOUT_INFO_TYPES
Definition: miopen.h:6322
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_Y_SUM_DESC
Definition: miopen.h:6284
@ MIOPEN_ATTR_OPERATIONGRAPH_HANDLE
Definition: miopen.h:6300
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DYDESC
Definition: miopen.h:6425
@ MIOPEN_ATTR_RNG_UNIFORM_DIST_MINIMUM
Definition: miopen.h:6440
@ MIOPEN_ATTR_POINTWISE_MATH_PREC
Definition: miopen.h:6206
@ MIOPEN_ATTR_OPERATION_MATMUL_GEMM_N_OVERRIDE_DESC
Definition: miopen.h:6346
@ MIOPEN_ATTR_OPERATION_GENSTATS_MODE
Definition: miopen.h:6276
@ MIOPEN_ATTR_KNOB_CHOICE_KNOB_VALUE
Definition: miopen.h:6246
@ MIOPEN_ATTR_VARIANT_PACK_INTERMEDIATES
Definition: miopen.h:6318
@ MIOPEN_ATTR_OPERATION_REDUCTION_YDESC
Definition: miopen.h:6353
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_BETA
Definition: miopen.h:6261
@ MIOPEN_ATTR_VARIANT_PACK_WORKSPACE
Definition: miopen.h:6319
@ MIOPEN_ATTR_TENSOR_IS_BY_VALUE
Definition: miopen.h:6312
@ MIOPEN_ATTR_OPERATION_NORM_FWD_MODE
Definition: miopen.h:6405
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_CONV_DESC
Definition: miopen.h:6250
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_STATS_MODE
Definition: miopen.h:6282
@ MIOPEN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_VAR_DESC
Definition: miopen.h:6415
@ MIOPEN_ATTR_OPERATION_RESHAPE_XDESC
Definition: miopen.h:6433
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_XDESC
Definition: miopen.h:6391
@ MIOPEN_ATTR_OPERATION_POINTWISE_XDESC
Definition: miopen.h:6267
@ MIOPEN_ATTR_VARIANT_PACK_UNIQUE_IDS
Definition: miopen.h:6316
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC
Definition: miopen.h:6361
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_ALPHA
Definition: miopen.h:6381
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_SCALE_DESC
Definition: miopen.h:6286
@ MIOPEN_ATTR_OPERATION_SIGNAL_VALUE
Definition: miopen.h:6401
@ MIOPEN_ATTR_OPERATION_SIGNAL_FLAGDESC
Definition: miopen.h:6400
@ MIOPEN_ATTR_OPERATION_POINTWISE_TDESC
Definition: miopen.h:6274
@ MIOPEN_ATTR_ENGINEHEUR_RESULTS
Definition: miopen.h:6226
@ MIOPEN_ATTR_TENSOR_BYTE_ALIGNMENT
Definition: miopen.h:6304
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_X
Definition: miopen.h:6264
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC
Definition: miopen.h:6296
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS
Definition: miopen.h:6366
@ MIOPEN_ATTR_OPERATION_GENSTATS_MATH_PREC
Definition: miopen.h:6277
@ MIOPEN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_MEAN_DESC
Definition: miopen.h:6414
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EQ_SCALE_DESC
Definition: miopen.h:6294
@ MIOPEN_ATTR_EXECUTION_PLAN_HANDLE
Definition: miopen.h:6233
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC
Definition: miopen.h:6360
@ MIOPEN_ATTR_OPERATION_CONCAT_OUTPUT_DESC
Definition: miopen.h:6397
@ MIOPEN_ATTR_OPERATION_NORM_BWD_EPSILON_DESC
Definition: miopen.h:6427
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_BETA
Definition: miopen.h:6255
@ MIOPEN_ATTR_EXECUTION_PLAN_WORKSPACE_SIZE
Definition: miopen.h:6235
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DX
Definition: miopen.h:6258
@ MIOPEN_ATTR_TENSOR_VECTOR_COUNT
Definition: miopen.h:6308
@ MIOPEN_ATTR_OPERATION_MATMUL_CDESC
Definition: miopen.h:6342
@ MIOPEN_ATTR_REDUCTION_COMP_TYPE
Definition: miopen.h:6350
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_BETA
Definition: miopen.h:6389
@ MIOPEN_ATTR_TENSOR_VECTORIZED_DIMENSION
Definition: miopen.h:6309
@ MIOPEN_ATTR_TENSOR_DIMENSIONS
Definition: miopen.h:6306
@ MIOPEN_ATTR_OPERATION_GENSTATS_SUMDESC
Definition: miopen.h:6279
@ MIOPEN_ATTR_OPERATION_CONCAT_INPLACE_INDEX
Definition: miopen.h:6396
@ MIOPEN_ATTR_OPERATION_POINTWISE_ALPHA2
Definition: miopen.h:6271
@ MIOPEN_ATTR_ENGINE_NUMERICAL_NOTE
Definition: miopen.h:6332
@ MIOPEN_ATTR_ENGINE_BEHAVIOR_NOTE
Definition: miopen.h:6334
@ MIOPEN_ATTR_EXECUTION_PLAN_JSON_REPRESENTATION
Definition: miopen.h:6238
@ MIOPEN_ATTR_RESAMPLE_STRIDES
Definition: miopen.h:6373
@ MIOPEN_ATTR_POINTWISE_ELU_ALPHA
Definition: miopen.h:6211
@ MIOPEN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_VAR_DESC
Definition: miopen.h:6417
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_IDXDESC
Definition: miopen.h:6387
@ MIOPEN_ATTR_OPERATION_RNG_SEED
Definition: miopen.h:6444
@ MIOPEN_ATTR_OPERATION_NORM_BWD_XDESC
Definition: miopen.h:6422
@ MIOPEN_ATTR_OPERATION_POINTWISE_DXDESC
Definition: miopen.h:6272
@ MIOPEN_ATTR_OPERATION_CONCAT_INPUT_DESCS
Definition: miopen.h:6395
@ MIOPEN_ATTR_RESAMPLE_MODE
Definition: miopen.h:6368
@ MIOPEN_ATTR_RNG_DISTRIBUTION
Definition: miopen.h:6436
@ MIOPEN_ATTR_OPERATION_NORM_BWD_MEAN_DESC
Definition: miopen.h:6423
@ MIOPEN_ATTR_OPERATION_MATMUL_GEMM_M_OVERRIDE_DESC
Definition: miopen.h:6345
@ MIOPEN_ATTR_OPERATION_NORM_FWD_PHASE
Definition: miopen.h:6406
@ MIOPEN_ATTR_POINTWISE_RELU_LOWER_CLIP_SLOPE
Definition: miopen.h:6210
@ MIOPEN_ATTR_OPERATION_RESHAPE_YDESC
Definition: miopen.h:6434
@ MIOPEN_ATTR_VARIANT_PACK_DATA_POINTERS
Definition: miopen.h:6317
@ MIOPEN_ATTR_POINTWISE_AXIS
Definition: miopen.h:6214
@ MIOPEN_ATTR_OPERATION_NORM_FWD_YDESC
Definition: miopen.h:6418
@ MIOPEN_ATTR_POINTWISE_RELU_LOWER_CLIP
Definition: miopen.h:6208
@ MIOPEN_ATTR_ENGINE_OPERATION_GRAPH
Definition: miopen.h:6329
@ MIOPEN_ATTR_OPERATION_MATMUL_BDESC
Definition: miopen.h:6341
@ MIOPEN_ATTR_TENSOR_DATA_TYPE
Definition: miopen.h:6305
@ MIOPEN_ATTR_OPERATION_SIGNAL_XDESC
Definition: miopen.h:6402
@ MIOPEN_ATTR_KNOB_INFO_MINIMUM_VALUE
Definition: miopen.h:6326
@ MIOPEN_ATTR_OPERATION_NORM_FWD_BIAS_DESC
Definition: miopen.h:6411
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_DESC
Definition: miopen.h:6383
@ MIOPEN_ATTR_RESAMPLE_PRE_PADDINGS
Definition: miopen.h:6372
@ MIOPEN_ATTR_MATMUL_COMP_TYPE
Definition: miopen.h:6337
@ MIOPEN_ATTR_TENSOR_UNIQUE_ID
Definition: miopen.h:6310
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC
Definition: miopen.h:6364
@ MIOPEN_ATTR_OPERATION_CONCAT_AXIS
Definition: miopen.h:6394
@ MIOPEN_ATTR_OPERATION_RNG_YDESC
Definition: miopen.h:6443
@ MIOPEN_ATTR_ENGINE_GLOBAL_INDEX
Definition: miopen.h:6330
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_CONV_DESC
Definition: miopen.h:6256
@ MIOPEN_ATTR_ENGINEHEUR_OPERATION_GRAPH
Definition: miopen.h:6225
@ MIOPEN_ATTR_TENSOR_RAGGED_OFFSET_DESC
Definition: miopen.h:6314
@ MIOPEN_ATTR_POINTWISE_SOFTPLUS_BETA
Definition: miopen.h:6212
@ MIOPEN_ATTR_TENSOR_IS_VIRTUAL
Definition: miopen.h:6311
@ MIOPEN_ATTR_ENGINECFG_KNOB_CHOICES
Definition: miopen.h:6231
@ MIOPEN_ATTR_MATMUL_PADDING_VALUE
Definition: miopen.h:6338
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EXP_AVERATE_FACTOR_DESC
Definition: miopen.h:6298
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_SAVED_INV_STD_DESC
Definition: miopen.h:6293
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_X
Definition: miopen.h:6252
@ MIOPEN_ATTR_KNOB_INFO_STRIDE
Definition: miopen.h:6327
@ MIOPEN_ATTR_RESAMPLE_WINDOW_DIMS
Definition: miopen.h:6374
@ MIOPEN_ATTR_OPERATION_POINTWISE_YDESC
Definition: miopen.h:6269
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_YDESC
Definition: miopen.h:6379
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC
Definition: miopen.h:6359
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DY
Definition: miopen.h:6259
@ MIOPEN_ATTR_CONVOLUTION_CONV_MODE
Definition: miopen.h:6217
@ MIOPEN_ATTR_OPERATION_REDUCTION_XDESC
Definition: miopen.h:6352
@ MIOPEN_ATTR_EXECUTION_PLAN_RUN_ONLY_INTERMEDIATE_UIDS
Definition: miopen.h:6237
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_MATH_PREC
Definition: miopen.h:6283
@ MIOPEN_ATTR_ENGINE_SM_COUNT_TARGET
Definition: miopen.h:6335
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EQ_BIAS_DESC
Definition: miopen.h:6295
@ MIOPEN_ATTR_KNOB_CHOICE_KNOB_TYPE
Definition: miopen.h:6245
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_DXDESC
Definition: miopen.h:6385
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_MEAN_DESC
Definition: miopen.h:6288
@ MIOPEN_ATTR_OPERATION_POINTWISE_DYDESC
Definition: miopen.h:6273
@ MIOPEN_ATTR_OPERATION_NORM_FWD_EXP_AVG_FACTOR_DESC
Definition: miopen.h:6413
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC
Definition: miopen.h:6365
@ MIOPEN_ATTR_OPERATION_RNG_OFFSET_DESC
Definition: miopen.h:6446
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_FORWARD_Y
Definition: miopen.h:6253
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_VAR_DESC
Definition: miopen.h:6289
@ MIOPEN_ATTR_ENGINE_LAYOUT_INFO
Definition: miopen.h:6333
@ MIOPEN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID
Definition: miopen.h:6240
@ MIOPEN_ATTR_CONVOLUTION_COMP_TYPE
Definition: miopen.h:6216
@ MIOPEN_ATTR_RESAMPLE_COMP_TYPE
Definition: miopen.h:6369
@ MIOPEN_ATTR_ENGINECFG_ENGINE
Definition: miopen.h:6229
@ MIOPEN_ATTR_RESAMPLE_POST_PADDINGS
Definition: miopen.h:6371
@ MIOPEN_ATTR_RESAMPLE_PADDING_MODE
Definition: miopen.h:6376
@ MIOPEN_ATTR_CONVOLUTION_SPATIAL_DIMS
Definition: miopen.h:6222
@ MIOPEN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_MEAN_DESC
Definition: miopen.h:6416
@ MIOPEN_ATTR_OPERATION_GENSTATS_XDESC
Definition: miopen.h:6278
@ MIOPEN_ATTR_OPERATION_NORM_FWD_INV_VARIANCE_DESC
Definition: miopen.h:6409
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_Y_SQ_SUM_DESC
Definition: miopen.h:6285
@ MIOPEN_ATTR_ENGINE_KNOB_INFO
Definition: miopen.h:6331
@ MIOPEN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT
Definition: miopen.h:6344
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DW
Definition: miopen.h:6263
@ MIOPEN_ATTR_TENSOR_REORDERING_MODE
Definition: miopen.h:6313
@ MIOPEN_ATTR_INTERMEDIATE_INFO_SIZE
Definition: miopen.h:6241
@ MIOPEN_ATTR_OPERATION_MATMUL_GEMM_K_OVERRIDE_DESC
Definition: miopen.h:6347
@ MIOPEN_ATTR_OPERATION_POINTWISE_PW_DESCRIPTOR
Definition: miopen.h:6266
@ MIOPEN_ATTR_RNG_NORMAL_DIST_STANDARD_DEVIATION
Definition: miopen.h:6438
@ MIOPEN_ATTR_INTERMEDIATE_INFO_DEPENDENT_DATA_UIDS
Definition: miopen.h:6242
@ MIOPEN_ATTR_LAYOUT_INFO_TENSOR_UID
Definition: miopen.h:6321
@ MIOPEN_ATTR_ENGINEHEUR_MODE
Definition: miopen.h:6224
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_ALPHA
Definition: miopen.h:6388
@ MIOPEN_ATTR_OPERATION_RESAMPLE_BWD_DESC
Definition: miopen.h:6390
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC
Definition: miopen.h:6297
@ MIOPEN_ATTR_OPERATION_POINTWISE_BDESC
Definition: miopen.h:6268
@ MIOPEN_ATTR_POINTWISE_MODE
Definition: miopen.h:6205
@ MIOPEN_ATTR_ENGINECFG_INTERMEDIATE_INFO
Definition: miopen.h:6230
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DY
Definition: miopen.h:6265
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DXDESC
Definition: miopen.h:6430
@ MIOPEN_ATTR_POINTWISE_NAN_PROPAGATION
Definition: miopen.h:6207
@ MIOPEN_ATTR_INTERMEDIATE_INFO_DEPENDENT_ATTRIBUTES
Definition: miopen.h:6243
@ MIOPEN_ATTR_POINTWISE_RELU_UPPER_CLIP
Definition: miopen.h:6209
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC
Definition: miopen.h:6363
@ MIOPEN_ATTR_RNG_BERNOULLI_DIST_PROBABILITY
Definition: miopen.h:6441
@ MIOPEN_ATTR_ENGINEHEUR_SM_COUNT_TARGET
Definition: miopen.h:6227
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC
Definition: miopen.h:6287
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_VAR_DESC
Definition: miopen.h:6291
@ MIOPEN_ATTR_RNG_NORMAL_DIST_MEAN
Definition: miopen.h:6437
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC
Definition: miopen.h:6356
@ MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC
Definition: miopen.h:6357
@ MIOPEN_ATTR_OPERATION_NORM_FWD_PEER_STAT_DESCS
Definition: miopen.h:6419
@ MIOPEN_ATTR_OPERATION_NORM_FWD_SCALE_DESC
Definition: miopen.h:6410
@ MIOPEN_ATTR_OPERATION_GENSTATS_SQSUMDESC
Definition: miopen.h:6280
@ MIOPEN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG
Definition: miopen.h:6234
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_BETA
Definition: miopen.h:6382
@ MIOPEN_ATTR_OPERATION_NORM_BWD_DBIAS_DESC
Definition: miopen.h:6429
@ MIOPEN_ATTR_OPERATION_NORM_BWD_SCALE_DESC
Definition: miopen.h:6426
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_ALPHA
Definition: miopen.h:6254
@ MIOPEN_ATTR_RNG_UNIFORM_DIST_MAXIMUM
Definition: miopen.h:6439
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_CONV_DESC
Definition: miopen.h:6262
@ MIOPEN_ATTR_TENSOR_STRIDES
Definition: miopen.h:6307
@ MIOPEN_ATTR_CONVOLUTION_FILTER_STRIDES
Definition: miopen.h:6219
@ MIOPEN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_ALPHA
Definition: miopen.h:6260
@ MIOPEN_ATTR_POINTWISE_SWISH_BETA
Definition: miopen.h:6213
@ MIOPEN_ATTR_OPERATION_RESAMPLE_FWD_IDXDESC
Definition: miopen.h:6380
@ MIOPEN_ATTR_OPERATION_REDUCTION_DESC
Definition: miopen.h:6354
@ MIOPEN_ATTR_OPERATION_NORM_FWD_XDESC
Definition: miopen.h:6407
@ MIOPEN_ATTR_OPERATION_MATMUL_ADESC
Definition: miopen.h:6340
@ MIOPEN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT
Definition: miopen.h:6302
@ MIOPEN_ATTR_OPERATION_BN_FINALIZE_SAVED_MEAN_DESC
Definition: miopen.h:6292
@ MIOPEN_RNG_DISTRIBUTION_BERNOULLI
Definition: miopen.h:6674
@ MIOPEN_RNG_DISTRIBUTION_UNIFORM
Definition: miopen.h:6675
@ MIOPEN_RNG_DISTRIBUTION_NORMAL
Definition: miopen.h:6676
@ MIOPEN_BACKEND_OPERATION_CONCAT_DESCRIPTOR
Definition: miopen.h:6173
@ MIOPEN_BACKEND_RESAMPLE_DESCRIPTOR
Definition: miopen.h:6190
@ MIOPEN_BACKEND_ENGINECFG_DESCRIPTOR
Definition: miopen.h:6165
@ MIOPEN_BACKEND_POINTWISE_DESCRIPTOR
Definition: miopen.h:6188
@ MIOPEN_BACKEND_OPERATION_RESAMPLE_FWD_DESCRIPTOR
Definition: miopen.h:6184
@ MIOPEN_BACKEND_CONVOLUTION_DESCRIPTOR
Definition: miopen.h:6163
@ MIOPEN_BACKEND_OPERATION_RNG_DESCRIPTOR
Definition: miopen.h:6185
@ MIOPEN_BACKEND_KNOB_INFO_DESCRIPTOR
Definition: miopen.h:6170
@ MIOPEN_BACKEND_RNG_DESCRIPTOR
Definition: miopen.h:6191
@ MIOPEN_BACKEND_OPERATION_POINTWISE_DESCRIPTOR
Definition: miopen.h:6181
@ MIOPEN_BACKEND_OPERATION_NORM_FORWARD_DESCRIPTOR
Definition: miopen.h:6180
@ MIOPEN_BACKEND_ENGINEHEUR_DESCRIPTOR
Definition: miopen.h:6166
@ MIOPEN_BACKEND_LAYOUT_INFO_DESCRIPTOR
Definition: miopen.h:6171
@ MIOPEN_BACKEND_OPERATION_REDUCTION_DESCRIPTOR
Definition: miopen.h:6182
@ MIOPEN_BACKEND_TENSOR_DESCRIPTOR
Definition: miopen.h:6192
@ MIOPEN_BACKEND_OPERATION_RESAMPLE_BWD_DESCRIPTOR
Definition: miopen.h:6183
@ MIOPEN_BACKEND_OPERATIONGRAPH_DESCRIPTOR
Definition: miopen.h:6187
@ MIOPEN_BACKEND_OPERATION_CONVOLUTION_FORWARD_DESCRIPTOR
Definition: miopen.h:6176
@ MIOPEN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_FILTER_DESCRIPTOR
Definition: miopen.h:6175
@ MIOPEN_BACKEND_INTERMEDIATE_INFO_DESCRIPTOR
Definition: miopen.h:6168
@ MIOPEN_BACKEND_ENGINE_DESCRIPTOR
Definition: miopen.h:6164
@ MIOPEN_BACKEND_MATMUL_DESCRIPTOR
Definition: miopen.h:6172
@ MIOPEN_BACKEND_OPERATION_GEN_STATS_DESCRIPTOR
Definition: miopen.h:6177
@ MIOPEN_BACKEND_VARIANT_PACK_DESCRIPTOR
Definition: miopen.h:6193
@ MIOPEN_BACKEND_REDUCTION_DESCRIPTOR
Definition: miopen.h:6189
@ MIOPEN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_DATA_DESCRIPTOR
Definition: miopen.h:6174
@ MIOPEN_BACKEND_OPERATION_MATMUL_DESCRIPTOR
Definition: miopen.h:6178
@ MIOPEN_BACKEND_OPERATION_NORM_BACKWARD_DESCRIPTOR
Definition: miopen.h:6179
@ MIOPEN_BACKEND_OPERATION_SIGNAL_DESCRIPTOR
Definition: miopen.h:6186
@ MIOPEN_BACKEND_EXECUTION_PLAN_DESCRIPTOR
Definition: miopen.h:6167
@ MIOPEN_BACKEND_KNOB_CHOICE_DESCRIPTOR
Definition: miopen.h:6169
@ SCALE
Definition: miopen.h:6687
@ BILINEAR
Definition: miopen.h:6688
@ DEFAULT
Definition: miopen.h:6686
@ ERROR_STATE
Definition: miopen.h:6689
@ MIOPEN_TYPE_RNG_DISTRIBUTION
Definition: miopen.h:6488
@ MIOPEN_TYPE_FLOAT
Definition: miopen.h:6463
@ MIOPEN_TYPE_NUMERICAL_NOTE
Definition: miopen.h:6470
@ MIOPEN_TYPE_RESAMPLE_MODE
Definition: miopen.h:6480
@ MIOPEN_TYPE_INT32
Definition: miopen.h:6482
@ MIOPEN_TYPE_POINTWISE_MODE
Definition: miopen.h:6473
@ MIOPEN_TYPE_HANDLE
Definition: miopen.h:6459
@ MIOPEN_TYPE_HEUR_MODE
Definition: miopen.h:6467
@ MIOPEN_TYPE_CONVOLUTION_MODE
Definition: miopen.h:6466
@ MIOPEN_TYPE_TENSOR_REORDERING_MODE
Definition: miopen.h:6479
@ MIOPEN_TYPE_BOOLEAN
Definition: miopen.h:6461
@ MIOPEN_TYPE_NORM_MODE
Definition: miopen.h:6486
@ MIOPEN_TYPE_FRACTION
Definition: miopen.h:6485
@ MIOPEN_TYPE_BACKEND_DESCRIPTOR
Definition: miopen.h:6474
@ MIOPEN_TYPE_ATTRIB_NAME
Definition: miopen.h:6472
@ MIOPEN_TYPE_BEHAVIOR_NOTE
Definition: miopen.h:6478
@ MIOPEN_TYPE_DATA_TYPE
Definition: miopen.h:6460
@ MIOPEN_TYPE_NAN_PROPOGATION
Definition: miopen.h:6469
@ MIOPEN_TYPE_DOUBLE
Definition: miopen.h:6464
@ MIOPEN_TYPE_SIGNAL_MODE
Definition: miopen.h:6484
@ MIOPEN_TYPE_CHAR
Definition: miopen.h:6483
@ MIOPEN_TYPE_PADDING_MODE
Definition: miopen.h:6481
@ MIOPEN_TYPE_INT64
Definition: miopen.h:6462
@ MIOPEN_TYPE_REDUCTION_OPERATOR_TYPE
Definition: miopen.h:6477
@ MIOPEN_TYPE_LAYOUT_TYPE
Definition: miopen.h:6471
@ MIOPEN_TYPE_GENSTATS_MODE
Definition: miopen.h:6475
@ MIOPEN_TYPE_VOID_PTR
Definition: miopen.h:6465
@ MIOPEN_TYPE_BN_FINALIZE_STATS_MODE
Definition: miopen.h:6476
@ MIOPEN_TYPE_KNOB_TYPE
Definition: miopen.h:6468
@ MIOPEN_TYPE_NORM_FWD_PHASE
Definition: miopen.h:6487
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:477
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.
miopenCTCLossAlgo_t
Definition: miopen.h:4899
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 miopenDestroyCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc)
Destroys a CTC loss function descriptor object.
@ MIOPEN_CTC_LOSS_ALGO_DETERMINISTIC
Definition: miopen.h:4900
miopenRNNMode_t
Definition: miopen.h:3506
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:3517
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:3537
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:3546
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:3581
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:3526
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:3572
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:3555
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:3563
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:3508
@ miopenLSTM
Definition: miopen.h:3509
@ miopenGRU
Definition: miopen.h:3510
@ miopenRNNRELU
Definition: miopen.h:3507
@ miopenRNNlinear
Definition: miopen.h:3518
@ miopenRNNskip
Definition: miopen.h:3519
@ miopenRNNbidirection
Definition: miopen.h:3539
@ miopenRNNunidirection
Definition: miopen.h:3538
@ miopenRNNwithBias
Definition: miopen.h:3548
@ miopenRNNNoBias
Definition: miopen.h:3547
@ miopenRNNDataSeqMajorPadded
Definition: miopen.h:3584
@ miopenRNNDataSeqMajorNotPadded
Definition: miopen.h:3583
@ miopenRNNDataBatchMajorPadded
Definition: miopen.h:3585
@ miopenRNNDataUnknownLayout
Definition: miopen.h:3582
@ miopenRNNfundamental
Definition: miopen.h:3529
@ miopenRNNdefault
Definition: miopen.h:3527
@ miopenRNNTraining
Definition: miopen.h:3573
@ miopenRNNInference
Definition: miopen.h:3574
@ miopenRNNAlgoGEMM
Definition: miopen.h:3556
@ miopenRNNIOWithPadding
Definition: miopen.h:3565
@ miopenRNNIONotPadded
Definition: miopen.h:3564
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:5906
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 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.
miopenReduceTensorIndices_t
Definition: miopen.h:604
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:569
miopenIndicesType_t
Definition: miopen.h:614
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 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:516
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 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 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 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:506
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:1211
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:1174
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:1197
miopenConvolutionAttrib_t
Definition: miopen.h:626
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:431
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:1186
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:1213
@ miopenConvolutionAlgoWinograd
Definition: miopen.h:1215
@ miopenConvolutionAlgoFFT
Definition: miopen.h:1214
@ miopenConvolutionAlgoImplicitGEMM
Definition: miopen.h:1216
@ miopenConvolutionAlgoGEMM
Definition: miopen.h:1212
@ miopenConvolutionFwdAlgoFFT
Definition: miopen.h:1177
@ miopenConvolutionFwdAlgoImplicitGEMM
Definition: miopen.h:1179
@ miopenConvolutionFwdAlgoGEMM
Definition: miopen.h:1175
@ miopenConvolutionFwdAlgoWinograd
Definition: miopen.h:1178
@ miopenConvolutionFwdAlgoDirect
Definition: miopen.h:1176
@ miopenTransposeBwdDataAlgoGEMM
Definition: miopen.h:1202
@ miopenConvolutionBwdDataAlgoDirect
Definition: miopen.h:1199
@ miopenConvolutionBwdDataAlgoGEMM
Definition: miopen.h:1198
@ miopenConvolutionBwdDataAlgoFFT
Definition: miopen.h:1200
@ miopenConvolutionBwdDataAlgoWinograd
Definition: miopen.h:1201
@ miopenConvolutionBwdDataAlgoImplicitGEMM
Definition: miopen.h:1204
@ miopenConvolutionBwdWeightsAlgoGEMM
Definition: miopen.h:1187
@ miopenConvolutionBwdWeightsAlgoWinograd
Definition: miopen.h:1189
@ miopenConvolutionBwdWeightsAlgoDirect
Definition: miopen.h:1188
@ miopenConvolutionBwdWeightsAlgoImplicitGEMM
Definition: miopen.h:1190
miopenStatus_t miopenDestroyDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc)
Destroys the dropout descriptor object.
miopenRNGType_t
Definition: miopen.h:5019
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:5020
miopenFindResultsOrder_t
Definition: miopen.h:5448
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.
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 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:5369
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)
Initializes a problem object describing a Mha operation.
miopenProblemDirection_t
Definition: miopen.h:5356
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:5450
@ miopenFindResultsOrderByTime
Definition: miopen.h:5449
@ miopenTensorMhaDescaleS
Definition: miopen.h:5381
@ miopenTensorMhaO
Definition: miopen.h:5387
@ miopenTensorMhaAmaxDV
Definition: miopen.h:5405
@ miopenTensorBatchnormScaleDiff
Definition: miopen.h:5427
@ miopenTensorMhaDescaleDS
Definition: miopen.h:5395
@ miopenTensorMhaDropoutSeed
Definition: miopen.h:5385
@ miopenTensorBatchnormSavedMean
Definition: miopen.h:5424
@ miopenTensorActivationDY
Definition: miopen.h:5412
@ miopenTensorBatchnormDX
Definition: miopen.h:5432
@ miopenTensorMhaDescaleV
Definition: miopen.h:5380
@ miopenTensorMhaK
Definition: miopen.h:5375
@ miopenTensorConvolutionX
Definition: miopen.h:5371
@ miopenTensorMhaAmaxDK
Definition: miopen.h:5404
@ miopenTensorMhaScaleDS
Definition: miopen.h:5396
@ miopenTensorBatchnormBias
Definition: miopen.h:5430
@ miopenTensorMhaM
Definition: miopen.h:5390
@ miopenTensorBatchnormRunningMean
Definition: miopen.h:5422
@ miopenTensorMhaDropoutProbability
Definition: miopen.h:5384
@ miopenTensorSoftmaxY
Definition: miopen.h:5417
@ miopenTensorSoftmaxDY
Definition: miopen.h:5419
@ miopenTensorMhaDescaleO
Definition: miopen.h:5393
@ miopenTensorMhaScaleO
Definition: miopen.h:5383
@ miopenScalarBatchnormExpAvgFactor
Definition: miopen.h:5439
@ miopenTensorBatchnormScale
Definition: miopen.h:5426
@ miopenTensorBatchnormRunningVariance
Definition: miopen.h:5423
@ miopenTensorActivationDX
Definition: miopen.h:5411
@ miopenTensorMhaScaleDK
Definition: miopen.h:5398
@ miopenTensorMhaV
Definition: miopen.h:5377
@ miopenTensorMhaAmaxS
Definition: miopen.h:5389
@ miopenTensorBatchnormBiasDiff
Definition: miopen.h:5431
@ miopenTensorBatchnormSavedVariance
Definition: miopen.h:5425
@ miopenTensorActivationX
Definition: miopen.h:5409
@ miopenTensorMhaScaleDV
Definition: miopen.h:5399
@ miopenTensorMhaAmaxO
Definition: miopen.h:5388
@ miopenScalarBatchnormEpsilon
Definition: miopen.h:5440
@ miopenTensorMhaScaleDQ
Definition: miopen.h:5397
@ miopenTensorSoftmaxDX
Definition: miopen.h:5418
@ miopenTensorMhaAmaxDS
Definition: miopen.h:5406
@ miopenTensorMhaDV
Definition: miopen.h:5402
@ miopenTensorMhaQ
Definition: miopen.h:5376
@ miopenTensorMhaAmaxDQ
Definition: miopen.h:5403
@ miopenTensorConvolutionY
Definition: miopen.h:5373
@ miopenTensorBatchnormEstimatedMean
Definition: miopen.h:5428
@ miopenTensorBatchnormDY
Definition: miopen.h:5433
@ miopenTensorMhaZInv
Definition: miopen.h:5391
@ miopenTensorMhaDescaleQ
Definition: miopen.h:5379
@ miopenTensorBatchnormEstimatedVariance
Definition: miopen.h:5429
@ miopenTensorArgumentIsScalar
Definition: miopen.h:5436
@ miopenTensorArgumentIdInvalid
Definition: miopen.h:5370
@ miopenTensorMhaDO
Definition: miopen.h:5392
@ miopenTensorMhaDescaleDO
Definition: miopen.h:5394
@ miopenTensorConvolutionW
Definition: miopen.h:5372
@ miopenTensorMhaDescaleK
Definition: miopen.h:5378
@ miopenTensorMhaDropoutOffset
Definition: miopen.h:5386
@ miopenTensorBiasY
Definition: miopen.h:5414
@ miopenTensorMhaDQ
Definition: miopen.h:5400
@ miopenTensorSoftmaxX
Definition: miopen.h:5416
@ miopenTensorBatchnormY
Definition: miopen.h:5421
@ miopenTensorMhaScaleS
Definition: miopen.h:5382
@ miopenTensorBias
Definition: miopen.h:5415
@ miopenTensorActivationY
Definition: miopen.h:5410
@ miopenTensorBatchnormX
Definition: miopen.h:5420
@ miopenTensorBiasX
Definition: miopen.h:5413
@ miopenTensorMhaDK
Definition: miopen.h:5401
@ miopenProblemDirectionBackwardWeights
Definition: miopen.h:5359
@ miopenProblemDirectionInference
Definition: miopen.h:5361
@ miopenProblemDirectionForward
Definition: miopen.h:5357
@ miopenProblemDirectionBackward
Definition: miopen.h:5358
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:155
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:106
miopenStatus_t miopenSetAllocator(miopenHandle_t handle, miopenAllocatorFunction allocator, miopenDeallocatorFunction deallocator, void *allocatorContext)
Set allocator for previously created miopenHandle.
miopenF8RoundingMode_t
Definition: miopen.h:122
void *(* miopenAllocatorFunction)(void *context, size_t sizeBytes)
Custom allocator function.
Definition: miopen.h:145
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:115
@ miopenStatusGpuOperationsSkipped
Definition: miopen.h:116
@ miopenStatusUnknownError
Definition: miopen.h:114
@ miopenStatusSuccess
Definition: miopen.h:107
@ miopenStatusVersionMismatch
Definition: miopen.h:117
@ miopenStatusAllocFailed
Definition: miopen.h:111
@ miopenStatusNotImplemented
Definition: miopen.h:113
@ miopenStatusBadParm
Definition: miopen.h:110
@ miopenStatusNotInitialized
Definition: miopen.h:108
@ miopenStatusInternalError
Definition: miopen.h:112
@ miopenStatusInvalidValue
Definition: miopen.h:109
@ miopenF8RoundingModeStandard
Definition: miopen.h:123
@ miopenF8RoundingModeStochastic
Definition: miopen.h:124
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:487
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:454
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:407
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:467
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 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:549
miopenSoftmaxAlgorithm_t
Definition: miopen.h:538
miopenStatus_t miopenSumForward(miopenHandle_t handle, miopenSumNanPropagation_t nanPropagation, void *workspace, size_t workspaceSizeInBytes, const miopenTensorDescriptor_t xDesc, const void *x, const int32_t dim, const miopenTensorDescriptor_t yDesc, void *y)
Execute a sum forward layer.
miopenSumNanPropagation_t
Definition: miopen.h:5846
miopenStatus_t miopenGetSumWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const int32_t dim, const miopenTensorDescriptor_t yDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the ReduceTensor call.
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:390
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:365
miopenStatus_t miopenCreateSeqTensorDescriptor(miopenSeqTensorDescriptor_t *tensorDesc)
Create a Tensor Descriptor for sequence data.
miopenTensorOp_t
Definition: miopen.h:419
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:443
@ miopenPaddingDefault
Definition: miopen.h:444
@ miopenPaddingSame
Definition: miopen.h:445
@ miopenPaddingValid
Definition: miopen.h:446
#define MIOPEN_DECLARE_OBJECT(name)
Definition: miopen.h:76
miopenNanPropagation_t
Definition: miopen.h:594
@ MIOPEN_PROPAGATE_NAN
Definition: miopen.h:596
@ MIOPEN_NOT_PROPAGATE_NAN
Definition: miopen.h:595
@ miopenPoolingAverage
Definition: miopen.h:456
@ miopenPoolingAverageInclusive
Definition: miopen.h:457
@ miopenPoolingMax
Definition: miopen.h:455
@ miopenTensorCHWN
Definition: miopen.h:393
@ miopenTensorNHWC
Definition: miopen.h:392
@ miopenTensorNDHWC
Definition: miopen.h:399
@ miopenTensorNCHW
Definition: miopen.h:391
@ miopenTensorCHWNc4
Definition: miopen.h:396
@ miopenTensorNCHWc8
Definition: miopen.h:395
@ miopenTensorNCDHW
Definition: miopen.h:398
@ miopenTensorCHWNc8
Definition: miopen.h:397
@ miopenTensorNCHWc4
Definition: miopen.h:394
@ MIOPEN_REDUCE_TENSOR_FLATTENED_INDICES
Definition: miopen.h:606
@ MIOPEN_REDUCE_TENSOR_NO_INDICES
Definition: miopen.h:605
@ miopenActivationLEAKYRELU
Definition: miopen.h:526
@ miopenActivationPASTHRU
Definition: miopen.h:517
@ miopenActivationABS
Definition: miopen.h:522
@ miopenActivationLOGISTIC
Definition: miopen.h:518
@ miopenActivationCLIPPEDRELU
Definition: miopen.h:524
@ miopenActivationRELU
Definition: miopen.h:520
@ miopenActivationPOWER
Definition: miopen.h:523
@ miopenActivationELU
Definition: miopen.h:528
@ miopenActivationSOFTRELU
Definition: miopen.h:521
@ miopenActivationTANH
Definition: miopen.h:519
@ MIOPEN_REDUCE_TENSOR_MUL
Definition: miopen.h:571
@ MIOPEN_REDUCE_TENSOR_MAX
Definition: miopen.h:575
@ MIOPEN_REDUCE_TENSOR_AVG
Definition: miopen.h:579
@ MIOPEN_REDUCE_TENSOR_NORM1
Definition: miopen.h:581
@ MIOPEN_REDUCE_TENSOR_AMAX
Definition: miopen.h:577
@ MIOPEN_REDUCE_TENSOR_MIN
Definition: miopen.h:573
@ MIOPEN_REDUCE_TENSOR_ADD
Definition: miopen.h:570
@ MIOPEN_REDUCE_TENSOR_NORM2
Definition: miopen.h:583
@ MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC
Definition: miopen.h:631
@ MIOPEN_CONVOLUTION_ATTRIB_FP8_ROUNDING_MODE
Definition: miopen.h:635
@ MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL
Definition: miopen.h:627
@ miopenIndexUint16
Definition: miopen.h:409
@ miopenIndexUint64
Definition: miopen.h:411
@ miopenIndexUint32
Definition: miopen.h:410
@ miopenIndexUint8
Definition: miopen.h:408
@ miopenFloat
Definition: miopen.h:367
@ miopenBFloat16
Definition: miopen.h:371
@ miopenInt8
Definition: miopen.h:369
@ miopenInt32
Definition: miopen.h:368
@ miopenHalf
Definition: miopen.h:366
@ miopenBFloat8
Definition: miopen.h:376
@ miopenInt64
Definition: miopen.h:381
@ miopenDouble
Definition: miopen.h:373
@ miopenFloat8
Definition: miopen.h:375
@ MIOPEN_8BIT_INDICES
Definition: miopen.h:618
@ MIOPEN_32BIT_INDICES
Definition: miopen.h:615
@ MIOPEN_16BIT_INDICES
Definition: miopen.h:617
@ MIOPEN_64BIT_INDICES
Definition: miopen.h:616
@ miopenPoolingWorkspaceIndexImage
Definition: miopen.h:469
@ miopenPoolingWorkspaceIndexMask
Definition: miopen.h:468
@ miopenDepthwise
Definition: miopen.h:435
@ miopenGroupConv
Definition: miopen.h:434
@ miopenTranspose
Definition: miopen.h:433
@ miopenConvolution
Definition: miopen.h:432
@ MIOPEN_ELEMENTWISE_AFFINE_FUSED_ADD
Definition: miopen.h:491
@ MIOPEN_WEIGHT_BIAS
Definition: miopen.h:489
@ MIOPEN_ELEMENTWISE_AFFINE
Definition: miopen.h:488
@ MIOPEN_WEIGHT_BIAS_T5
Definition: miopen.h:497
@ MIOPEN_ELEMENTWISE_AFFINE_T5
Definition: miopen.h:495
@ MIOPEN_WEIGHT_BIAS_FUSED_ADD
Definition: miopen.h:493
@ MIOPEN_SUM_NOT_PROPAGATE_NAN
Definition: miopen.h:5847
@ MIOPEN_SUM_PROPAGATE_NAN
Definition: miopen.h:5848
@ MIOPEN_REDUCE_EXTREME_ARGMAX
Definition: miopen.h:5909
@ MIOPEN_REDUCE_EXTREME_MIN
Definition: miopen.h:5911
@ MIOPEN_REDUCE_EXTREME_MAX
Definition: miopen.h:5913
@ MIOPEN_REDUCE_EXTREME_ARGMIN
Definition: miopen.h:5907
@ miopenTensorOpMin
Definition: miopen.h:422
@ miopenTensorOpAdd
Definition: miopen.h:420
@ miopenTensorOpMul
Definition: miopen.h:421
@ miopenTensorOpMax
Definition: miopen.h:423
@ miopenBNSpatial
Definition: miopen.h:508
@ miopenBNPerActivation
Definition: miopen.h:507
@ miopenLRNWithinChannel
Definition: miopen.h:478
@ miopenLRNCrossChannel
Definition: miopen.h:479
@ MIOPEN_SOFTMAX_MODE_INSTANCE
Definition: miopen.h:550
@ MIOPEN_SOFTMAX_MODE_CHANNEL
Definition: miopen.h:551
@ MIOPEN_SOFTMAX_FAST
Definition: miopen.h:539
@ MIOPEN_SOFTMAX_ACCURATE
Definition: miopen.h:540
@ MIOPEN_SOFTMAX_LOG
Definition: miopen.h:541
Perf struct for forward, backward filter, or backward data algorithms.
Definition: miopen.h:1226
miopenConvFwdAlgorithm_t fwd_algo
Definition: miopen.h:1229
miopenConvBwdDataAlgorithm_t bwd_data_algo
Definition: miopen.h:1233
size_t memory
Definition: miopen.h:1237
miopenConvBwdWeightsAlgorithm_t bwd_weights_algo
Definition: miopen.h:1230
float time
Definition: miopen.h:1236
Performance struct for forward, backward filter, or backward data algorithms in immediate mode.
Definition: miopen.h:1250
miopenConvAlgorithm_t algorithm
Definition: miopen.h:1257
uint64_t solution_id
Definition: miopen.h:1256
size_t workspace_size
Definition: miopen.h:1254
float time
Definition: miopen.h:1251
Values of a tensor or scalar argument for the miopenRunSolution function.
Definition: miopen.h:5660
miopenTensorArgumentId_t id
Definition: miopen.h:5663
void * buffer
Definition: miopen.h:5673
miopenTensorDescriptor_t * descriptor
Definition: miopen.h:5669