hanzo-rocm 0.5.2

Rust bindings for AMD ROCm libraries
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
/* automatically generated by rust-bindgen 0.71.1 */

pub const MIOPEN_BACKEND_OPENCL: u32 = 0;
pub const MIOPEN_BACKEND_HIP: u32 = 1;
pub const MIOPEN_MODE_NOGPU: u32 = 0;
pub const MIOPEN_USE_ROCBLAS: u32 = 1;
pub const MIOPEN_USE_HIPBLASLT: u32 = 1;
pub const MIOPEN_USE_ROCTRACER: u32 = 1;
pub const MIOPEN_BUILD_DEV: u32 = 0;
pub const MIOPEN_GPU_SYNC: u32 = 0;
pub const MIOPEN_ENABLE_SQLITE: u32 = 1;
pub const MIOPEN_ENABLE_SQLITE_KERN_CACHE: u32 = 1;
pub const MIOPEN_DEBUG_FIND_DB_CACHING: u32 = 1;
pub const MIOPEN_USE_COMGR: u32 = 1;
pub const MIOPEN_USE_HIPRTC: u32 = 1;
pub const MIOPEN_USE_HIP_KERNELS: u32 = 1;
pub const MIOPEN_DISABLE_USERDB: u32 = 0;
pub const MIOPEN_EMBED_DB: u32 = 0;
pub const MIOPEN_DISABLE_SYSDB: u32 = 0;
pub const MIOPEN_LOG_FUNC_TIME_ENABLE: u32 = 0;
pub const MIOPEN_ENABLE_SQLITE_BACKOFF: u32 = 1;
pub const MIOPEN_USE_MLIR: u32 = 0;
pub const MIOPEN_USE_COMPOSABLEKERNEL: u32 = 1;
pub const MIOPEN_BUILD_DRIVER: u32 = 1;
pub const MIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK: u32 = 1;
pub const MIOPEN_ENABLE_AI_KERNEL_TUNING: u32 = 1;
pub const MIOPEN_HIP_COMPILER_HAS_OPTION_OFFLOAD_UNIFORM_BLOCK: u32 = 1;
pub const MIOPEN_ENABLE_FIN_INTERFACE: u32 = 0;
pub const MIOPEN_AMD_COMGR_VERSION_MAJOR: u32 = 3;
pub const MIOPEN_AMD_COMGR_VERSION_MINOR: u32 = 0;
pub const MIOPEN_AMD_COMGR_VERSION_PATCH: u32 = 0;
pub const MIOPEN_USE_RNE_BFLOAT16: u32 = 1;
pub const MIOPEN_FP8_IEEE_EXPONENT_BIAS: u32 = 0;
pub const MIOPEN_FP8_CLIPPING: u32 = 1;
pub const MIOPEN_OFFLINE_COMPILER_PATHS_V2: u32 = 0;
pub const MIOPEN_AMDGCN_ASSEMBLER: &[u8; 90] =
    b"/home/runner/_work/rockrel/rockrel/output/build/compiler/amd-llvm/dist/lib/llvm/bin/clang\0";
pub const MIOPEN_HIP_COMPILER: &[u8; 83] =
    b"/home/runner/_work/rockrel/rockrel/output/build/core/clr/dist/lib/llvm/bin/clang++\0";
pub const MIOPEN_OFFLOADBUNDLER_BIN : & [u8 ; 106] = b"/home/runner/_work/rockrel/rockrel/output/build/compiler/amd-llvm/dist/lib/llvm/bin/clang-offload-bundler\0" ;
pub const MIOPEN_CACHE_DIR: &[u8; 17] = b"~/.cache/miopen/\0";
pub const MIOPEN_USE_SQLITE_PERFDB: u32 = 0;
pub const MIOPEN_NDEBUG: u32 = 0;
pub const MIOPEN_ALLOC_BUFFERS: u32 = 0;
pub const MIOPEN_ROCBLAS_VERSION_MAJOR: u32 = 5;
pub const MIOPEN_ROCBLAS_VERSION_MINOR: u32 = 4;
pub const MIOPEN_ROCBLAS_VERSION_PATCH: u32 = 0;
pub const MIOPEN_ROCBLAS_VERSION_FLAT: u32 = 5004000;
pub const MIOPEN_HIPBLASLT_VERSION_MAJOR: u32 = 1;
pub const MIOPEN_HIPBLASLT_VERSION_MINOR: u32 = 3;
pub const MIOPEN_HIPBLASLT_VERSION_PATCH: u32 = 0;
pub const MIOPEN_HIPBLASLT_VERSION_FLAT: u32 = 1003000;
pub const MIOPEN_GOLDEN_DB_VERSION: u32 = 21;
pub const MIOPEN_API_VERSION_REDUCE_TENSOR: u32 = 1;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ihipStream_t {
    _unused: [u8; 0],
}
pub type hipStream_t = *mut ihipStream_t;
pub type miopenAcceleratorQueue_t = hipStream_t;
#[doc = " @ingroup handle\n @brief Creates the miopenHandle_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenHandle {
    pub _address: u8,
}
#[doc = " @ingroup handle\n @brief Creates the miopenHandle_t type"]
pub type miopenHandle_t = *mut miopenHandle;
#[doc = "< No errors"]
pub const miopenStatus_t_miopenStatusSuccess: miopenStatus_t = 0;
#[doc = "< Data not initialized."]
pub const miopenStatus_t_miopenStatusNotInitialized: miopenStatus_t = 1;
#[doc = "< Incorrect variable value."]
pub const miopenStatus_t_miopenStatusInvalidValue: miopenStatus_t = 2;
#[doc = "< Incorrect parameter detected."]
pub const miopenStatus_t_miopenStatusBadParm: miopenStatus_t = 3;
#[doc = "< Memory allocation error."]
pub const miopenStatus_t_miopenStatusAllocFailed: miopenStatus_t = 4;
#[doc = "< MIOpen failure."]
pub const miopenStatus_t_miopenStatusInternalError: miopenStatus_t = 5;
#[doc = "< Use of unimplemented feature."]
pub const miopenStatus_t_miopenStatusNotImplemented: miopenStatus_t = 6;
#[doc = "< Unknown error occurred."]
pub const miopenStatus_t_miopenStatusUnknownError: miopenStatus_t = 7;
#[doc = "< Unsupported operator for fusion."]
pub const miopenStatus_t_miopenStatusUnsupportedOp: miopenStatus_t = 8;
#[doc = "< This is not an error."]
pub const miopenStatus_t_miopenStatusGpuOperationsSkipped: miopenStatus_t = 9;
#[doc = "< Version mismatch of the supplied binary data argment."]
pub const miopenStatus_t_miopenStatusVersionMismatch: miopenStatus_t = 10;
#[doc = " @enum miopenStatus_t\n Error codes that are returned by all MIOpen API calls."]
pub type miopenStatus_t = ::std::os::raw::c_uint;
#[doc = "< Use TF32 if possible"]
pub const miopenMathType_t_miopenMathDefault: miopenMathType_t = 0;
pub const miopenMathType_t_miopenMathPedantic: miopenMathType_t = 1;
pub type miopenMathType_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Get character string for an error code.\n\n A function which returns a NULL terminated character string of the error code.\n\n @param error  miopenStatus_t type error status (input)\n @return       errorString"]
    pub fn miopenGetErrorString(error: miopenStatus_t) -> *const ::std::os::raw::c_char;
}
#[doc = " @brief Custom allocator function\n\n This function allow for user-defined custom allocator\n\n @param context     A pointer a context (input)\n @param sizeBytes   Number of bytes to allocate (input)\n"]
pub type miopenAllocatorFunction = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut ::std::os::raw::c_void,
        sizeBytes: usize,
    ) -> *mut ::std::os::raw::c_void,
>;
#[doc = " @brief Custom deallocator function\n\n This function allow for user-defined custom deallocation function\n\n @param context     A pointer context (input)\n @param memory      A pointer allocated memory (input)\n"]
pub type miopenDeallocatorFunction = ::std::option::Option<
    unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, memory: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
    #[doc = " @brief Method to return version of MIOpen\n\n The output values of this call follow from the versioning\n format major.minor.patch\n\n Pointers that are NULL will be ignored.\n\n @param major     Major version number (output)\n @param minor     Minor version number (output)\n @param patch     Patch version number (output)\n\n @return          miopenStatus_t"]
    pub fn miopenGetVersion(
        major: *mut usize,
        minor: *mut usize,
        patch: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Method to create the MIOpen handle object.\n\n This function creates a MIOpen handle. This is called at the very start to initialize the MIOpen\n environment.\n @param handle     A pointer to a MIOpen handle type (output)\n\n @return           miopenStatus_t"]
    pub fn miopenCreate(handle: *mut miopenHandle_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Create a MIOpen handle with an accelerator stream.\n\n The HIP side uses a hipStream_t type for the stream, while OpenCL will use a\n cl_command_queue.\n\n Create a handle with a previously created accelerator command queue.\n @param handle     A pointer to a MIOpen handle type (output)\n @param stream      An accelerator queue type (input)\n\n @return           miopenStatus_t"]
    pub fn miopenCreateWithStream(
        handle: *mut miopenHandle_t,
        stream: miopenAcceleratorQueue_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the MIOpen handle.\n\n This is called when breaking down the MIOpen environment.\n @param handle     MIOpen handle (input)\n @return           miopenStatus_t"]
    pub fn miopenDestroy(handle: miopenHandle_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set accelerator command queue previously created\n\n Set a command queue for an accelerator device\n @param handle     MIOpen handle (input)\n @param streamID   An accelerator queue type (input)\n @return           miopenStatus_t"]
    pub fn miopenSetStream(
        handle: miopenHandle_t,
        streamID: miopenAcceleratorQueue_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the previously created accelerator command queue\n\n Creates a command queue for an accelerator device\n @param handle     MIOpen handle (input)\n @param streamID   Pointer to a accelerator queue type (output)\n @return           miopenStatus_t"]
    pub fn miopenGetStream(
        handle: miopenHandle_t,
        streamID: *mut miopenAcceleratorQueue_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set allocator for previously created miopenHandle\n\n Set a command queue for an accelerator device\n @param handle     MIOpen handle\n @param allocator  A callback function MIOpen will use for internal memory allocations.\n      The provided callback function should allocate device memory with requested size\n      and return a pointer to this memory.\n      Passing 0 will restore the default MIOpen allocator and deallocator.\n @param deallocator  A callback function MIOpen will use to for internal memory deallocation.\n      The provided callback function should free the specified memory pointer\n @param allocatorContext  User-specified pointer which is passed to \\p allocator and \\p\n deallocator\n      This allows the callback function to access state set by the caller to this function,\n      for example a stateful heap allocator or a c++ class.\n @return           miopenStatus_t"]
    pub fn miopenSetAllocator(
        handle: miopenHandle_t,
        allocator: miopenAllocatorFunction,
        deallocator: miopenDeallocatorFunction,
        allocatorContext: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get time for last kernel launched\n\n This function is used only when profiling mode has been enabled.\n Kernel timings are based on the MIOpen handle and is not thread-safe.\n In order to use multi-threaded profiling, create an MIOpen handle for each\n concurrent thread.\n\n @param handle     MIOpen handle (input)\n @param time       Pointer to a float type to contain kernel time in milliseconds (output)\n @return           miopenStatus_t"]
    pub fn miopenGetKernelTime(handle: miopenHandle_t, time: *mut f32) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Enable profiling to retrieve kernel time\n\n Enable or disable kernel profiling. This profiling is only for kernel time.\n @param handle     MIOpen handle (input)\n @param enable     Boolean to toggle profiling (input)\n @return           miopenStatus_t"]
    pub fn miopenEnableProfiling(handle: miopenHandle_t, enable: bool) -> miopenStatus_t;
}
#[doc = " @ingroup fusion\n @brief Creates the miopenFusionOpDescriptor_t type\n\n Fusion Operator Descriptor contains the meta-data associated with an operator\n to be fused in a compute graph\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenFusionOpDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup fusion\n @brief Creates the miopenFusionOpDescriptor_t type\n\n Fusion Operator Descriptor contains the meta-data associated with an operator\n to be fused in a compute graph\n"]
pub type miopenFusionOpDescriptor_t = *mut miopenFusionOpDescriptor;
#[doc = " @ingroup tensor\n @brief Creates the miopenTensorDescriptor_t type\n\n Tensor descriptor is an object that allows the user to specify a layer's size for each\n dimension and dimension strides.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenTensorDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup tensor\n @brief Creates the miopenTensorDescriptor_t type\n\n Tensor descriptor is an object that allows the user to specify a layer's size for each\n dimension and dimension strides.\n"]
pub type miopenTensorDescriptor_t = *mut miopenTensorDescriptor;
#[doc = " @ingroup tensor\n @brief Creates the miopenSeqTensorDescriptor_t type\n\n SeqTensor descriptor is an object that allows the user to specify tensor with sequence dimension.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenSeqTensorDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup tensor\n @brief Creates the miopenSeqTensorDescriptor_t type\n\n SeqTensor descriptor is an object that allows the user to specify tensor with sequence dimension.\n"]
pub type miopenSeqTensorDescriptor_t = *mut miopenSeqTensorDescriptor;
#[doc = " @ingroup convolutions\n @brief Creates the miopenConvolutionDescriptor_t type\n\n Convolution descriptor is an object that allows the user to specify a layer's padding, stride,\n and dilation of the convolutional filter. Parameters must all be non-negative.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenConvolutionDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup convolutions\n @brief Creates the miopenConvolutionDescriptor_t type\n\n Convolution descriptor is an object that allows the user to specify a layer's padding, stride,\n and dilation of the convolutional filter. Parameters must all be non-negative.\n"]
pub type miopenConvolutionDescriptor_t = *mut miopenConvolutionDescriptor;
#[doc = " @ingroup pooling\n @brief Creates the miopenPoolingDescriptor_t type\n\n Pooling descriptor is an object that allows the user to specify the dimension sizes of the\n pooling windows, paddings, strides, and pooling mode.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenPoolingDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup pooling\n @brief Creates the miopenPoolingDescriptor_t type\n\n Pooling descriptor is an object that allows the user to specify the dimension sizes of the\n pooling windows, paddings, strides, and pooling mode.\n"]
pub type miopenPoolingDescriptor_t = *mut miopenPoolingDescriptor;
#[doc = " @ingroup LRN\n  @brief Creates the miopenLRNDescriptor_t type\n\n LRN descriptor is an object that allows the user to specify the LRN mode, the number of elements\n in the normalization window, and the LRN k-parameter.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenLRNDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup LRN\n  @brief Creates the miopenLRNDescriptor_t type\n\n LRN descriptor is an object that allows the user to specify the LRN mode, the number of elements\n in the normalization window, and the LRN k-parameter.\n"]
pub type miopenLRNDescriptor_t = *mut miopenLRNDescriptor;
#[doc = " @ingroup activation\n @brief Creates the miopenActivationDescriptor_t type\n\n Activation descriptor is an object that allows the user to specify the activation mode.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenActivationDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup activation\n @brief Creates the miopenActivationDescriptor_t type\n\n Activation descriptor is an object that allows the user to specify the activation mode.\n"]
pub type miopenActivationDescriptor_t = *mut miopenActivationDescriptor;
#[doc = " @ingroup RNN\n @brief Creates the miopenRNNDescriptor_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenRNNDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup RNN\n @brief Creates the miopenRNNDescriptor_t type"]
pub type miopenRNNDescriptor_t = *mut miopenRNNDescriptor;
#[doc = " @ingroup LossFunction\n @brief Creates the miopenCTCLossDescriptor_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenCTCLossDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup LossFunction\n @brief Creates the miopenCTCLossDescriptor_t type"]
pub type miopenCTCLossDescriptor_t = *mut miopenCTCLossDescriptor;
#[doc = " @ingroup Dropout\n @brief Creates the miopenDropoutDescriptor_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenDropoutDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup Dropout\n @brief Creates the miopenDropoutDescriptor_t type"]
pub type miopenDropoutDescriptor_t = *mut miopenDropoutDescriptor;
#[doc = " @ingroup TensorReduce\n @brief Creates the miopenReduceTensorDescriptor_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenReduceTensorDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup TensorReduce\n @brief Creates the miopenReduceTensorDescriptor_t type"]
pub type miopenReduceTensorDescriptor_t = *mut miopenReduceTensorDescriptor;
#[doc = " @ingroup mha\n @brief Creates the miopenMhaDescriptor_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenMhaDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup mha\n @brief Creates the miopenMhaDescriptor_t type"]
pub type miopenMhaDescriptor_t = *mut miopenMhaDescriptor;
#[doc = " @ingroup softmax\n @brief Creates the miopenSoftmaxDescriptor_t type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenSoftmaxDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup softmax\n @brief Creates the miopenSoftmaxDescriptor_t type"]
pub type miopenSoftmaxDescriptor_t = *mut miopenSoftmaxDescriptor;
#[doc = "< 16-bit floating point (Fully supported)"]
pub const miopenDataType_t_miopenHalf: miopenDataType_t = 0;
#[doc = "< 32-bit floating point (Fully supported)"]
pub const miopenDataType_t_miopenFloat: miopenDataType_t = 1;
#[doc = "< 32-bit integer (Partially supported)"]
pub const miopenDataType_t_miopenInt32: miopenDataType_t = 2;
#[doc = "< 8-bit integer (Partially supported)"]
pub const miopenDataType_t_miopenInt8: miopenDataType_t = 3;
#[doc = "< 16-bit binary floating point (8-bit exponent, 7-bit fraction)\n(Partially supported)"]
pub const miopenDataType_t_miopenBFloat16: miopenDataType_t = 5;
#[doc = "< 64-bit floating point (Partially supported)"]
pub const miopenDataType_t_miopenDouble: miopenDataType_t = 6;
pub const miopenDataType_t_miopenFloat8_fnuz: miopenDataType_t = 7;
pub const miopenDataType_t_miopenBFloat8_fnuz: miopenDataType_t = 8;
pub const miopenDataType_t_miopenInt64: miopenDataType_t = 9;
#[doc = " @ingroup tensor\n @enum miopenDataType_t\n MIOpen floating point datatypes. Both 32-bit and 16-bit floats are supported in MIOpen."]
pub type miopenDataType_t = ::std::os::raw::c_uint;
#[doc = "< NCHW memory layout (Fully supported)"]
pub const miopenTensorLayout_t_miopenTensorNCHW: miopenTensorLayout_t = 0;
#[doc = "< NHWC memory layout (Fully supported)"]
pub const miopenTensorLayout_t_miopenTensorNHWC: miopenTensorLayout_t = 1;
#[doc = "< CHWN memory layout (Not supported)"]
pub const miopenTensorLayout_t_miopenTensorCHWN: miopenTensorLayout_t = 2;
#[doc = "< NCHWc4 memory layout (Partially supported)"]
pub const miopenTensorLayout_t_miopenTensorNCHWc4: miopenTensorLayout_t = 3;
#[doc = "< NCHWc8 memory layout (Partially supported)"]
pub const miopenTensorLayout_t_miopenTensorNCHWc8: miopenTensorLayout_t = 4;
#[doc = "< CHWNc4 memory layout (Partially supported)"]
pub const miopenTensorLayout_t_miopenTensorCHWNc4: miopenTensorLayout_t = 5;
#[doc = "< CHWNc8 memory layout (Partially supported)"]
pub const miopenTensorLayout_t_miopenTensorCHWNc8: miopenTensorLayout_t = 6;
#[doc = "< NCDHW memory layout (Fully supported)"]
pub const miopenTensorLayout_t_miopenTensorNCDHW: miopenTensorLayout_t = 7;
#[doc = "< NCDHW memory layout (Fully supported)"]
pub const miopenTensorLayout_t_miopenTensorNDHWC: miopenTensorLayout_t = 8;
#[doc = " @ingroup tensor\n @enum miopenTensorLayout_t\n Tensor layouts supported by MIOpen.\n miopenTensorCHWNc4 and miopenTensorCHWNc8 layout only support weight tensor."]
pub type miopenTensorLayout_t = ::std::os::raw::c_uint;
#[doc = "<  8-bit unsigned"]
pub const miopenIndexType_t_miopenIndexUint8: miopenIndexType_t = 0;
#[doc = "< 16-bit unsigned"]
pub const miopenIndexType_t_miopenIndexUint16: miopenIndexType_t = 1;
#[doc = "< 32-bit unsigned"]
pub const miopenIndexType_t_miopenIndexUint32: miopenIndexType_t = 2;
#[doc = "< 64-bit unsigned"]
pub const miopenIndexType_t_miopenIndexUint64: miopenIndexType_t = 3;
#[doc = " @ingroup pooling\n @enum miopenIndexType_t\n MIOpen index datatypes."]
pub type miopenIndexType_t = ::std::os::raw::c_uint;
#[doc = "< Add tensors element-wise"]
pub const miopenTensorOp_t_miopenTensorOpAdd: miopenTensorOp_t = 0;
#[doc = "< Multiply two tensors element-wise"]
pub const miopenTensorOp_t_miopenTensorOpMul: miopenTensorOp_t = 1;
#[doc = "< Minimum of tensor element pairs"]
pub const miopenTensorOp_t_miopenTensorOpMin: miopenTensorOp_t = 2;
#[doc = "< Maximum of tensor element pairs"]
pub const miopenTensorOp_t_miopenTensorOpMax: miopenTensorOp_t = 3;
#[doc = " @ingroup tensor\n @enum miopenTensorOp_t\n Element-wise tensor operation modes"]
pub type miopenTensorOp_t = ::std::os::raw::c_uint;
#[doc = "< Cross-Correlation convolution"]
pub const miopenConvolutionMode_t_miopenConvolution: miopenConvolutionMode_t = 0;
#[doc = "< Transpose convolutions -- deconvolution"]
pub const miopenConvolutionMode_t_miopenTranspose: miopenConvolutionMode_t = 1;
#[doc = "< Deprecated Group convolution legacy, ToBe Removed"]
pub const miopenConvolutionMode_t_miopenGroupConv: miopenConvolutionMode_t = 2;
#[doc = "< Deprecated Depthwise convolution legacy, ToBe Removed"]
pub const miopenConvolutionMode_t_miopenDepthwise: miopenConvolutionMode_t = 3;
#[doc = " @ingroup convolutions\n  @enum miopenConvolutionMode_t\n Convolution mode selection for convolution layer preference."]
pub type miopenConvolutionMode_t = ::std::os::raw::c_uint;
#[doc = "< MIOPEN Default Padding"]
pub const miopenPaddingMode_t_miopenPaddingDefault: miopenPaddingMode_t = 0;
#[doc = "< Tensorflow SAME Padding"]
pub const miopenPaddingMode_t_miopenPaddingSame: miopenPaddingMode_t = 1;
#[doc = "< Tensorflow VALID Padding"]
pub const miopenPaddingMode_t_miopenPaddingValid: miopenPaddingMode_t = 2;
#[doc = " @ingroup padding\n  @enum miopenPaddingMode_t\n Padding mode selection for convolution/Pooling layer preference"]
pub type miopenPaddingMode_t = ::std::os::raw::c_uint;
#[doc = "< Maximum pooling"]
pub const miopenPoolingMode_t_miopenPoolingMax: miopenPoolingMode_t = 0;
#[doc = "< Average pooling"]
pub const miopenPoolingMode_t_miopenPoolingAverage: miopenPoolingMode_t = 1;
#[doc = "< Inclusive Average pooling"]
pub const miopenPoolingMode_t_miopenPoolingAverageInclusive: miopenPoolingMode_t = 2;
#[doc = " @ingroup pooling\n @enum miopenPoolingMode_t\n Pooling layer mode"]
pub type miopenPoolingMode_t = ::std::os::raw::c_uint;
#[doc = "< Use mask indices, 2D pooling only"]
pub const miopenPoolingWorkspaceIndexMode_t_miopenPoolingWorkspaceIndexMask:
    miopenPoolingWorkspaceIndexMode_t = 0;
#[doc = "< Use image indices"]
pub const miopenPoolingWorkspaceIndexMode_t_miopenPoolingWorkspaceIndexImage:
    miopenPoolingWorkspaceIndexMode_t = 1;
#[doc = " @ingroup pooling\n @enum miopenPoolingWorkspaceIndexMode_t\n Pooling layer workspace index mode. miopenPoolingWorkspaceIndexMask mode records indices\n indicating the max values' positions in the filter/mask. miopenPoolingWorkspaceIndexImage mode\n records indices indicating the max values' positions in the image."]
pub type miopenPoolingWorkspaceIndexMode_t = ::std::os::raw::c_uint;
#[doc = "< Channel independent"]
pub const miopenLRNMode_t_miopenLRNWithinChannel: miopenLRNMode_t = 0;
#[doc = "< Cross Channel"]
pub const miopenLRNMode_t_miopenLRNCrossChannel: miopenLRNMode_t = 1;
#[doc = " @ingroup LRN\n @enum miopenLRNMode_t\n Local Response Normalization layer mode"]
pub type miopenLRNMode_t = ::std::os::raw::c_uint;
#[doc = "< Element-wise normalization for fully connected layer"]
pub const miopenBatchNormMode_t_miopenBNPerActivation: miopenBatchNormMode_t = 0;
#[doc = "< Mini-batch spatial normalization for convolutional layers"]
pub const miopenBatchNormMode_t_miopenBNSpatial: miopenBatchNormMode_t = 1;
#[doc = " @ingroup batchnorm\n @enum miopenBatchNormMode_t\n Batch Normalization layer mode"]
pub type miopenBatchNormMode_t = ::std::os::raw::c_uint;
#[doc = "< No activation, pass through the data"]
pub const miopenActivationMode_t_miopenActivationPASTHRU: miopenActivationMode_t = 0;
#[doc = "< Sigmoid function: \\f$1 / (1 + e^{-x})\\f$"]
pub const miopenActivationMode_t_miopenActivationLOGISTIC: miopenActivationMode_t = 1;
#[doc = "< Tanh activation \\f$ \\beta * tanh( \\alpha * x) \\f$"]
pub const miopenActivationMode_t_miopenActivationTANH: miopenActivationMode_t = 2;
#[doc = "< Rectified Linear Unit \\f$ max(0, x) \\f$"]
pub const miopenActivationMode_t_miopenActivationRELU: miopenActivationMode_t = 3;
#[doc = "< \\f$log(1 + e^x)\\f$"]
pub const miopenActivationMode_t_miopenActivationSOFTRELU: miopenActivationMode_t = 4;
#[doc = "< Absolute value \\f$abs(x)\\f$"]
pub const miopenActivationMode_t_miopenActivationABS: miopenActivationMode_t = 5;
#[doc = "< Scaled and shifted power \\f$(\\alpha + \\beta * x)^{gamma}\\f$"]
pub const miopenActivationMode_t_miopenActivationPOWER: miopenActivationMode_t = 6;
pub const miopenActivationMode_t_miopenActivationCLIPPEDRELU: miopenActivationMode_t = 7;
pub const miopenActivationMode_t_miopenActivationLEAKYRELU: miopenActivationMode_t = 8;
pub const miopenActivationMode_t_miopenActivationELU: miopenActivationMode_t = 9;
#[doc = "< Clamp \\f$ max(\\alpha, min(\\beta, x)) \\f$"]
pub const miopenActivationMode_t_miopenActivationCLAMP: miopenActivationMode_t = 10;
#[doc = " @ingroup activation\n @enum miopenActivationMode_t\n Activation layer modes"]
pub type miopenActivationMode_t = ::std::os::raw::c_uint;
#[doc = "< straightforward softmax"]
pub const miopenSoftmaxAlgorithm_t_MIOPEN_SOFTMAX_FAST: miopenSoftmaxAlgorithm_t = 0;
#[doc = "< scaled softmax by maximum value in input domain"]
pub const miopenSoftmaxAlgorithm_t_MIOPEN_SOFTMAX_ACCURATE: miopenSoftmaxAlgorithm_t = 1;
#[doc = "< log softmax"]
pub const miopenSoftmaxAlgorithm_t_MIOPEN_SOFTMAX_LOG: miopenSoftmaxAlgorithm_t = 2;
#[doc = " @ingroup softmax\n @enum miopenSoftmaxAlgorithm_t\n Softmax implementation algorithms"]
pub type miopenSoftmaxAlgorithm_t = ::std::os::raw::c_uint;
#[doc = "< compute per image (N) across C, H, W"]
pub const miopenSoftmaxMode_t_MIOPEN_SOFTMAX_MODE_INSTANCE: miopenSoftmaxMode_t = 0;
pub const miopenSoftmaxMode_t_MIOPEN_SOFTMAX_MODE_CHANNEL: miopenSoftmaxMode_t = 1;
#[doc = " @ingroup softmax\n @enum miopenSoftmaxMode_t\n Softmax modes"]
pub type miopenSoftmaxMode_t = ::std::os::raw::c_uint;
#[doc = "< the operation is adding the values of the reduced elements"]
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_ADD: miopenReduceTensorOp_t = 0;
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_MUL: miopenReduceTensorOp_t = 1;
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_MIN: miopenReduceTensorOp_t = 2;
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_MAX: miopenReduceTensorOp_t = 3;
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_AMAX: miopenReduceTensorOp_t = 4;
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_AVG: miopenReduceTensorOp_t = 5;
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_NORM1: miopenReduceTensorOp_t = 6;
#[doc = "< the operation is getting the square root of the sum of\nsquares of the reduced elements"]
pub const miopenReduceTensorOp_t_MIOPEN_REDUCE_TENSOR_NORM2: miopenReduceTensorOp_t = 7;
#[doc = " @ingroup TensorReduce\n @enum miopenReduceTensorOp_t\n Tensor Reduction operation types"]
pub type miopenReduceTensorOp_t = ::std::os::raw::c_uint;
#[doc = "< does not propagate NaN number"]
pub const miopenNanPropagation_t_MIOPEN_NOT_PROPAGATE_NAN: miopenNanPropagation_t = 0;
#[doc = "< propagate the NaN number by the Reduction operation"]
pub const miopenNanPropagation_t_MIOPEN_PROPAGATE_NAN: miopenNanPropagation_t = 1;
#[doc = " @ingroup TensorReduce\n @enum miopenReduceTensorOp_t\n Nan numbers propagation modes"]
pub type miopenNanPropagation_t = ::std::os::raw::c_uint;
#[doc = "< Does not compuate indices"]
pub const miopenReduceTensorIndices_t_MIOPEN_REDUCE_TENSOR_NO_INDICES: miopenReduceTensorIndices_t =
    0;
#[doc = "< Compute the relative, flatted indices"]
pub const miopenReduceTensorIndices_t_MIOPEN_REDUCE_TENSOR_FLATTENED_INDICES:
    miopenReduceTensorIndices_t = 1;
#[doc = " @ingroup TensorReduce\n @enum miopenReduceTensorIndices_t\n Reduction Indices computation modes"]
pub type miopenReduceTensorIndices_t = ::std::os::raw::c_uint;
#[doc = "< 32-bit unsigned integer indices"]
pub const miopenIndicesType_t_MIOPEN_32BIT_INDICES: miopenIndicesType_t = 0;
#[doc = "< 64-bit unsigned integer indices"]
pub const miopenIndicesType_t_MIOPEN_64BIT_INDICES: miopenIndicesType_t = 1;
#[doc = "< 16-bit unsigned integer indices"]
pub const miopenIndicesType_t_MIOPEN_16BIT_INDICES: miopenIndicesType_t = 2;
#[doc = "< 8-bit unsigned integer indices"]
pub const miopenIndicesType_t_MIOPEN_8BIT_INDICES: miopenIndicesType_t = 3;
#[doc = " @ingroup TensorReduce\n @enum miopenIndicesType_t\n Reduction Indices types"]
pub type miopenIndicesType_t = ::std::os::raw::c_uint;
pub const miopenConvolutionAttrib_t_MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL:
    miopenConvolutionAttrib_t = 0;
pub const miopenConvolutionAttrib_t_MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC:
    miopenConvolutionAttrib_t = 1;
pub const miopenConvolutionAttrib_t_MIOPEN_CONVOLUTION_ATTRIB_MATH_TYPE: miopenConvolutionAttrib_t =
    3;
#[doc = " @ingroup convolutions\n  @enum miopenConvolutionAttrib_t\n Attribute for convolution descriptor, used for alternating the convolution behavior"]
pub type miopenConvolutionAttrib_t = ::std::os::raw::c_uint;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeNormal: miopenConvolutionFindMode_t =
    1;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeFast: miopenConvolutionFindMode_t =
    2;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeHybrid: miopenConvolutionFindMode_t =
    3;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeDynamicHybrid:
    miopenConvolutionFindMode_t = 5;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeTrustVerify:
    miopenConvolutionFindMode_t = 6;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeTrustVerifyFull:
    miopenConvolutionFindMode_t = 7;
pub const miopenConvolutionFindMode_t_miopenConvolutionFindModeDefault:
    miopenConvolutionFindMode_t = 5;
#[doc = " @ingroup convolutions\n  @enum miopenConvolutionFindMode_t\n Findmode for convolution descriptor, used for changing the find behavior when calling\n miopenFindConvolutionForwardAlgorithm(), miopenFindConvolutionBackwardDataAlgorithm(), or\n miopenFindConvolutionBackwardWeightsAlgorithm()."]
pub type miopenConvolutionFindMode_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Create a Tensor Descriptor\n\n API for creating an uninitialized tensor descriptor.\n @param tensorDesc Pointer to a tensor descriptor type (output)\n @return           miopenStatus_t"]
    pub fn miopenCreateTensorDescriptor(
        tensorDesc: *mut miopenTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set shape of 4D tensor\n\n Interface for setting 4-D tensor shape. MIOpen currently implements NCHW and NHWC layout.\n\n @param tensorDesc Tensor descriptor (input/output)\n @param dataType   MIOpen datatype (input)\n @param n          Mini-batch size (input)\n @param c          Number of channels (input)\n @param h          Data height dimension size (input)\n @param w          Data width dimension size (input)\n @return           miopenStatus_t"]
    pub fn miopenSet4dTensorDescriptor(
        tensorDesc: miopenTensorDescriptor_t,
        dataType: miopenDataType_t,
        n: ::std::os::raw::c_int,
        c: ::std::os::raw::c_int,
        h: ::std::os::raw::c_int,
        w: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set shape of ND tensor with specific layout\n\n Interface for setting N-D packed tensor shape. This interface support NHWC, NCHW, NCHWc*, CHWNc*\n @param tensorDesc   Tensor descriptor (input/output)\n @param dataType     MIOpen datatype (input)\n @param tensorLayout Tensor layout (input)\n @param lens         Tensor dimensions (input)\n @param num_lens     Tensor dimension size (input)\n @return             miopenStatus_t"]
    pub fn miopenSetNdTensorDescriptorWithLayout(
        tensorDesc: miopenTensorDescriptor_t,
        dataType: miopenDataType_t,
        tensorLayout: miopenTensorLayout_t,
        lens: *const ::std::os::raw::c_int,
        num_lens: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set shape and stride of 4D tensor\n\n Interface for setting 4-D tensor shape and stride. It allows to create the non-packed tensor.\n A non-packed tensor refers to the tensor where the elements are not compressed or packed in any\n specific way. Each element in the tensor is stored individually, and there is no special\n compression applied to the storage.\n\n @param tensorDesc Tensor descriptor (input/output)\n @param dataType   MIOpen datatype (input)\n @param n          Mini-batch size (input)\n @param c          Number of channels (input)\n @param h          Data height dimension size (input)\n @param w          Data width dimension size (input)\n @param nStride    Mini-batch dimension stride (input)\n @param cStride    Channel dimension stride (input)\n @param hStride    Height dimension stride (input)\n @param wStride    Width dimension stride (input)\n @return           miopenStatus_t"]
    pub fn miopenSet4dTensorDescriptorEx(
        tensorDesc: miopenTensorDescriptor_t,
        dataType: miopenDataType_t,
        n: ::std::os::raw::c_int,
        c: ::std::os::raw::c_int,
        h: ::std::os::raw::c_int,
        w: ::std::os::raw::c_int,
        nStride: ::std::os::raw::c_int,
        cStride: ::std::os::raw::c_int,
        hStride: ::std::os::raw::c_int,
        wStride: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the details of the tensor descriptor\n\n Interface to query the 4-D tensor shape.\n\n @param tensorDesc Tensor descriptor (input)\n @param dataType   MIOpen datatype (output)\n @param n          Mini-batch size (output)\n @param c          Number of channels (output)\n @param h          Data height dimension size (output)\n @param w          Data width dimension size (output)\n @param nStride    Mini-batch dimension stride (output)\n @param cStride    Channel dimension stride (output)\n @param hStride    Height dimension stride (output)\n @param wStride    Width dimension stride (output)\n @return           miopenStatus_t"]
    pub fn miopenGet4dTensorDescriptor(
        tensorDesc: miopenTensorDescriptor_t,
        dataType: *mut miopenDataType_t,
        n: *mut ::std::os::raw::c_int,
        c: *mut ::std::os::raw::c_int,
        h: *mut ::std::os::raw::c_int,
        w: *mut ::std::os::raw::c_int,
        nStride: *mut ::std::os::raw::c_int,
        cStride: *mut ::std::os::raw::c_int,
        hStride: *mut ::std::os::raw::c_int,
        wStride: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set shape of N-dimensional tensor\n\n Interface for setting non-packed tensor shape.\n @param tensorDesc   Tensor descriptor (input/output)\n @param dataType     MIOpen datatype (input)\n @param nbDims       Number of dimensions in the dimsA array (input)\n @param dimsA        Array containing the size of dimensions (input)\n @param stridesA     Array containing the size of stride (input)\n @return             miopenStatus_t"]
    pub fn miopenSetTensorDescriptor(
        tensorDesc: miopenTensorDescriptor_t,
        dataType: miopenDataType_t,
        nbDims: ::std::os::raw::c_int,
        dimsA: *const ::std::os::raw::c_int,
        stridesA: *const ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set shape of N-dimensional tensor\n\n Interface for querying tensor size. MIOpen has support for 1, 2, 3, 4, 5 dimensional tensor of\n layout.\n @param tensorDesc   Tensor descriptor (input)\n @param size         number of elements in tensor described by the descriptor (output)\n @return             miopenStatus_t"]
    pub fn miopenGetTensorDescriptorSize(
        tensorDesc: miopenTensorDescriptor_t,
        size: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the details of the N-dimensional tensor descriptor.\n\n @param tensorDesc Tensor descriptor (input)\n @param dataType   MIOpen datatype (output)\n @param dimsA      Array containing the size of dimensions (output)\n @param stridesA   Array containing the size of stride (output)\n @return           miopenStatus_t"]
    pub fn miopenGetTensorDescriptor(
        tensorDesc: miopenTensorDescriptor_t,
        dataType: *mut miopenDataType_t,
        dimsA: *mut ::std::os::raw::c_int,
        stridesA: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the tensor descriptor\n\n @param tensorDesc Tensor descriptor (input)\n @return           miopenStatus_t"]
    pub fn miopenDestroyTensorDescriptor(tensorDesc: miopenTensorDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Create a Tensor Descriptor for sequence data\n\n API for creating an uninitialized sequence data tensor descriptor.\n @param tensorDesc Pointer to a sequence data tensor descriptor type (output)\n @return           miopenStatus_t"]
    pub fn miopenCreateSeqTensorDescriptor(
        tensorDesc: *mut miopenSeqTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the sequence data tensor descriptor\n\n @param tensorDesc Tensor descriptor (input)\n @return           miopenStatus_t"]
    pub fn miopenDestroySeqTensorDescriptor(
        tensorDesc: miopenSeqTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute element-wise tensor operations\n\n This function implements: \\f$ C = op ( alpha1[0] * A, alpha2[0] * B ) + beta[0] * C \\f$\n\n For Forward Bias one can also use, miopenConvolutionForwardBias()\n\n @param handle     MIOpen handle (input)\n @param tensorOp   Operation from miopenTensorOp_t (input)\n @param alpha1     Tensor A's floating point scaling factor, allocated on the host (input)\n @param aDesc      Tensor descriptor for tensor A (input)\n @param A          Tensor A (input)\n @param alpha2     Tensor B's floating point scaling factor, allocated on the host (input)\n @param bDesc      Tensor descriptor for tensor B (input)\n @param B          Tensor B (input)\n @param beta       Tensor C's floating point scaling factor, allocated on the host (input)\n @param cDesc      Tensor descriptor for tensor C (input)\n @param C          Tensor C (input and output)\n @return           miopenStatus_t"]
    pub fn miopenOpTensor(
        handle: miopenHandle_t,
        tensorOp: miopenTensorOp_t,
        alpha1: *const ::std::os::raw::c_void,
        aDesc: miopenTensorDescriptor_t,
        A: *const ::std::os::raw::c_void,
        alpha2: *const ::std::os::raw::c_void,
        bDesc: miopenTensorDescriptor_t,
        B: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        cDesc: miopenTensorDescriptor_t,
        C: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Fills a tensor with a single value.\n\n Supported datatypes are fp32, fp16, and bfp16\n\n @param handle     MIOpen handle (input)\n @param yDesc      Tensor descriptor for tensor y (input)\n @param y          Tensor y (input)\n @param alpha      Pointer to fill value (input)\n @return           miopenStatus_t"]
    pub fn miopenSetTensor(
        handle: miopenHandle_t,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        alpha: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Scales all elements in a tensor by a single value.\n\n Supported datatypes are fp32 and fp16\n\n @param handle     MIOpen handle (input)\n @param yDesc      Tensor descriptor for tensor y (input)\n @param y          Tensor y (input and output)\n @param alpha      Floating point scaling factor, allocated on the host (input)\n @return           miopenStatus_t"]
    pub fn miopenScaleTensor(
        handle: miopenHandle_t,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        alpha: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Returns number of bytes associated with tensor descriptor\n\n @param tensorDesc Tensor descriptor (input)\n @param numBytes   Number of bytes associated with tensor descriptor (output)\n @return           miopenStatus_t"]
    pub fn miopenGetTensorNumBytes(
        tensorDesc: miopenTensorDescriptor_t,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Copies one tensor to another tensor with a different layout/scale.\n\n This function implements:\n 1. \\f$ Y = alpha * X + beta * Y \\f$ for fp32 and fp16 datatype\n 2. Vectorize/de-vectorize along channel dimension C for int8 datatype\n\n Currently this is used for transforming from int8 to int8x4 vector datatypes\n\n @param handle     MIOpen handle (input)\n @param alpha      Floating point scaling factor, allocated on the host (input)\n @param xDesc      Source Tensor descriptor for tensor x (input)\n @param x          Source Tensor x (input)\n @param beta       Floating point scaling factor, allocated on the host (input)\n @param yDesc      Destination Tensor descriptor for tensor y (input)\n @param y          Destination Tensor y (output)\n @return           miopenStatus_t"]
    pub fn miopenTransformTensor(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a convolution layer descriptor\n\n @param convDesc   Convolution layer descriptor\n @return           miopenStatus_t"]
    pub fn miopenCreateConvolutionDescriptor(
        convDesc: *mut miopenConvolutionDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a 2-D convolution layer descriptor\n\n For group/depthwise convolution dilation height and width, only a dilation value of 1 is\n supported.\n\n @param convDesc   Convolution layer descriptor (output)\n @param c_mode     Convolutional mode (input)\n @param pad_h      Height input data padding (input)\n @param pad_w      Width input data padding (input)\n @param stride_h   Stride for the height of input data (input)\n @param stride_w   Stride for the width of input data (input)\n @param dilation_h Dilation height (input)\n @param dilation_w Dilation width (input)\n @return           miopenStatus_t"]
    pub fn miopenInitConvolutionDescriptor(
        convDesc: miopenConvolutionDescriptor_t,
        c_mode: miopenConvolutionMode_t,
        pad_h: ::std::os::raw::c_int,
        pad_w: ::std::os::raw::c_int,
        stride_h: ::std::os::raw::c_int,
        stride_w: ::std::os::raw::c_int,
        dilation_h: ::std::os::raw::c_int,
        dilation_w: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a N-dimensional convolution layer descriptor\n\n @param convDesc      Convolution layer descriptor (output)\n @param spatialDim    Convolutional spatial dimension (input)\n @param padA          Array of input data padding (input)\n @param strideA       Array of convolution stride (input)\n @param dilationA     Array of convolution dilation (input)\n @param c_mode        Convolutional mode (input)\n @return              miopenStatus_t"]
    pub fn miopenInitConvolutionNdDescriptor(
        convDesc: miopenConvolutionDescriptor_t,
        spatialDim: ::std::os::raw::c_int,
        padA: *const ::std::os::raw::c_int,
        strideA: *const ::std::os::raw::c_int,
        dilationA: *const ::std::os::raw::c_int,
        c_mode: miopenConvolutionMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Retrieves the spatial dimension of a convolution layer descriptor\n\n @param convDesc              Convolution layer descriptor (input)\n @param spatialDim            Spatial dimension of convolution descriptor (output)\n @return                      miopenStatus_t"]
    pub fn miopenGetConvolutionSpatialDim(
        convDesc: miopenConvolutionDescriptor_t,
        spatialDim: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Retrieves a 2-D convolution layer descriptor's details\n\n For group/depthwise convolution dilation height and width, only a dilation value of 1 is\n supported.\n\n @param convDesc   Convolution layer descriptor (input)\n @param c_mode     Convolutional mode (output)\n @param pad_h      Height input data padding (output)\n @param pad_w      Width input data padding (output)\n @param stride_h   Stride for the height of input data (output)\n @param stride_w   Stride for the width of input data (output)\n @param dilation_h Dilation height (output)\n @param dilation_w Dilation width (output)\n @return           miopenStatus_t"]
    pub fn miopenGetConvolutionDescriptor(
        convDesc: miopenConvolutionDescriptor_t,
        c_mode: *mut miopenConvolutionMode_t,
        pad_h: *mut ::std::os::raw::c_int,
        pad_w: *mut ::std::os::raw::c_int,
        stride_h: *mut ::std::os::raw::c_int,
        stride_w: *mut ::std::os::raw::c_int,
        dilation_h: *mut ::std::os::raw::c_int,
        dilation_w: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Retrieves a N-dimensional convolution layer descriptor's details\n\n @param convDesc               Convolution layer descriptor (input)\n @param requestedSpatialDim    Expected convolution spatial dimension (intput)\n @param spatialDim             Convolutional spatial dimension (output)\n @param padA                   Array of input data padding (output)\n @param strideA                Array of convolution stride (output)\n @param dilationA              Array of convolution dilation (output)\n @param c_mode                 Convolutional mode (output)\n @return                       miopenStatus_t"]
    pub fn miopenGetConvolutionNdDescriptor(
        convDesc: miopenConvolutionDescriptor_t,
        requestedSpatialDim: ::std::os::raw::c_int,
        spatialDim: *mut ::std::os::raw::c_int,
        padA: *mut ::std::os::raw::c_int,
        strideA: *mut ::std::os::raw::c_int,
        dilationA: *mut ::std::os::raw::c_int,
        c_mode: *mut miopenConvolutionMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the number of groups to be used in Group/Depthwise convolution\n\n @param convDesc   Convolution layer descriptor (input)\n @param groupCount Pointer to number of groups in group/depthwise convolution (output)\n @return           miopenStatus_t"]
    pub fn miopenGetConvolutionGroupCount(
        convDesc: miopenConvolutionDescriptor_t,
        groupCount: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the number of groups to be used in Group/Depthwise convolution\n\n Must be called before all computational APIs of group/depthwise convolution, it is preferable to\n call miopenInitConvolutionDescriptor() first, then miopenSetConvolutionGroupCount() to fully\n initialize group convolutions. Both Convolution Mode and Transpose Convolution Mode support\n group/depthwise convolution. To run depthwise convolution, set groupCount value equal to number\n of channels.\n\n @param convDesc   Convolution layer descriptor (output)\n @param groupCount      number of groups, in depthwise conv using filter_number/channel_multiplier\n (input)\n @return           miopenStatus_t"]
    pub fn miopenSetConvolutionGroupCount(
        convDesc: miopenConvolutionDescriptor_t,
        groupCount: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the output padding to be used in 2-D Transpose convolution\n\n This function is optional for initialization of Transpose convolution. If applicable, it must be\n called before all computational APIs of Transpose convolution. It is preferable to call\n miopenInitConvolutionDescriptor() first, then miopenSetTransposeConvOutputPadding() to fully\n initialize transpose convolutions.\n\n @param convDesc   Convolution layer descriptor (output)\n @param adj_h      output padding for the height of output data (input)\n @param adj_w      output padding for the width of output data (input)\n @return           miopenStatus_t"]
    pub fn miopenSetTransposeConvOutputPadding(
        convDesc: miopenConvolutionDescriptor_t,
        adj_h: ::std::os::raw::c_int,
        adj_w: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the output padding to be used in N-dimensional Transpose convolution\n\n This function is optional for initialization of Transpose convolution. If applicable, it must be\n called before all computational APIs of Transpose convolution. It is preferable to call\n miopenInitConvolutionNdDescriptor() first, then miopenSetTransposeConvNdOutputPadding() to fully\n initialize transpose convolutions. Currently, 2-D and 3-D convolutions are supported.\n\n @param convDesc      Convolution layer descriptor (output)\n @param spatialDim    Convolutional spatial dimension (input)\n @param adjA          array of output padding for output data (input)\n @return              miopenStatus_t"]
    pub fn miopenSetTransposeConvNdOutputPadding(
        convDesc: miopenConvolutionDescriptor_t,
        spatialDim: ::std::os::raw::c_int,
        adjA: *const ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the shape of a resulting 4-D tensor from a 2-D convolution\n\n This function returns the dimensions of the resulting 4D tensor of a 2D\n convolution, given the convolution descriptor, the input tensor descriptor\n and the filter descriptor. This function can help to setup the output tensor\n and allocate the proper amount of memory prior to launch the actual\n convolution.\n\n @param convDesc          Convolution layer descriptor (input)\n @param inputTensorDesc   Input data tensor descriptor (input)\n @param filterDesc        Weight descriptor (input)\n @param n                 Mini-batch size (output)\n @param c                 Number of channels (output)\n @param h                 Data height dimension size (output)\n @param w                 Data width dimension size (output)\n @return                  miopenStatus_t"]
    pub fn miopenGetConvolutionForwardOutputDim(
        convDesc: miopenConvolutionDescriptor_t,
        inputTensorDesc: miopenTensorDescriptor_t,
        filterDesc: miopenTensorDescriptor_t,
        n: *mut ::std::os::raw::c_int,
        c: *mut ::std::os::raw::c_int,
        h: *mut ::std::os::raw::c_int,
        w: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the shape of a resulting N-dimensional tensor from a (N-2)-dimensional convolution\n\n This function returns the dimensions of the resulting N-dimensional tensor of a (N-2)-dimensional\n convolution, given the convolution descriptor, the input tensor descriptor\n and the filter descriptor. It is used to setup the output tensor descriptor prior to executing\n the convolution layer.\n\n @param convDesc          Convolution layer descriptor (input)\n @param inputTensorDesc   Input data tensor descriptor (input)\n @param filterDesc        Weight descriptor (input)\n @param nDim              Pointer to Output data tensor dimension (output)\n @param outputTensorDimA  Array of Output data tensor length (output)"]
    pub fn miopenGetConvolutionNdForwardOutputDim(
        convDesc: miopenConvolutionDescriptor_t,
        inputTensorDesc: miopenTensorDescriptor_t,
        filterDesc: miopenTensorDescriptor_t,
        nDim: *mut ::std::os::raw::c_int,
        outputTensorDimA: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the tensor descriptor object\n\n @param convDesc Convolution tensor descriptor type (input)\n @return           miopenStatus_t"]
    pub fn miopenDestroyConvolutionDescriptor(
        convDesc: miopenConvolutionDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the attribute of the convolution descriptor\n\n @param convDesc          Convolution layer descriptor (input)\n @param attr              Attribute of this convolution to set (input)\n @param value             Value of this attribute (input)"]
    pub fn miopenSetConvolutionAttribute(
        convDesc: miopenConvolutionDescriptor_t,
        attr: miopenConvolutionAttrib_t,
        value: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the attribute of the convolution descriptor\n\n @param convDesc          Convolution layer descriptor (input)\n @param attr              Attribute of this convolution to get (input)\n @param value             Value of this attribute (output)"]
    pub fn miopenGetConvolutionAttribute(
        convDesc: miopenConvolutionDescriptor_t,
        attr: miopenConvolutionAttrib_t,
        value: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the Find Mode attribute in the convolution descriptor.\n\n The subsequent calls of miopenFindConvolutionForwardAlgorithm(),\n miopenFindConvolutionBackwardDataAlgorithm(), or miopenFindConvolutionBackwardWeightsAlgorithm()\n invoked with convDesc, will follow the findMode set by this call.\n\n Note that the default Find Mode is overriden by the MIOPEN_FIND_MODE environment variable,\n if it is set. If unset, the default is as specified by miopenConvolutionFindModeDefault.\n\n @param convDesc   Convolution layer descriptor (input)\n @param findMode   Find Mode of convDesc (input)\n @return           miopenStatus_t"]
    pub fn miopenSetConvolutionFindMode(
        convDesc: miopenConvolutionDescriptor_t,
        findMode: miopenConvolutionFindMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Reads the Find Mode attribute from the convolution descriptor.\n\n @param convDesc   Convolution layer descriptor (input)\n @param findMode   Find Mode of convDesc (output)\n @return           miopenStatus_t"]
    pub fn miopenGetConvolutionFindMode(
        convDesc: miopenConvolutionDescriptor_t,
        findMode: *mut miopenConvolutionFindMode_t,
    ) -> miopenStatus_t;
}
#[doc = "< GEMM variant"]
pub const miopenConvFwdAlgorithm_t_miopenConvolutionFwdAlgoGEMM: miopenConvFwdAlgorithm_t = 0;
#[doc = "< Direct convolutions"]
pub const miopenConvFwdAlgorithm_t_miopenConvolutionFwdAlgoDirect: miopenConvFwdAlgorithm_t = 1;
#[doc = "< Fast Fourier Transform indirect convolutions"]
pub const miopenConvFwdAlgorithm_t_miopenConvolutionFwdAlgoFFT: miopenConvFwdAlgorithm_t = 2;
#[doc = "< Winograd indirect convolutions"]
pub const miopenConvFwdAlgorithm_t_miopenConvolutionFwdAlgoWinograd: miopenConvFwdAlgorithm_t = 3;
#[doc = "< Implicit GEMM convolutions"]
pub const miopenConvFwdAlgorithm_t_miopenConvolutionFwdAlgoImplicitGEMM: miopenConvFwdAlgorithm_t =
    5;
#[doc = " @enum miopenConvFwdAlgorithm_t\n Convolutional algorithm mode for forward propagation. MIOpen use cross-correlation for its\n convolution implementation."]
pub type miopenConvFwdAlgorithm_t = ::std::os::raw::c_uint;
#[doc = "< GEMM variant"]
pub const miopenConvBwdWeightsAlgorithm_t_miopenConvolutionBwdWeightsAlgoGEMM:
    miopenConvBwdWeightsAlgorithm_t = 0;
#[doc = "< Direct convolution algorithm"]
pub const miopenConvBwdWeightsAlgorithm_t_miopenConvolutionBwdWeightsAlgoDirect:
    miopenConvBwdWeightsAlgorithm_t = 1;
#[doc = "< Winograd convolutions"]
pub const miopenConvBwdWeightsAlgorithm_t_miopenConvolutionBwdWeightsAlgoWinograd:
    miopenConvBwdWeightsAlgorithm_t = 3;
#[doc = "< Implicit GEMM convolutions"]
pub const miopenConvBwdWeightsAlgorithm_t_miopenConvolutionBwdWeightsAlgoImplicitGEMM:
    miopenConvBwdWeightsAlgorithm_t = 5;
#[doc = " @enum miopenConvBwdWeightsAlgorithm_t\n Convolutional algorithm mode for back propagation on weights."]
pub type miopenConvBwdWeightsAlgorithm_t = ::std::os::raw::c_uint;
#[doc = "< GEMM variant"]
pub const miopenConvBwdDataAlgorithm_t_miopenConvolutionBwdDataAlgoGEMM:
    miopenConvBwdDataAlgorithm_t = 0;
#[doc = "< Direct convolutions"]
pub const miopenConvBwdDataAlgorithm_t_miopenConvolutionBwdDataAlgoDirect:
    miopenConvBwdDataAlgorithm_t = 1;
#[doc = "< Fast Fourier Transform indirect convolutions"]
pub const miopenConvBwdDataAlgorithm_t_miopenConvolutionBwdDataAlgoFFT:
    miopenConvBwdDataAlgorithm_t = 2;
#[doc = "< Winograd indirect convolutions"]
pub const miopenConvBwdDataAlgorithm_t_miopenConvolutionBwdDataAlgoWinograd:
    miopenConvBwdDataAlgorithm_t = 3;
pub const miopenConvBwdDataAlgorithm_t_miopenTransposeBwdDataAlgoGEMM:
    miopenConvBwdDataAlgorithm_t = 4;
#[doc = "< Implicit GEMM convolutions"]
pub const miopenConvBwdDataAlgorithm_t_miopenConvolutionBwdDataAlgoImplicitGEMM:
    miopenConvBwdDataAlgorithm_t = 5;
#[doc = " @enum miopenConvBwdDataAlgorithm_t\n Convolutional algorithm mode for back propagation on data."]
pub type miopenConvBwdDataAlgorithm_t = ::std::os::raw::c_uint;
#[doc = "< GEMM variant"]
pub const miopenConvAlgorithm_t_miopenConvolutionAlgoGEMM: miopenConvAlgorithm_t = 0;
#[doc = "< Direct convolutions"]
pub const miopenConvAlgorithm_t_miopenConvolutionAlgoDirect: miopenConvAlgorithm_t = 1;
#[doc = "< Fast Fourier Transform indirect convolutions"]
pub const miopenConvAlgorithm_t_miopenConvolutionAlgoFFT: miopenConvAlgorithm_t = 2;
#[doc = "< Winograd indirect convolutions"]
pub const miopenConvAlgorithm_t_miopenConvolutionAlgoWinograd: miopenConvAlgorithm_t = 3;
#[doc = "< Implicit GEMM convolutions"]
pub const miopenConvAlgorithm_t_miopenConvolutionAlgoImplicitGEMM: miopenConvAlgorithm_t = 5;
#[doc = " @enum miopenConvAlgorithm_t\n Top-level convolutional algorithm mode"]
pub type miopenConvAlgorithm_t = ::std::os::raw::c_uint;
#[doc = " @brief Perf struct for forward, backward filter, or backward data algorithms\n\n Contains the union to hold the selected convolution algorithm for forward, or backwards layers,\n and also contains the time it took to run the algorithm and the workspace required to run the\n algorithm. The workspace in this structure can be used when executing the convolution layer."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct miopenConvAlgoPerf_t {
    pub __bindgen_anon_1: miopenConvAlgoPerf_t__bindgen_ty_1,
    #[doc = "< Time to exectued the selected algorithm represented in the union"]
    pub time: f32,
    #[doc = "< Workspace required to run the selected algorithm represented in the union"]
    pub memory: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union miopenConvAlgoPerf_t__bindgen_ty_1 {
    #[doc = "< Forward convolution algorithm enum selection"]
    pub fwd_algo: miopenConvFwdAlgorithm_t,
    #[doc = "< Back propagation on weights\nconvolution algorithm enum selection"]
    pub bwd_weights_algo: miopenConvBwdWeightsAlgorithm_t,
    #[doc = "< Back propagation on data convolution algorithm enum selection"]
    pub bwd_data_algo: miopenConvBwdDataAlgorithm_t,
}
#[doc = " @brief Performance struct for forward, backward filter, or backward data algorithms in\n immediate mode\n\n Contains a 64-bit integer identifying the solution and the algorithm for the solution,\n as well as the runtime, workspace size and a boolean flag indicating whether the returned\n solution is a heuristic or resulting from an actual run\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenConvSolution_t {
    #[doc = "< Represents the approximate time required to execute this solution on the GPU,\nin milliseconds. This value may either be based on an acutal kernel run or an\nestimate based on a heuristic."]
    pub time: f32,
    #[doc = "< Workspace required to run the selected algorithm represented in the\nunion"]
    pub workspace_size: usize,
    #[doc = "< Identifier for the returned solution"]
    pub solution_id: u64,
    #[doc = "< The algorithm used to compute the solution"]
    pub algorithm: miopenConvAlgorithm_t,
}
unsafe extern "C" {
    #[doc = " @brief Query the maximum number of solutions applicable for the given input/output and weights\n  tensor descriptor for Convolution in the Forward direction.\n\n This call returns the maximum number of applicable solutions for a forward convolution problem.\n The \\c solutionCount returned may be used to allocate the memory required for the\n \\c miopenConvAlgoPerf_t which is required by miopenConvolutionGetSolution API calls.\n\n @param handle         MIOpen handle (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param solutionCount  Pointer to memory to return number of applicable solutions (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForwardGetSolutionCount(
        handle: miopenHandle_t,
        wDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        solutionCount: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the applicable solutions for a convolution configuration described by\n  input, output and convolution descriptors.\n\n  The returned solutions array is sorted in the order of decreasing performance. The returned\n solutions\n might be based\n  on heuristics and for more consistent performance results the user the advised to run the Find\n step.\n  The maximum length of the solutions array may be queried using\n miopenConvolutionForwardGetSolutionCount\n\n @param handle         MIOpen handle (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param maxSolutionCount The size of the solutions array passed in below (input)\n @param solutionCount The size of the solutions array returned (output)\n @param solutions      A pointer to an array of type miopenConvSolution_t allocated by the user,\n                      filled in by MIOpen with applicable solutions. (output)\n @return               miopenStatus_t\n"]
    pub fn miopenConvolutionForwardGetSolution(
        handle: miopenHandle_t,
        wDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        maxSolutionCount: usize,
        solutionCount: *mut usize,
        solutions: *mut miopenConvSolution_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Returns the workspace size required for a particular solution id.\n\n This is an optional call for users who may have serialized the solution id and just need the\n workspace\n size for it. The same information is returned by the miopenConvolutionForwardGetSolution as part\n of the\n miopenConvSolution_t struct.\n\n @param handle         MIOpen handle (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param solution_id      ID of the solution for which workspace size is required (input)\n @param workSpaceSize  The size of the workspace (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForwardGetSolutionWorkspaceSize(
        handle: miopenHandle_t,
        wDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        solution_id: u64,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Compiles the solution provided by the user, this solution may be acquired by the\n miopenConvolutionForwardGetSolution API call above.\n   Compiling the solution ensures that the first API call to miopenConvolutionForwardImmediate\n does\n not cause a compile.\n\n   This is an optional step and may be skipped if a slow first miopenConvolutionForwardImmediate\n invocation is acceptable.\n\n @param handle         MIOpen handle (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param solution_id      ID of the solution to be compiled, as chosen by the user\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForwardCompileSolution(
        handle: miopenHandle_t,
        wDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        solution_id: u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Executes the Forward convolution operation based on the provided solution ID.\n\n Supported datatypes are fp32, fp16, bfp16, and int8\n\n @param handle         MIOpen handle (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param w              Weights tensor w (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param x              Data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @param workSpace      Workspace tensor (input)\n @param workSpaceSize  Size of the memory in bytes pointed to by workSpace above\n @param solution_id      ID of the solution to be compiled, as chosen by the user\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForwardImmediate(
        handle: miopenHandle_t,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
        solution_id: u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the maximum number of solutions applicable for the given input/output and weights\n  tensor descriptor for backward Convolution w-r-t Data.\n\n  This call returns the maximum number of applicable solutions for a the convolution problem, the\n number\n  returned may be used to allocate the memory required for the miopenConvAlgoPert2_t which is\n required\n  by miopenConvolutionBackwardDataGetSolution API calls.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dxDesc         Tensor descriptor for output data tensor dx (input)\n @param solutionCount  Pointer to memory to return number of applicable solutions (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardDataGetSolutionCount(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        solutionCount: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the applicable solutions for a backward convolution w-r-t data as described by\n  input, output and convolution descriptors.\n\n  The returned solutions array is sorted in the order of decreasing performance. The returned\n solutions\n  ns\n might be based\n  on heuristics and for more consistent performance results the user the advised to run the Find\n step.\n  The maximum length of the solutions array may be queried using\n miopenConvolutionBackwardDataGetSolutionCount\n\n @param handle           MIOpen handle (input)\n @param dyDesc           Tensor descriptor for data input tensor dy (input)\n @param wDesc            Tensor descriptor for weight tensor w (input)\n @param convDesc         Convolution layer descriptor (input)\n @param dxDesc           Tensor descriptor for output data tensor dx (input)\n @param maxSolutionCount The size of the solutions array passed in below (input)\n @param solutionCount    The size of the solutions array returned (output)\n @param solutions        A pointer to an array of type miopenConvSolution_t allocated by the user,\n                         filled in by MIOpen with applicable solutions. (output)\n @return                 miopenStatus_t\n"]
    pub fn miopenConvolutionBackwardDataGetSolution(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        maxSolutionCount: usize,
        solutionCount: *mut usize,
        solutions: *mut miopenConvSolution_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Returns the workspace size required for a particular solution id.\n\n This is an optional call for users who may have serialized the solution id and just need the\n workspace\n size for it. The same information is returned by the miopenConvolutionBackwardDataGetSolution as\n part of the\n miopenConvSolution_t struct.\n\n @param handle         MIOpen handle (input)\n @param dyDesc           Tensor descriptor for data input tensor dy (input)\n @param wDesc            Tensor descriptor for weight tensor w (input)\n @param convDesc         Convolution layer descriptor (input)\n @param dxDesc           Tensor descriptor for output data tensor dx (input)\n @param solution_id      ID of the solution for which workspace size is required (input)\n @param workSpaceSize  The size of the workspace (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardDataGetSolutionWorkspaceSize(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        solution_id: u64,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Compiles the solution provided by the user, this solution may be acquired by the\n miopenConvolutionBackwardDataGetSolution API call above.\n   Compiling the solution ensures that the first API call to\n miopenConvolutionBackwardDataImmediate\n does not cause a compile.\n\n   This is an optional step and may be skipped if a slow first\n miopenConvolutionBackwardDataImmediate\n invocation is acceptable.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dxDesc         Tensor descriptor for output data tensor dx (input)\n @param solution_id      ID of the solution to be compiled, as chosen by the user\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardDataCompileSolution(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        solution_id: u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Executes the Backward convolution w-r-t data  operation based on the provided solution\n ID.\n\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param w              Weights tensor w (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dxDesc         Tensor descriptor for output data tensor dx (input)\n @param dx             Data delta tensor dx (output)\n @param workSpace      Workspace tensor (input)\n @param workSpaceSize  Size in bytes of the workspace memory pointed to by workSpace\n @param solution_id      ID of the solution to be compiled, as chosen by the user\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardDataImmediate(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
        solution_id: u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the maximum number of solutions applicable for the given input/output and weights\n  tensor descriptor for backward Convolution w-r-t Weights.\n\n  This call returns the maximum number of applicable solutions for a the convolution problem, the\n number\n  returned may be used to allocate the memory required for the miopenConvAlgoPert2_t which is\n required\n  by miopenConvolutionBackwardWeightsGetSolution API calls.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data tensor dy (input)\n @param xDesc          Tensor descriptor for data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dwDesc         Tensor descriptor for weight tensor dw (input)\n @param solutionCount  Pointer to memory to return number of applicable solutions (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardWeightsGetSolutionCount(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        solutionCount: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the applicable solutions for a backward convolution w-r-t weights as described by\n  input, output and convolution descriptors.\n\n  The returned solutions array is sorted in the order of decreasing performance. The returned\n solutions\n might be based\n  on heuristics and for more consistent performance results the user the advised to run the Find\n step.\n  The maximum length of the solutions array may be queried using\n miopenConvolutionBackwardWeightsGetSolutionCount\n\n @param handle           MIOpen handle (input)\n @param dyDesc           Tensor descriptor for data tensor dy (input)\n @param xDesc            Tensor descriptor for data tensor x (input)\n @param convDesc         Convolution layer descriptor (input)\n @param dwDesc           Tensor descriptor for weight tensor dw (input)\n @param maxSolutionCount The size of the solutions array passed in below (input)\n @param solutionCount    The size of the solutions array returned (output)\n @param solutions        A pointer to an array of type miopenConvSolution_t allocated by the user,\n                         filled in by MIOpen with applicable solutions. (output)\n @return                 miopenStatus_t\n"]
    pub fn miopenConvolutionBackwardWeightsGetSolution(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        maxSolutionCount: usize,
        solutionCount: *mut usize,
        solutions: *mut miopenConvSolution_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Returns the workspace size required for a particular solution id.\n\n This is an optional call for users who may have serialized the solution id and just need the\n workspace\n size for it. The same information is returned by the miopenConvolutionBackwardWeightsGetSolution\n as part of the\n miopenConvSolution_t struct.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data tensor dy (input)\n @param xDesc          Tensor descriptor for data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dwDesc         Tensor descriptor for weight tensor dw (input)\n @param solution_id      ID of the solution for which workspace size is required (input)\n @param workSpaceSize  The size of the workspace (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        solution_id: u64,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Compiles the solution provided by the user, this solution may be acquired by the\n miopenConvolutionBackwardWeightsGetSolution API call above.\n   Compiling the solution ensures that the first API call to\n miopenConvolutionBackwardWeightsImmediate\n does not cause a compile.\n\n   This is an optional step and may be skipped if a slow first\n miopenConvolutionBackwardWeightsImmediate invocation is acceptable.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data tensor dy (input)\n @param xDesc          Tensor descriptor for data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dwDesc         Tensor descriptor for weight tensor dw (input)\n @param solution_id      ID of the solution to be compiled, as chosen by the user\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardWeightsCompileSolution(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        solution_id: u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Executes the Backward convolution w-r-t weights  operation based on the provided solution\n ID.\n\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param xDesc          Tensor descriptor for data tensor x (input)\n @param x              Data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dwDesc         Tensor descriptor for weight tensor dw (input)\n @param dw             Weights delta tensor dw (output)\n @param workSpace      Workspace tensor (input)\n @param workSpaceSize  Size in bytes of the memory passed in, pointed to by workSpace pointer\n above\n @param solution_id      ID of the solution to be compiled, as chosen by the user\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardWeightsImmediate(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        dw: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
        solution_id: u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the workspace size required for a forward convolution algorithm.\n\n For given tensor and convolution descriptors, this function calculates and returns the minimum\n size of the workspace that must be provided to miopenFindConvolutionForwardAlgorithm() in order\n for the latter to find the best candidate from the available forward data convolution algorithms.\n\n WARNING: Providing smaller workspace may result in the selection of a slow convolution\n algorithm, and therefore affect library performance.\n\n It should be assumed that the required workspace size is different for each convolution\n configuration. Therefore, typically this function should be called at least once for each\n convolution configuration used.\n\n Since the convolution configuration is determined by tensor and convolution descriptors, the user\n should ensure that all descriptors contain complete information. For example, if Group/Depthwise\n convolution mode is used, then miopenSetConvolutionGroupCount() should be called before running\n this, and so on.\n\n @param handle         MIOpen handle (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param workSpaceSize  Pointer to memory to return size in bytes (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForwardGetWorkSpaceSize(
        handle: miopenHandle_t,
        wDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Search and run the forward convolutional algorithms and return a list of kernel times.\n\n This function attempts all MIOpen forward convolution algorithms based on\n the input configuration, and outputs performance metrics to a\n user-allocated array of type miopenConvAlgoPerf_t. These metrics are written\n in a sorted fashion where the first element has the lowest compute time.\n Users can chose the top-most algorithm if they only care about the fastest\n algorithm.\n\n This function is mandatory before using miopenConvolutionForward(). In order\n to execute this function, miopenConvolutionForwardGetWorkSpaceSize() must be\n run to determine the required memory for this search.\n\n * If exhaustiveSearch == 0, MIOpen will look for the first kernel with a configuration match. If\n a configuration match is not found, a default configuration will be returned.\n\n * If exhaustiveSearch == 1, MIOpen will look for the best kernel for the provided configuration.\n If a match is not found, an exhaustive search is performed by running individual algorithms.\n\n If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running\n this.\n\n @param handle             MIOpen handle (input)\n @param xDesc              Tensor descriptor for data input tensor x (input)\n @param x                  Data tensor x (input)\n @param wDesc              Tensor descriptor for weight tensor w (input)\n @param w                  Weights tensor w (input)\n @param convDesc           Convolution layer descriptor (input)\n @param yDesc              Tensor descriptor for output data tensor y (input)\n @param y                  Data tensor y (output)\n @param requestAlgoCount   Number of algorithms to return kernel times (input)\n @param returnedAlgoCount  Pointer to number of algorithms returned (output)\n @param perfResults        Pointer to union of best algorithm for forward and backwards (input)\n @param workSpace          Pointer to workspace buffer (input).\n @param workSpaceSize      Size in bytes of the workspace buffer (input).\n                           The buffer must be allocated on the device by the caller.\n                           The size of the buffer should be determined by calling\n                           miopenConvolutionForwardGetWorkSpaceSize(), see its\n                           documentation for details.\n @param exhaustiveSearch   A boolean to toggle a full search of all algorithms\n                           and configurations (input)\n @return                   miopenStatus_t"]
    pub fn miopenFindConvolutionForwardAlgorithm(
        handle: miopenHandle_t,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        requestAlgoCount: ::std::os::raw::c_int,
        returnedAlgoCount: *mut ::std::os::raw::c_int,
        perfResults: *mut miopenConvAlgoPerf_t,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
        exhaustiveSearch: bool,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a forward convolution layer\n\n Runs the forward convolution layer based on the selected algorithm. The function\n miopenFindConvolutionForwardAlgorithm() must have been executed previously to\n determine the required memory needed for the workspace and the best convolutional algorithm.\n The scaling parameter alpha (float) and shift parameter beta (float) are only supported for\n alpha = 1 and beta = 0 in 2D. In 3D, these parameters can take other values.\n\n The forward convolution is designed to accommodate both packed and non-packed tensor strides for\n multiple data types and dimensions across various platforms. This flexibility ensures optimal\n performance in handling diverse computational scenarios. To configure tensor parameters,\n including strides, users can utilize the APIs miopenSetTensorDescriptor() and\n miopenGetTensorDescriptor(). These APIs empower developers to seamlessly set and retrieve tensor\n information, facilitating a more intuitive and efficient workflow. The tensor strides are\n non-packed by default.\n\n If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running\n this.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param w              Weights tensor w (inputs)\n @param convDesc       Convolution layer descriptor (inputs)\n @param algo           Algorithm selected (inputs)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @param workSpace      Pointer to workspace required (input)\n @param workSpaceSize  Size in bytes of the memory determined by the find step (input)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForward(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        algo: miopenConvFwdAlgorithm_t,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Calculate element-wise scale and shift of a tensor via a bias tensor\n\n  This function applies an element-wise bias to a data tensor from an input bias tensor.\n  The scaling parameter alpha (float) and shift parameter beta (float) are only supported for\n  alpha = 1 and beta = 0.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param bDesc          Tensor descriptor for bias tensor b (input)\n @param b              Bias tensor b (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for data tensor y (input)\n @param y              Data tensor y (input and output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionForwardBias(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        bDesc: miopenTensorDescriptor_t,
        b: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the workspace size required for a backward data convolution algorithm.\n\n For given tensor and convolution descriptors, this function calculates and returns the minimum\n size of the workspace that must be provided to miopenFindConvolutionBackwardDataAlgorithm() in\n order for the latter to find the best candidate from the available backward data convolution\n algorithms.\n\n WARNING: Providing smaller workspace may result in the selection of a slow convolution\n algorithm, and therefore affect library performance.\n\n It should be assumed that the required workspace size is different for each convolution\n configuration. Therefore, typically this function should be called at least once for each\n convolution configuration used.\n\n Since the convolution configuration is determined by tensor and convolution descriptors, the user\n should ensure that all descriptors contain complete information. For example, if Group/Depthwise\n convolution mode is used, then miopenSetConvolutionGroupCount() should be called before running\n this, and so on.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dxDesc         Tensor descriptor for output data tensor dx (input)\n @param workSpaceSize  Size in bytes of the memory required (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardDataGetWorkSpaceSize(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Search and run the backwards data convolution algorithms and return a list of kernel\n times.\n\n This function attempts all MIOpen backward data convolution algorithms, and outputs the\n performance metrics to a user-allocated array of type miopenConvAlgoPerf_t.\n These metrics are written in sorted fashion where the first element has the lowest compute time.\n This function is mandatory before using backwards convolutions. Users can chose the top-most\n algorithm if they only care about the fastest algorithm.\n\n This function is mandatory before using miopenConvolutionBackwardData(). In order to\n execute this function, miopenConvolutionBackwardsDataGetWorkSpaceSize() must be run to determine\n the required memory for this search.\n\n * If exhaustiveSearch == 0, MIOpen will look for the first kernel with a configuration match. If\n a configuration match is not found, a default configuration will be returned.\n\n * If exhaustiveSearch == 1, MIOpen will look for the best kernel for the provided configuration.\n If a match is not found, an exhaustive search is performed by running individual algorithms.\n\n If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running\n this.\n\n @param handle             MIOpen handle (input)\n @param dyDesc             Tensor descriptor for data input tensor dy (input)\n @param dy                 Data delta tensor dy (input)\n @param wDesc              Tensor descriptor for weight tensor w (input)\n @param w                  Weights tensor w (input)\n @param convDesc           Convolution layer descriptor (input)\n @param dxDesc             Tensor descriptor for output data tensor dx (input)\n @param dx                 Data delta tensor dx (input)\n @param requestAlgoCount   Number of algorithms to return kernel times (input)\n @param returnedAlgoCount  Pointer to number of algorithms returned (output)\n @param perfResults        Pointer to union of best algorithm for forward and backwards (output)\n @param workSpace          Pointer to workspace buffer (input).\n @param workSpaceSize      Size in bytes of the workspace buffer (input).\n                           The buffer must be allocated on the device by the caller.\n                           The size of the buffer should be determined by calling\n                           miopenConvolutionBackwardDataGetWorkSpaceSize(), see its\n                           documentation for details.\n @param exhaustiveSearch   A boolean to toggle a full search of all algorithms\n                           and configurations (input)\n @return                   miopenStatus_t"]
    pub fn miopenFindConvolutionBackwardDataAlgorithm(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        requestAlgoCount: ::std::os::raw::c_int,
        returnedAlgoCount: *mut ::std::os::raw::c_int,
        perfResults: *mut miopenConvAlgoPerf_t,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
        exhaustiveSearch: bool,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a backward data convolution layer\n\n Runs the backward data convolution layer based on the selected algorithm. The function\n miopenFindConvolutionBackwardDataAlgorithm() must have been executed previously to\n determine the required memory needed for the workspace and the best convolutional\n algorithm.\n\n The backward data convolution is designed to accommodate both packed and non-packed tensor\n strides for multiple data types and dimensions across various platforms. This flexibility ensures\n optimal performance in handling diverse computational scenarios. To configure tensor parameters,\n including strides, users can utilize the APIs miopenSetTensorDescriptor() and\n miopenGetTensorDescriptor(). These APIs empower developers to seamlessly set and retrieve tensor\n information, facilitating a more intuitive and efficient workflow. The tensor strides are\n non-packed by default.\n\n If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running\n this.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param wDesc          Tensor descriptor for weight tensor w (input)\n @param w              Weights tensor w (input)\n @param convDesc       Convolution layer descriptor (input)\n @param algo           Algorithm selected (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dxDesc         Tensor descriptor for output data tensor dx (input)\n @param dx             Data delta tensor dx (output)\n @param workSpace      Pointer to workspace required for the search (input)\n @param workSpaceSize  Size in bytes of the memory needed for find (input)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardData(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        algo: miopenConvBwdDataAlgorithm_t,
        beta: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the GPU memory required for the backward weights convolution algorithm.\n\n For given tensor and convolution descriptors, this function calculates and returns the minimum\n size of the workspace that must be provided to miopenFindConvolutionBackwardWeightsAlgorithm() in\n order for the latter to find the best candidate from the available backward weights convolution\n algorithms.\n\n WARNING: Providing smaller workspace may result in the selection of a slow convolution\n algorithm, and therefore affect library performance.\n\n It should be assumed that the required workspace size is different for each convolution\n configuration. Therefore, typically this function should be called at least once for each\n convolution configuration used.\n\n Since the convolution configuration is determined by tensor and convolution descriptors, the user\n should ensure that all descriptors contain complete information. For example, if Group/Depthwise\n convolution mode is used, then miopenSetConvolutionGroupCount() should be called before running\n this, and so on.\n\n @param handle         MIOpen handle (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param xDesc          Tensor descriptor for data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param dwDesc         Tensor descriptor for output weights tensor dw (input)\n @param workSpaceSize  Size in bytes of the memory required (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardWeightsGetWorkSpaceSize(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Search and run the backwards weights convolutional algorithms and return a list of kernel\n times.\n\n This function attempts all MIOpen backward weights convolution algorithms, and outputs\n the performance metrics to a user-allocated array of type miopenConvAlgoPerf_t. These metrics are\n written in sorted fashion where the first element has the lowest compute time.\n This function is mandatory before using backwards weight convolutions. Users can chose the\n top-most algorithm if they only care about the fastest algorithm.\n\n This function is mandatory before using miopenConvolutionBackwardWeights(). In order to\n execute this function, miopenConvolutionBackwardsWeightsGetWorkSpaceSize() must be run to\n determine the required memory for this search.\n\n * If exhaustiveSearch == 0, MIOpen will look for the first kernel with a configuration match. If\n a configuration match is not found, a default configuration will be returned.\n\n * If exhaustiveSearch == 1, MIOpen will look for the best kernel for the provided configuration.\n If a match is not found, an exhaustive search is performed by running individual algorithms.\n\n If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running\n this.\n\n @param handle             MIOpen handle (input)\n @param dyDesc             Tensor descriptor for data input tensor dy (input)\n @param dy                 Data delta tensor dy (input)\n @param xDesc              Tensor descriptor for output data tensor x (input)\n @param x                  Data delta tensor dx (input)\n @param convDesc           Convolution layer descriptor (input)\n @param dwDesc             Tensor descriptor for weight tensor dw (input)\n @param dw                 Weights delta tensor dw (input)\n @param requestAlgoCount   Number of algorithms to return kernel times (input)\n @param returnedAlgoCount  Pointer to number of algorithms returned (output)\n @param perfResults        Pointer to union of best algorithm for forward and backwards (output)\n @param workSpace          Pointer to workspace buffer (input).\n @param workSpaceSize      Size in bytes of the workspace buffer (input).\n                           The buffer must be allocated on the device by the caller.\n                           The size of the buffer should be determined by calling\n                           miopenConvolutionBackwardWeightsGetWorkSpaceSize(), see its\n                           documentation for details.\n @param exhaustiveSearch   A boolean to toggle a full search of all algorithms\n                           and configurations (input)\n @return                   miopenStatus_t"]
    pub fn miopenFindConvolutionBackwardWeightsAlgorithm(
        handle: miopenHandle_t,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        dwDesc: miopenTensorDescriptor_t,
        dw: *mut ::std::os::raw::c_void,
        requestAlgoCount: ::std::os::raw::c_int,
        returnedAlgoCount: *mut ::std::os::raw::c_int,
        perfResults: *mut miopenConvAlgoPerf_t,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
        exhaustiveSearch: bool,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a backward weights convolution layer\n\n Runs the backward weights convolution layer based on the selected algorithm. The function\n miopenFindConvolutionBackwardWeightsAlgorithm() must have\n been executed previously to determine the required memory needed for the workspace and the\n best convolutional algorithm.\n\n The backward weights convolution is designed to accommodate both packed and non-packed tensor\n strides for multiple data types and dimensions across various platforms. This flexibility ensures\n optimal performance in handling diverse computational scenarios. To configure tensor parameters,\n including strides, users can utilize the APIs miopenSetTensorDescriptor() and\n miopenGetTensorDescriptor(). These APIs empower developers to seamlessly set and retrieve tensor\n information, facilitating a more intuitive and efficient workflow. The tensor strides are\n non-packed by default.\n\n If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running\n this.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param dyDesc         Tensor descriptor for data tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param xDesc          Tensor descriptor for data tensor x (input)\n @param x              Data tensor x (input)\n @param convDesc       Convolution layer descriptor (input)\n @param algo           Algorithm selected (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dwDesc         Tensor descriptor for weight tensor dw (input)\n @param dw             Weights delta tensor dw (output)\n @param workSpace      Pointer to workspace required for the search (input)\n @param workSpaceSize  Size in bytes of the memory needed for find (input)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardWeights(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        algo: miopenConvBwdWeightsAlgorithm_t,
        beta: *const ::std::os::raw::c_void,
        dwDesc: miopenTensorDescriptor_t,
        dw: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Calculates the gradient with respect to the bias.\n\n @deprecated This function is deprecated and will be removed in a future release.\n             The underlying OpenCL kernel (MIOpenConvBwdBias.cl) has been removed.\n             This function now returns miopenStatusNotImplemented.\n\n Compute the convolution backwards gradient with respect to the bias tensor.\n The scaling parameter alpha (float) and shift parameter beta (float) are only supported for\n alpha = 1 and beta = 0.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dbDesc         Tensor descriptor for input bias tensor db (input)\n @param db             Bias delta tensor db (output)\n @return               miopenStatus_t"]
    pub fn miopenConvolutionBackwardBias(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        dbDesc: miopenTensorDescriptor_t,
        db: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a pooling layer descriptor\n\n @param poolDesc   Pointer to a pooling layer descriptor (output)\n @return           miopenStatus_t"]
    pub fn miopenCreatePoolingDescriptor(
        poolDesc: *mut miopenPoolingDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set index data type for pooling layer. The default indexing type is uint8_t.\n Users can set the index type to any of the miopenIndexType_t sizes; 8, 16, 32, or 64 bit\n unsigned integers.\n\n @param poolDesc     Pointer to a pooling layer descriptor (input)\n @param index_type   Index type (input)\n @return             miopenStatus_t"]
    pub fn miopenSetPoolingIndexType(
        poolDesc: miopenPoolingDescriptor_t,
        index_type: miopenIndexType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the index data type for pooling layer. The index type to any of the\n miopenIndexType_t sizes; 8, 16, 32, or 64 bit unsigned integers.\n\n @param poolDesc     Pointer to a pooling layer descriptor (input)\n @param index_type   Index type (output)\n @return             miopenStatus_t"]
    pub fn miopenGetPoolingIndexType(
        poolDesc: miopenPoolingDescriptor_t,
        index_type: *mut miopenIndexType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set workspace index mode for pooling layer. The default mode is\n miopenPoolingWorkSpaceIndexMask.\n\n @param poolDesc         Pointer to a pooling layer descriptor (input/output)\n @param workspace_index  Workspace index mode (input)\n @return                 miopenStatus_t"]
    pub fn miopenSetPoolingWorkSpaceIndexMode(
        poolDesc: miopenPoolingDescriptor_t,
        workspace_index: miopenPoolingWorkspaceIndexMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get workspace index mode for pooling layer.\n\n @param poolDesc         Pointer to a pooling layer descriptor (input)\n @param workspace_index  Workspace index mode (output)\n @return                 miopenStatus_t"]
    pub fn miopenGetPoolingWorkSpaceIndexMode(
        poolDesc: miopenPoolingDescriptor_t,
        workspace_index: *mut miopenPoolingWorkspaceIndexMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets a 2-D pooling layer descriptor details.\n\n Sets the window shape, padding, and stride for a previously created 2-D pooling descriptor.\n\n @param poolDesc       Pointer to a pooling layer descriptor (output)\n @param mode           Pooling mode enum (input)\n @param windowHeight   Input window height dimension (input)\n @param windowWidth    Input window width dimension (input)\n @param pad_h          Number of elements to pad height (input)\n @param pad_w          Number of elements to pad width (input)\n @param stride_h       Vertical stride (input)\n @param stride_w       Horizontal stride (input)\n @return               miopenStatus_t"]
    pub fn miopenSet2dPoolingDescriptor(
        poolDesc: miopenPoolingDescriptor_t,
        mode: miopenPoolingMode_t,
        windowHeight: ::std::os::raw::c_int,
        windowWidth: ::std::os::raw::c_int,
        pad_h: ::std::os::raw::c_int,
        pad_w: ::std::os::raw::c_int,
        stride_h: ::std::os::raw::c_int,
        stride_w: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets a 2-D pooling layer descriptor details\n\n Gets the window shape, padding, and stride for a previously created 2-D pooling descriptor.\n\n @param poolDesc       Pointer to a pooling layer descriptor (input)\n @param mode           Pooling mode enum (output)\n @param windowHeight   Input window height dimension (output)\n @param windowWidth    Input window width dimension (output)\n @param pad_h          Number of elements to pad height (output)\n @param pad_w          Number of elements to pad width (output)\n @param stride_h       Vertical stride (output)\n @param stride_w       Horizontal stride (output)\n @return               miopenStatus_t"]
    pub fn miopenGet2dPoolingDescriptor(
        poolDesc: miopenPoolingDescriptor_t,
        mode: *mut miopenPoolingMode_t,
        windowHeight: *mut ::std::os::raw::c_int,
        windowWidth: *mut ::std::os::raw::c_int,
        pad_h: *mut ::std::os::raw::c_int,
        pad_w: *mut ::std::os::raw::c_int,
        stride_h: *mut ::std::os::raw::c_int,
        stride_w: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the shape of the output tensor for 2-D pooling\n\n Retrieve the tensor dimensions for the forward 2-D pooling. This call is required for\n the forward if the output dimensions are different than the input tensor\n dimensions.\n\n @param poolDesc   Pointer to a pooling layer descriptor (input)\n @param tensorDesc Input tensor descriptor (input)\n @param n\t         Mini-batch dim (output)\n @param c\t         Number of channels (output)\n @param h          Heights of input map (output)\n @param w          Width of input map (output)\n @return           miopenStatus_t"]
    pub fn miopenGetPoolingForwardOutputDim(
        poolDesc: miopenPoolingDescriptor_t,
        tensorDesc: miopenTensorDescriptor_t,
        n: *mut ::std::os::raw::c_int,
        c: *mut ::std::os::raw::c_int,
        h: *mut ::std::os::raw::c_int,
        w: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set details of a N-D pooling layer descriptor\n\n Set the window shape, padding, and stride for a previously created N-D pooling descriptor.\n\n @param poolDesc     Pointer to a pooling layer descriptor (input/output)\n @param mode         Pooling mode enum (input)\n @param nbDims       Dimension of the pooling (input)\n @param windowDimA   Array of input window dimensions with length equal to or larger than\n dimsRequested (input)\n @param padA         Array of number of elements to padding with length equal to or larger than\n dimsRequested (input)\n @param stridesA     Array of stride parameter with length equal to or larger than dimsRequested\n (input)\n @return               miopenStatus_t"]
    pub fn miopenSetNdPoolingDescriptor(
        poolDesc: miopenPoolingDescriptor_t,
        mode: miopenPoolingMode_t,
        nbDims: ::std::os::raw::c_int,
        windowDimA: *const ::std::os::raw::c_int,
        padA: *const ::std::os::raw::c_int,
        stridesA: *const ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get details of a N-D pooling layer descriptor\n\n Get the window shape, padding, and stride for a previously created N-D pooling descriptor.\n\n @param poolDesc         Pointer to a pooling layer descriptor (input)\n @param nbDimsRequested  Dimension of the expected pooling descriptor (input)\n @param mode             Pooling mode enum (output)\n @param nbDims           Actual dimension of the pooling descriptor (output)\n @param windowDimA       Array of input window dimensions with length equal to or larger than\n dimsRequested (output)\n @param padA             Array of number of elements to padding with length equal to or larger\n than dimsRequested (output)\n @param stridesA         Array of stride parameter with length equal to or larger than\n dimsRequested (output)\n @return                 miopenStatus_t"]
    pub fn miopenGetNdPoolingDescriptor(
        poolDesc: miopenPoolingDescriptor_t,
        nbDimsRequested: ::std::os::raw::c_int,
        mode: *mut miopenPoolingMode_t,
        nbDims: *mut ::std::os::raw::c_int,
        windowDimA: *mut ::std::os::raw::c_int,
        padA: *mut ::std::os::raw::c_int,
        stridesA: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the shape of the output tensor for N-D pooling\n\n Retrieve the tensor dimensions for the forward N-D pooling. This call is required for\n the forward if the output dimensions are different than the input tensor\n dimensions.\n\n @param poolDesc      Pointer to a pooling layer descriptor (input)\n @param tensorDesc    Input tensor descriptor (input)\n @param dims          Dimension of the pooling (input)\n @param tensorDimArr  Array of tensor dimension (output)\n @return           miopenStatus_t"]
    pub fn miopenGetPoolingNdForwardOutputDim(
        poolDesc: miopenPoolingDescriptor_t,
        tensorDesc: miopenTensorDescriptor_t,
        dims: ::std::os::raw::c_int,
        tensorDimArr: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the amount of GPU memory required for pooling\n\n Retrieves the amount of workspace in bytes require for pooling. This call is required to\n determine the amount of GPU memory needed for the backwards pooling algorithms. For max-\n pooling, an assumption is that index data type is uint8_t, therefore the returned\n workspace size will be based on this assumption even if the user sets the index type with\n miopenSetPoolingIndexType().\n\n @param yDesc          Descriptor for pooling layer (input)\n @param workSpaceSize  Pointer to workSpaceSize (output)\n @return               miopenStatus_t"]
    pub fn miopenPoolingGetWorkSpaceSize(
        yDesc: miopenTensorDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the amount of GPU memory required for pooling\n\n Retrieves the amount of workspace in bytes require for pooling. This call is required to\n determine the amount of GPU memory needed for the backwards pooling algorithms. For max-\n pooling, there is no assumption on index data type. As the user can set the index datatype\n size using miopenSetPoolingIndexType().\n\n @param poolDesc       Pointer to a pooling layer descriptor (input)\n @param yDesc          Descriptor for pooling layer (input)\n @param workSpaceSize  Pointer to workSpaceSize (output)\n @return               miopenStatus_t"]
    pub fn miopenPoolingGetWorkSpaceSizeV2(
        poolDesc: miopenPoolingDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a forward pooling layer\n\n Runs forward pooling. miopenGetPoolingForwardOutputDim() should be called before\n miopenPoolingForward().\n If the parameter do_backward == 0, then set workSpace = nullptr and workSpaceSize = 0. However,\n for back-propagation do_backwards must be set to 1 in miopenPoolingForward().\n\n @param handle         MIOpen handle (input)\n @param poolDesc       Descriptor for pooling layer (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @param do_backward    Boolean to toggle save data in workspace for backwards pass (input)\n @param workSpace      Pointer user allocated memory (input)\n @param workSpaceSize  Size in bytes of the memory needed (input)\n @return               miopenStatus_t"]
    pub fn miopenPoolingForward(
        handle: miopenHandle_t,
        poolDesc: miopenPoolingDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        do_backward: bool,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a backward pooling layer\n\n Runs backward pooling. miopenPoolingGetWorkSpaceSize() must be called before\n miopenPoolingBackward() to determine the amount of workSpace to be allocated.\n\n @param handle         MIOpen handle (input)\n @param poolDesc       Descriptor for pooling layer (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param xDesc          Tensor descriptor for output data tensor x (input)\n @param x              Data tensor x (output)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dxDesc         Tensor descriptor for tensor dx (input)\n @param dx             Weights delta tensor dx (output)\n @param workSpace      Pointer to user allocated workspace (input)\n @return               miopenStatus_t"]
    pub fn miopenPoolingBackward(
        handle: miopenHandle_t,
        poolDesc: miopenPoolingDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the pooling descriptor object\n\n @param poolDesc Pooling tensor descriptor type (input)\n @return           miopenStatus_t"]
    pub fn miopenDestroyPoolingDescriptor(poolDesc: miopenPoolingDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @addtogroup LRN\n\n  @{\n/\n/*! @brief Creates a local response normalization (LRN) layer descriptor\n\n @param lrnDesc    Pointer to a local response normalization layer descriptor type\n @return           miopenStatus_t"]
    pub fn miopenCreateLRNDescriptor(lrnDesc: *mut miopenLRNDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets a LRN layer descriptor details\n\n Sets all of the descriptor details for the LRN layer. The number of window elements lrnN is\n a diameter and always odd.\n\n @param lrnDesc      Pointer to a LRN layer descriptor (output)\n @param mode         LRN mode enum (input)\n @param lrnN         Number of normalization window elements (input)\n @param lrnAlpha     Scaling factor (input)\n @param lrnBeta      Shift factor (input)\n @param lrnK         K factor (input)\n @return             miopenStatus_t"]
    pub fn miopenSetLRNDescriptor(
        lrnDesc: miopenLRNDescriptor_t,
        mode: miopenLRNMode_t,
        lrnN: ::std::os::raw::c_uint,
        lrnAlpha: f64,
        lrnBeta: f64,
        lrnK: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets a LRN layer descriptor details\n\n Retrieve the LRN descriptor details.\n\n @param lrnDesc      Pointer to a LRN layer descriptor (input)\n @param mode         LRN mode enum (output)\n @param lrnN         Number of normalization window elements (output)\n @param lrnAlpha     Scaling factor (output)\n @param lrnBeta      Shift factor (output)\n @param lrnK         K factor (output)\n @return             miopenStatus_t"]
    pub fn miopenGetLRNDescriptor(
        lrnDesc: miopenLRNDescriptor_t,
        mode: *mut miopenLRNMode_t,
        lrnN: *mut ::std::os::raw::c_uint,
        lrnAlpha: *mut f64,
        lrnBeta: *mut f64,
        lrnK: *mut f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Determine the workspace requirements.\n\n This function determines the GPU memory allocation required to execute the LRN layer based on the\n LRN descriptor.\n\n @param yDesc           Pointer to a LRN layer descriptor (input)\n @param workSpaceSize   Output variable for workspace size (output)\n @return                miopenStatus_t"]
    pub fn miopenLRNGetWorkSpaceSize(
        yDesc: miopenTensorDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a LRN forward layer\n\n Runs the forward layer normalization in the forward direction. If do_backward == 0, then\n set workSpace = nullptr and workSpaceSize = 0. However, if the user wishes to execute backwards,\n then they must set do_backwards = 1 in miopenLRNForward().\n\n @param handle         MIOpen handle (input)\n @param lrnDesc        Descriptor for LRN layer (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @param do_backward    Boolean to toggle save data in workspace for backwards pass (input)\n @param workSpace      Pointer user allocated memory (input)\n @return               miopenStatus_t"]
    pub fn miopenLRNForward(
        handle: miopenHandle_t,
        lrnDesc: miopenLRNDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        do_backward: bool,
        workSpace: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a LRN backward layer\n\n @param handle         MIOpen handle (input)\n @param lrnDesc        Descriptor for LRN layer (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for data input tensor y (input)\n @param y              Data tensor y (input)\n @param dyDesc         Tensor descriptor for data input tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param xDesc          Tensor descriptor for input data tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dxDesc         Tensor descriptor for output data tensor dx(input)\n @param dx             Data delta tensor x (output)\n @param workSpace      Pointer user allocated memory (input)\n @return               miopenStatus_t"]
    pub fn miopenLRNBackward(
        handle: miopenHandle_t,
        lrnDesc: miopenLRNDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        workSpace: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the LRN descriptor object\n\n @param lrnDesc   LRN tensor descriptor type (input)\n @return          miopenStatus_t"]
    pub fn miopenDestroyLRNDescriptor(lrnDesc: miopenLRNDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Derive tensor for gamma and beta from input tensor descriptor\n\n This function takes the input tensor descriptor and outputs a derived tensor for the\n normalization scale (gamma) and shift (beta) tensors.\n\n For an input tensor NCHW and spatial mode, the output derived tensor is 1C11, while for\n per-activation the derived tensor is 1CHW.\n\n For an input tensor NCDHW and spatial mode, the output derived tensor is 1C111, while for\n per-activation the derived tensor is 1CDHW.\n\n @param derivedBnDesc   Output derived tensor descriptor (output)\n @param xDesc           Input tensor descriptor (input)\n @param bn_mode         Batch Normalization mode (input)\n @return                miopenStatus_t"]
    pub fn miopenDeriveBNTensorDescriptor(
        derivedBnDesc: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        bn_mode: miopenBatchNormMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training layer for batch normalization\n\n Batch normalization pass for forward training pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either resultSaveMean, or resultSaveInvVariance are null pointers then the values for the mean\n and inverse variance will not be used.\n\n Likewise, if either resultRunningMean, or resultRunningVariance are null pointers then the values\n for the running mean and variance will not be saved.\n Running averages and variances are scaled using an exponential averaging factor: \\f[\n \\mu_{old} = \\mu_{new}*factor + \\mu_{old}*(1-factor)\n \\f]\n where \\f[\n factor=1/(1+iteration)\n \\f]\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param bnScaleBiasMeanVarDesc    Tensor descriptor for BN scaling, shifting, saved variance and\n mean (input)\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param expAvgFactor              Exponential averaging factor (input)\n @param resultRunningMean         Running average saved for inference (output)\n @param resultRunningVariance     Running variance saved for inference (output)\n @param epsilon                   Value to stablize inverse variance calculation (input)\n @param resultSaveMean            Saved mini-batch mean for backwards pass (output)\n @param resultSaveInvVariance     Saved mini-batch inverse variance for backwards pass (output)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationForwardTraining(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        bnScaleBiasMeanVarDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        expAvgFactor: f64,
        resultRunningMean: *mut ::std::os::raw::c_void,
        resultRunningVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
        resultSaveMean: *mut ::std::os::raw::c_void,
        resultSaveInvVariance: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training layer for batch normalization\n\n Batch normalization pass for forward training pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either resultSaveMean, or resultSaveInvVariance are null pointers then the values for the mean\n and inverse variance will not be used.\n\n Likewise, if either resultRunningMean, or resultRunningVariance are null pointers then the values\n for the running mean and variance will not be saved.\n Running averages and variances are scaled using an exponential averaging factor: \\f[\n \\mu_{old} = \\mu_{new}*factor + \\mu_{old}*(1-factor)\n \\f]\n where \\f[\n factor=1/(1+iteration)\n \\f]\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param savedMeanDesc             Tensor descriptor for BN saved Mean\n @param savedVarDesc              Tensor descriptor for BN saved Variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param expAvgFactor              Exponential averaging factor (input)\n @param resultRunningMean         Running average saved for inference (output)\n @param resultRunningVariance     Running variance saved for inference (output)\n @param epsilon                   Value to stablize inverse variance calculation (input)\n @param resultSaveMean            Saved mini-batch mean for backwards pass (output)\n @param resultSaveInvVariance     Saved mini-batch inverse variance for backwards pass (output)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationForwardTraining_V2(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasVarDesc: miopenTensorDescriptor_t,
        savedMeanDesc: miopenTensorDescriptor_t,
        savedVarDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        expAvgFactor: f64,
        resultRunningMean: *mut ::std::os::raw::c_void,
        resultRunningVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
        resultSaveMean: *mut ::std::os::raw::c_void,
        resultSaveInvVariance: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training layer for batch normalization\n\n Batch normalization pass for forward training pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either resultSaveMean, or resultSaveInvVariance are null pointers then the values for the mean\n and inverse variance will not be used.\n\n Likewise, if either resultRunningMean, or resultRunningVariance are null pointers then the values\n for the running mean and variance will not be saved.\n Running averages and variances are scaled using an exponential averaging factor: \\f[\n \\mu_{old} = \\mu_{new}*factor + \\mu_{old}*(1-factor)\n \\f]\n where \\f[\n factor=1/(1+iteration)\n \\f]\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param savedMeanDesc             Tensor descriptor for BN saved Mean\n @param savedVarDesc              Tensor descriptor for BN saved Variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param expAvgFactor              Exponential averaging factor (input)\n @param prevResultRunningMean     Running mean from previous iteration, read-only (input)\n @param prevResultRunningVariance Running variance from previous iteration, read-only (input)\n @param nextResultRunningMean     Updated running mean for current iteration (output)\n @param nextResultRunningVariance Updated running variance for current iteration (output)\n @param epsilon                   Value to stablize inverse variance calculation (input)\n @param resultSaveMean            Saved mini-batch mean for backwards pass (output)\n @param resultSaveInvVariance     Saved mini-batch inverse variance for backwards pass (output)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationForwardTraining_V3(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasVarDesc: miopenTensorDescriptor_t,
        savedMeanDesc: miopenTensorDescriptor_t,
        savedVarDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        expAvgFactor: f64,
        prevResultRunningMean: *const ::std::os::raw::c_void,
        prevResultRunningVariance: *const ::std::os::raw::c_void,
        nextResultRunningMean: *mut ::std::os::raw::c_void,
        nextResultRunningVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
        resultSaveMean: *mut ::std::os::raw::c_void,
        resultSaveInvVariance: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training layer for batch normalization with fused activation\n\n Batch normalization pass for forward training pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either resultSaveMean, or resultSaveInvVariance are null pointers then the values for the mean\n and inverse variance will not be used.\n\n Likewise, if either resultRunningMean, or resultRunningVariance are null pointers then the values\n for the running mean and variance will not be saved.\n Running averages and variances are scaled using an exponential averaging factor: \\f[\n \\mu_{old} = \\mu_{new}*factor + \\mu_{old}*(1-factor)\n \\f]\n where \\f[\n factor=1/(1+iteration)\n \\f]\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param savedMeanDesc             Tensor descriptor for BN saved Mean\n @param savedVarDesc              Tensor descriptor for BN saved Variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param expAvgFactor              Exponential averaging factor (input)\n @param resultRunningMean         Running average saved for inference (output)\n @param resultRunningVariance     Running variance saved for inference (output)\n @param epsilon                   Value to stablize inverse variance calculation (input)\n @param resultSaveMean            Saved mini-batch mean for backwards pass (output)\n @param resultSaveInvVariance     Saved mini-batch inverse variance for backwards pass (output)\n @param activDesc                 Activation descriptor\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormForwardTrainingActivation(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasVarDesc: miopenTensorDescriptor_t,
        savedMeanDesc: miopenTensorDescriptor_t,
        savedVarDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        expAvgFactor: f64,
        resultRunningMean: *mut ::std::os::raw::c_void,
        resultRunningVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
        resultSaveMean: *mut ::std::os::raw::c_void,
        resultSaveInvVariance: *mut ::std::os::raw::c_void,
        activDesc: miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training layer for batch normalization with fused activation\n\n Batch normalization pass for forward training pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either resultSaveMean, or resultSaveInvVariance are null pointers then the values for the mean\n and inverse variance will not be used.\n\n Likewise, if either resultRunningMean, or resultRunningVariance are null pointers then the values\n for the running mean and variance will not be saved.\n Running averages and variances are scaled using an exponential averaging factor: \\f[\n \\mu_{old} = \\mu_{new}*factor + \\mu_{old}*(1-factor)\n \\f]\n where \\f[\n factor=1/(1+iteration)\n \\f]\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param savedMeanDesc             Tensor descriptor for BN saved Mean\n @param savedVarDesc              Tensor descriptor for BN saved Variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param expAvgFactor              Exponential averaging factor (input)\n @param prevResultRunningMean     Running mean from previous iteration, read-only (input)\n @param prevResultRunningVariance Running variance from previous iteration, read-only (input)\n @param nextResultRunningMean     Updated running mean for current iteration (output)\n @param nextResultRunningVariance Updated running variance for current iteration (output)\n @param epsilon                   Value to stablize inverse variance calculation (input)\n @param resultSaveMean            Saved mini-batch mean for backwards pass (output)\n @param resultSaveInvVariance     Saved mini-batch inverse variance for backwards pass (output)\n @param activDesc                 Activation descriptor\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormForwardTrainingActivation_V2(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasVarDesc: miopenTensorDescriptor_t,
        savedMeanDesc: miopenTensorDescriptor_t,
        savedVarDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        expAvgFactor: f64,
        prevResultRunningMean: *const ::std::os::raw::c_void,
        prevResultRunningVariance: *const ::std::os::raw::c_void,
        nextResultRunningMean: *mut ::std::os::raw::c_void,
        nextResultRunningVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
        resultSaveMean: *mut ::std::os::raw::c_void,
        resultSaveInvVariance: *mut ::std::os::raw::c_void,
        activDesc: miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference layer for batch normalization\n\n Batch normalization pass for forward inference pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either estimatedMean, or estimatedVariance are null pointers then the values for the mean and\n variance will be calculated from input data and this calculated mean and variance will be used\n to update input values.\n If variance is zero and epsilon is also zero, this function outputs NaN values.  Input epsilon\n value should always be non zero positive value.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param bnScaleBiasMeanVarDesc    Tensor descriptor for BN scaling, shifting, saved variance and\n mean (input)\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param estimatedMean             Running average saved during forward training (input)\n @param estimatedVariance         Running variance saved during forward training (input)\n @param epsilon                   Value to stabilize inverse variance calculation (input)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationForwardInference(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        bnScaleBiasMeanVarDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        estimatedMean: *mut ::std::os::raw::c_void,
        estimatedVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference layer for batch normalization\n\n Batch normalization pass for forward inference pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either estimatedMean, or estimatedVariance are null pointers then the values for the mean and\n variance will be calculated from input data and this calculated mean and variance will be used\n to update input values.\n If variance is zero and epsilon is also zero, this function outputs NaN values.  Input epsilon\n value should always be non zero positive value.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param estMeanDesc               Tensor descriptor for BN estimated Mean\n @param estVarianceDesc           Tensor descriptor for BN estimated Variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param estimatedMean             Running average saved during forward training (input)\n @param estimatedVariance         Running variance saved during forward training (input)\n @param epsilon                   Value to stabilize inverse variance calculation (input)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationForwardInference_V2(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasDesc: miopenTensorDescriptor_t,
        estMeanDesc: miopenTensorDescriptor_t,
        estVarianceDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        estimatedMean: *mut ::std::os::raw::c_void,
        estimatedVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference layer for batch normalization using inverse variance\n\n Batch normalization pass for forward inference pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either estimatedMean, or estimatedInvVariance are null pointers then the values for the mean\n and inverse variance will be calculated from input data using an epsilon of 1e-5, and this\n calculated mean and inverse variance will be used to update input values.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param estMeanDesc               Tensor descriptor for BN estimated Mean\n @param estInvVarianceDesc        Tensor descriptor for BN estimated inverse variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param estimatedMean             Running average saved during forward training (input)\n @param estimatedInvVariance      Running inverse variance saved during forward training (input)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationForwardInferenceInvVariance(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasDesc: miopenTensorDescriptor_t,
        estMeanDesc: miopenTensorDescriptor_t,
        estInvVarianceDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        estimatedMean: *mut ::std::os::raw::c_void,
        estimatedInvVariance: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference layer for batch normalization with fused activation using\n inverse variance\n\n Batch normalization pass for forward inference pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either estimatedMean, or estimatedInvVariance are null pointers then the values for the mean\n and inverse variance will be calculated from input data using an epsilon of 1e-5 and this\n calculated mean and inverse variance will be used to update input values.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param estMeanDesc               Tensor descriptor for BN estimated Mean\n @param estInvVarianceDesc        Tensor descriptor for BN estimated inverse variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param estimatedMean             Running average saved during forward training (input)\n @param estimatedInvVariance      Running inverse variance saved during forward training (input)\n @param activDesc                 Activation descriptor\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormForwardInferenceActivationInvVariance(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasDesc: miopenTensorDescriptor_t,
        estMeanDesc: miopenTensorDescriptor_t,
        estInvVarianceDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        estimatedMean: *mut ::std::os::raw::c_void,
        estimatedInvVariance: *mut ::std::os::raw::c_void,
        activDesc: miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference layer for batch normalization with fused activation\n\n Batch normalization pass for forward inference pass.\n Takes in batch normalization mode bn_mode and input tensor x, output tensor y, bnBias and bnScale\n with their descriptor.\n\n If either estimatedMean, or estimatedVariance are null pointers then the values for the mean and\n variance will be calculated from input data and this calculated mean and variance will be used\n to update input values.\n If variance is zero and epsilon is also zero, this function outputs NaN values.  Input epsilon\n value should always be non zero positive value.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alpha                     Floating point scaling factor, allocated on the host (input)\n @param beta                      Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param yDesc                     Tensor descriptor for output data tensor y (input)\n @param y                         Data tensor y (output)\n @param ScaleDesc                 Tensor descriptor for BN scaling\n @param biasVarDesc               Tensor descriptor for BN bias\n @param estMeanDesc               Tensor descriptor for BN estimated Mean\n @param estVarianceDesc           Tensor descriptor for BN estimated Variance\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias, beta, tensor (input)\n @param estimatedMean             Running average saved during forward training (input)\n @param estimatedVariance         Running variance saved during forward training (input)\n @param epsilon                   Value to stabilize inverse variance calculation (input)\n @param activDesc                 Activation descriptor\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormForwardInferenceActivation(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alpha: *mut ::std::os::raw::c_void,
        beta: *mut ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasDesc: miopenTensorDescriptor_t,
        estMeanDesc: miopenTensorDescriptor_t,
        estVarianceDesc: miopenTensorDescriptor_t,
        bnScale: *mut ::std::os::raw::c_void,
        bnBias: *mut ::std::os::raw::c_void,
        estimatedMean: *mut ::std::os::raw::c_void,
        estimatedVariance: *mut ::std::os::raw::c_void,
        epsilon: f64,
        activDesc: miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backwards propagation layer for batch normalization\n\n Batch normalization pass for backwards propagation training pass.\n The method for backwards propagation batch normalization.\n\n Takes in batch normalization mode bn_mode and input tensor data x, input activation tensor dy,\n output tensor dx, the learned tensors resultBNBiasDiff and resultBNScaleDiff with their\n descriptor.\n\n If BOTH savedMean, and savedVariance are not null pointers then the method will use the saved\n mean and variance calculated by the forward training phase.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alphaDataDiff             Floating point scaling factor, allocated on the host (input)\n @param betaDataDiff              Floating point shift factor, allocated on the host (input)\n @param alphaParamDiff            Floating point scaling factor, allocated on the host (input)\n @param betaParamDiff             Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param dyDesc                    Tensor descriptor for output data tensor y (input)\n @param dy                        Data tensor y (input)\n @param dxDesc                    Tensor descriptor for output data tensor dx (input)\n @param dx                        Data delta tensor dx (output)\n @param bnScaleBiasDiffDesc       Tensor descriptor for BN scaling, shifting, saved variance and\n mean (input)\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param resultBnScaleDiff         Tensor for dscale (output)\n @param resultBnBiasDiff          Tensor for dbias (output)\n @param epsilon                   Value to stabilize inverse variance calculation (input)\n @param savedMean                 Saved mini-batch mean for backwards pass (input)\n @param savedInvVariance          Saved mini-batch inverse variance for backwards pass (input)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationBackward(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alphaDataDiff: *const ::std::os::raw::c_void,
        betaDataDiff: *const ::std::os::raw::c_void,
        alphaParamDiff: *const ::std::os::raw::c_void,
        betaParamDiff: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        bnScaleBiasDiffDesc: miopenTensorDescriptor_t,
        bnScale: *const ::std::os::raw::c_void,
        resultBnScaleDiff: *mut ::std::os::raw::c_void,
        resultBnBiasDiff: *mut ::std::os::raw::c_void,
        epsilon: f64,
        savedMean: *const ::std::os::raw::c_void,
        savedInvVariance: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backwards propagation layer for batch normalization\n\n Batch normalization pass for backwards propagation training pass.\n The method for backwards propagation batch normalization.\n\n Takes in batch normalization mode bn_mode and input tensor data x, input activation tensor dy,\n output tensor dx, the learned tensors resultBNBiasDiff and resultBNScaleDiff with their\n descriptor.\n\n If BOTH savedMean, and savedVariance are not null pointers then the method will use the saved\n mean and variance calculated by the forward training phase.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alphaDataDiff             Floating point scaling factor, allocated on the host (input)\n @param betaDataDiff              Floating point shift factor, allocated on the host (input)\n @param alphaParamDiff            Floating point scaling factor, allocated on the host (input)\n @param betaParamDiff             Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param dyDesc                    Tensor descriptor for output data tensor y (input)\n @param dy                        Data tensor y (input)\n @param dxDesc                    Tensor descriptor for output data tensor dx (input)\n @param dx                        Data delta tensor dx (output)\n @param scaleDesc                 Tensor descriptor for scaling descriptor (input)\n @param biasDesc                  Tensor descriptor for bias/shift descriptor (input)\n @param savedMeanDesc             Tensor descriptor for saved Mean  descriptor (input)\n @param savedVarDesc              Tensor descriptor for saved Variance descriptor (input)\n , shifting, saved variance and\n mean (input)\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param resultBnScaleDiff         Tensor for dscale (output)\n @param resultBnBiasDiff          Tensor for dbias (output)\n @param epsilon                   Value to stabilize inverse variance calculation (input)\n @param savedMean                 Saved mini-batch mean for backwards pass (input)\n @param savedInvVariance          Saved mini-bathc inverse variance for backwards pass (input)\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormalizationBackward_V2(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alphaDataDiff: *const ::std::os::raw::c_void,
        betaDataDiff: *const ::std::os::raw::c_void,
        alphaParamDiff: *const ::std::os::raw::c_void,
        betaParamDiff: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasDesc: miopenTensorDescriptor_t,
        savedMeanDesc: miopenTensorDescriptor_t,
        savedVarDesc: miopenTensorDescriptor_t,
        bnScale: *const ::std::os::raw::c_void,
        resultBnScaleDiff: *mut ::std::os::raw::c_void,
        resultBnBiasDiff: *mut ::std::os::raw::c_void,
        epsilon: f64,
        savedMean: *const ::std::os::raw::c_void,
        savedInvVariance: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backwards propagation layer for batch normalization with fused activation\n\n Batch normalization pass for backwards propagation training pass.\n The method for backwards propagation batch normalization.\n\n Takes in batch normalization mode bn_mode and input tensor data x, input activation tensor dy,\n output tensor dx, the learned tensors resultBNBiasDiff and resultBNScaleDiff with their\n descriptor.\n\n If BOTH savedMean, and savedVariance are not null pointers then the method will use the saved\n mean and variance calculated by the forward training phase.\n\n @param handle                    MIOpen handle (input)\n @param bn_mode                   Batch normalization mode (input)\n @param alphaDataDiff             Floating point scaling factor, allocated on the host (input)\n @param betaDataDiff              Floating point shift factor, allocated on the host (input)\n @param alphaParamDiff            Floating point scaling factor, allocated on the host (input)\n @param betaParamDiff             Floating point shift factor, allocated on the host (input)\n @param xDesc                     Tensor descriptor for data input tensor x (input)\n @param x                         Data tensor x (input)\n @param dyDesc                    Tensor descriptor for output data tensor y (input)\n @param dy                        Data tensor y (input)\n @param dxDesc                    Tensor descriptor for output data tensor dx (input)\n @param dx                        Data delta tensor dx (output)\n @param scaleDesc                 Tensor descriptor for scaling descriptor (input)\n @param biasDesc                  Tensor descriptor for bias/shift descriptor (input)\n @param savedMeanDesc             Tensor descriptor for saved Mean  descriptor (input)\n @param savedVarDesc              Tensor descriptor for saved Variance descriptor (input)\n , shifting, saved variance and\n mean (input)\n @param bnScale                   Batch norm scaling, gamma, tensor (input)\n @param bnBias                    Batch norm bias (input)\n @param resultBnScaleDiff         Tensor for dscale (output)\n @param resultBnBiasDiff          Tensor for dbias (output)\n @param epsilon                   Value to stabilize inverse variance calculation (input)\n @param savedMean                 Saved mini-batch mean for backwards pass (input)\n @param savedInvVariance          Saved mini-bathc inverse variance for backwards pass (input)\n @param activDesc                 Activation descriptor\n @return                          miopenStatus_t"]
    pub fn miopenBatchNormBackwardActivation(
        handle: miopenHandle_t,
        bn_mode: miopenBatchNormMode_t,
        alphaDataDiff: *const ::std::os::raw::c_void,
        betaDataDiff: *const ::std::os::raw::c_void,
        alphaParamDiff: *const ::std::os::raw::c_void,
        betaParamDiff: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        scaleDesc: miopenTensorDescriptor_t,
        biasDesc: miopenTensorDescriptor_t,
        savedMeanDesc: miopenTensorDescriptor_t,
        savedVarianceDesc: miopenTensorDescriptor_t,
        bnScale: *const ::std::os::raw::c_void,
        bnBias: *const ::std::os::raw::c_void,
        resultBnScaleDiff: *mut ::std::os::raw::c_void,
        resultBnBiasDiff: *mut ::std::os::raw::c_void,
        epsilon: f64,
        savedMean: *const ::std::os::raw::c_void,
        savedInvVariance: *const ::std::os::raw::c_void,
        activDesc: miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @addtogroup activation\n\n  @{\n/\n/*! @brief Creates the Activation descriptor object\n\n @param activDesc Pointer to an activation tensor descriptor type\n @return          miopenStatus_t"]
    pub fn miopenCreateActivationDescriptor(
        activDesc: *mut miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the activation layer descriptor details\n\n Sets all of the descriptor details for the activation layer\n\n @param activDesc    Pointer to a activation layer descriptor (output)\n @param mode         Activation mode enum (input)\n @param activAlpha   Alpha value for some activation modes (input)\n @param activBeta    Beta value for some activation modes (input)\n @param activGamma   Gamma value for some activation modes (input)\n @return             miopenStatus_t"]
    pub fn miopenSetActivationDescriptor(
        activDesc: miopenActivationDescriptor_t,
        mode: miopenActivationMode_t,
        activAlpha: f64,
        activBeta: f64,
        activGamma: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the activation layer descriptor details\n\n Retrieves all of the descriptor details for the activation layer.\n\n @param activDesc    Pointer to a activation layer descriptor (input)\n @param mode         Activation mode enum (output)\n @param activAlpha   Alpha value for some activation modes (output)\n @param activBeta    Beta value for some activation modes (output)\n @param activGamma   Gamma value for some activation modes (output)\n @return             miopenStatus_t"]
    pub fn miopenGetActivationDescriptor(
        activDesc: miopenActivationDescriptor_t,
        mode: *mut miopenActivationMode_t,
        activAlpha: *mut f64,
        activBeta: *mut f64,
        activGamma: *mut f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute an activation forward layer\n\n @param handle         MIOpen handle (input)\n @param activDesc      Descriptor for activation layer (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @return               miopenStatus_t"]
    pub fn miopenActivationForward(
        handle: miopenHandle_t,
        activDesc: miopenActivationDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a activation backwards layer\n\n @param handle         MIOpen handle (input)\n @param activDesc      Descriptor for activation layer (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for input data tensor y (input)\n @param y              Data tensor y (input)\n @param dyDesc         Tensor descriptor for input data tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dxDesc         Tensor descriptor for data output tensor dx (input)\n @param dx             Output data delta tensor dx (output)\n @return               miopenStatus_t"]
    pub fn miopenActivationBackward(
        handle: miopenHandle_t,
        activDesc: miopenActivationDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the activation descriptor object\n\n @param activDesc   Activation tensor descriptor type (input)\n @return            miopenStatus_t"]
    pub fn miopenDestroyActivationDescriptor(
        activDesc: miopenActivationDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @addtogroup softmax\n\n  @{\n/\n/*! @brief Execute a softmax forward layer\n\n This API only implements the SOFTMAX_MODE_CHANNEL in SOFTMAX_ACCURATE path.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @return               miopenStatus_t"]
    pub fn miopenSoftmaxForward(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a softmax backwards layer\n\n This API only implements the SOFTMAX_MODE_CHANNEL in SOFTMAX_ACCURATE path.\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for input data tensor y (input)\n @param y              Data tensor y (input)\n @param dyDesc         Tensor descriptor for input data tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dxDesc         Tensor descriptor for data output tensor dx (input)\n @param dx             Output data delta tensor dx (output)\n @return               miopenStatus_t"]
    pub fn miopenSoftmaxBackward(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a softmax forward layer with expanded modes and algorithms\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param xDesc          Tensor descriptor for data input tensor x (input)\n @param x              Data tensor x (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for output data tensor y (input)\n @param y              Data tensor y (output)\n @param algorithm      Softmax implementation algorithm (input)\n @param mode           Softmax mode (input)\n @return               miopenStatus_t"]
    pub fn miopenSoftmaxForward_V2(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        algorithm: miopenSoftmaxAlgorithm_t,
        mode: miopenSoftmaxMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute a softmax backwards layer with expanded modes and algorithms\n\n @param handle         MIOpen handle (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param yDesc          Tensor descriptor for input data tensor y (input)\n @param y              Data tensor y (input)\n @param dyDesc         Tensor descriptor for input data tensor dy (input)\n @param dy             Data delta tensor dy (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param dxDesc         Tensor descriptor for data output tensor dx (input)\n @param dx             Output data delta tensor dx (output)\n @param algorithm      Softmax implementation algorithm (input)\n @param mode           Softmax mode (input)\n @return               miopenStatus_t"]
    pub fn miopenSoftmaxBackward_V2(
        handle: miopenHandle_t,
        alpha: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        algorithm: miopenSoftmaxAlgorithm_t,
        mode: miopenSoftmaxMode_t,
    ) -> miopenStatus_t;
}
#[doc = " @ingroup FUSION\n @brief MIOpen fusion interface"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenFusionPlanDescriptor {
    pub _address: u8,
}
#[doc = " @ingroup FUSION\n @brief MIOpen fusion interface"]
pub type miopenFusionPlanDescriptor_t = *mut miopenFusionPlanDescriptor;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenOperatorDescriptor {
    pub _address: u8,
}
pub type miopenOperatorDescriptor_t = *mut miopenOperatorDescriptor;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenOperatorArgs {
    pub _address: u8,
}
pub type miopenOperatorArgs_t = *mut miopenOperatorArgs;
#[doc = "< fuses layers vertically, current the only supported mode"]
pub const miopenFusionDirection_t_miopenVerticalFusion: miopenFusionDirection_t = 0;
#[doc = "< fuses layers horizontally, this is unimplemented"]
pub const miopenFusionDirection_t_miopenHorizontalFusion: miopenFusionDirection_t = 1;
#[doc = " @enum miopenFusionDirection_t\n @brief Kernel fusion direction in the network"]
pub type miopenFusionDirection_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Creates the kenrel fusion plan descriptor object\n\n @param fusePlanDesc  Pointer to a fusion plan (output)\n @param fuseDirection Horizontal or Vertical fusion (input)\n @param inputDesc     Descriptor to tensor for the input (input)\n @return              miopenStatus_t"]
    pub fn miopenCreateFusionPlan(
        fusePlanDesc: *mut miopenFusionPlanDescriptor_t,
        fuseDirection: miopenFusionDirection_t,
        inputDesc: miopenTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroy the fusion plan descriptor object\n\n @param fusePlanDesc  A fusion plan descriptor type\n @return              miopenStatus_t"]
    pub fn miopenDestroyFusionPlan(fusePlanDesc: miopenFusionPlanDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Compiles the fusion plan\n\n @param handle           MIOpen handle (input)\n @param fusePlanDesc A fusion plan descriptor (input)\n @return             miopenStatus_t"]
    pub fn miopenCompileFusionPlan(
        handle: miopenHandle_t,
        fusePlanDesc: miopenFusionPlanDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Allows access to the operators in a fusion plan\n @details This api call does bounds checking on the supplied op_idx and would\n          return miopenStatusError if the index is out of bounds\n\n @param fusePlanDesc A fusion plan descriptor (input)\n @param op_idx Index of the required operator in the fusion plan, in the order of insertion\n @param op returned pointer to the operator\n @return miopenStatus_t"]
    pub fn miopenFusionPlanGetOp(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        op_idx: ::std::os::raw::c_int,
        op: *mut miopenFusionOpDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the workspace size required for the fusion plan\n @param handle         MIOpen handle (input)\n @param fusePlanDesc   A fusion plan descriptor (input)\n @param workSpaceSize  Pointer to memory to return size in bytes (output)\n @param algo           Algorithm selected (inputs)\n @return               miopenStatus_t"]
    pub fn miopenFusionPlanGetWorkSpaceSize(
        handle: miopenHandle_t,
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        workSpaceSize: *mut usize,
        algo: miopenConvFwdAlgorithm_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Returns the supported algorithms for the convolution operator in the Fusion Plan\n\n @details A Convolution operator in a fusion plan may be implemented by different algorithms\n representing different tradeoffs of memory and performance. The returned list of algorithms\n is sorted in decreasing order of priority. Therefore, if the user does not request an\n algorithm to be set using the miopenFusionPlanConvolutionSetAlgo call, the first algorithm\n in the list would be used to execute the convolution in the fusion plan. Moreover this call\n must be immediately preceded by the miopenCreateOpConvForward call for the op in question.\n\n @param fusePlanDesc A fusion plan descriptor (input)\n @param requestAlgoCount Number of algorithms to return (input)\n @param returnedAlgoCount The actual number of returned algorithms; always be less than\n equal to requestAlgoCount (output)\n @param returnedAlgos Pointer to the list of supported algorithms\n @return miopenStatus_t"]
    pub fn miopenFusionPlanConvolutionGetAlgo(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        requestAlgoCount: ::std::os::raw::c_int,
        returnedAlgoCount: *mut ::std::os::raw::c_int,
        returnedAlgos: *mut miopenConvFwdAlgorithm_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Requests the fusion runtime to choose a particular algorithm for the added convolution\n operation\n\n @details Please see the description for miopenFusionPlanConvolutionGetAlgo\n\n @param fusePlanDesc A fusion plan descriptor (input)\n @param algo Requested algorithm for the convolution operator (input)\n @return miopenStatus_t"]
    pub fn miopenFusionPlanConvolutionSetAlgo(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        algo: miopenConvFwdAlgorithm_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates forward convolution operator.\n\n @param fusePlanDesc   A fusion plan descriptor (input)\n @param convOp         Pointer to an operator type (output)\n @param convDesc       Convolution layer descriptor (input)\n @param wDesc          Descriptor for the weights tensor (input)\n @return               miopenStatus_t"]
    pub fn miopenCreateOpConvForward(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        convOp: *mut miopenFusionOpDescriptor_t,
        convDesc: miopenConvolutionDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a forward activation operator.\n\n @param fusePlanDesc    A fusion plan descriptor (input)\n @param activFwdOp         Pointer to an operator type (output)\n @param mode            Activation version (input)\n @return                miopenStatus_t"]
    pub fn miopenCreateOpActivationForward(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        activFwdOp: *mut miopenFusionOpDescriptor_t,
        mode: miopenActivationMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a backward activation operator.\n\n @param fusePlanDesc    A fusion plan descriptor (input)\n @param activBwdOp         Pointer to an operator type (output)\n @param mode            Activation version (input)\n @return                miopenStatus_t"]
    pub fn miopenCreateOpActivationBackward(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        activBwdOp: *mut miopenFusionOpDescriptor_t,
        mode: miopenActivationMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a forward bias operator.\n\n @param fusePlanDesc   A fusion plan descriptor (input)\n @param biasOp         Pointer to an operator type (output)\n @param bDesc          bias tensor descriptor (input)\n @return               miopenStatus_t"]
    pub fn miopenCreateOpBiasForward(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        biasOp: *mut miopenFusionOpDescriptor_t,
        bDesc: miopenTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a forward inference batch normalization operator.\n\n @param fusePlanDesc           A fusion plan descriptor (input)\n @param bnOp                   Pointer to an operator type (output)\n @param bn_mode                Batch normalization layer mode (input)\n @param bnScaleBiasMeanVarDesc Gamma, beta, mean, variance tensor descriptor (input)\n @return                       miopenStatus_t"]
    pub fn miopenCreateOpBatchNormInference(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        bnOp: *mut miopenFusionOpDescriptor_t,
        bn_mode: miopenBatchNormMode_t,
        bnScaleBiasMeanVarDesc: miopenTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a forward training batch normalization operator.\n\n @param fusePlanDesc           A fusion plan descriptor (input)\n @param bnFwdOp                   Pointer to an operator type (output)\n @param bn_mode                Batch normalization layer mode (input)\n @param runningMeanVariance    Toggles whether or not to save population statistics for inference;\n batch statistic are required (input)\n @return                       miopenStatus_t"]
    pub fn miopenCreateOpBatchNormForward(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        bnFwdOp: *mut miopenFusionOpDescriptor_t,
        bn_mode: miopenBatchNormMode_t,
        runningMeanVariance: bool,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates a back propagation batch normalization operator.\n\n @param fusePlanDesc           A fusion plan descriptor (input)\n @param bnBwdOp                   Pointer to an operator type (output)\n @param bn_mode                Batch normalization layer mode (input)\n @return                       miopenStatus_t"]
    pub fn miopenCreateOpBatchNormBackward(
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        bnBwdOp: *mut miopenFusionOpDescriptor_t,
        bn_mode: miopenBatchNormMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates an operator argument object\n\n @param args        Pointer to an operator argument type (output)\n @return            miopenStatus_t"]
    pub fn miopenCreateOperatorArgs(args: *mut miopenOperatorArgs_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys an operator argument object\n\n @param args        An operator argument type (output)\n @return            miopenStatus_t"]
    pub fn miopenDestroyOperatorArgs(args: miopenOperatorArgs_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for forward convolution op\n\n @param args    An arguments object type (output)\n @param convOp  Forward convolution operator (input)\n @param alpha   Floating point scaling factor, allocated on the host (input)\n @param beta    Floating point shift factor, allocated on the host (input)\n @param w       Pointer to tensor memory  (input)\n @return        miopenStatus_t"]
    pub fn miopenSetOpArgsConvForward(
        args: miopenOperatorArgs_t,
        convOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        w: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for forward activation op\n\n @param args    An arguments object type (output)\n @param activFwdOp   Activation backwards operator (input)\n @param alpha   Floating point scaling factor, allocated on the host (input)\n @param beta    Floating point shift factor, allocated on the host (input)\n @param activAlpha  Double precision activation parameter which depends on activation mode (input)\n @param activBeta   Double precision activation parameter which depends on activation mode (input)\n @param activGamma  Double precision activation parameter which depends on activation mode (input)\n @return        miopenStatus_t"]
    pub fn miopenSetOpArgsActivForward(
        args: miopenOperatorArgs_t,
        activFwdOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        activAlpha: f64,
        activBeta: f64,
        activGamma: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for backward activation op\n\n @param args    An arguments object type (output)\n @param activBwdOp   Activation backwards operator (input)\n @param alpha   Floating point scaling factor, allocated on the host (input)\n @param beta    Floating point shift factor, allocated on the host (input)\n @param y        Data tensor y, output of activations in the forward direction (input)\n @param reserved    Data tensor reserved memory space; currently should be nullptr (input)\n @param activAlpha  Double precision activation parameter which depends on activation mode (input)\n @param activBeta   Double precision activation parameter which depends on activation mode (input)\n @param activGamma  Double precision activation parameter which depends on activation mode (input)\n @return        miopenStatus_t"]
    pub fn miopenSetOpArgsActivBackward(
        args: miopenOperatorArgs_t,
        activBwdOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        y: *const ::std::os::raw::c_void,
        reserved: *const ::std::os::raw::c_void,
        activAlpha: f64,
        activBeta: f64,
        activGamma: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for inference batch normalization op\n\n @param args               An arguments object type (output)\n @param bnOp               Batch normalization inference operator (input)\n @param alpha              Floating point scaling factor, allocated on the host (input)\n @param beta               Floating point shift factor, allocated on the host (input)\n @param bnScale            Pointer to the gamma tensor memory  (input)\n @param bnBias             Pointer to the beta tensor memory  (input)\n @param estimatedMean      Pointer to population mean memory  (input)\n @param estimatedVariance  Pointer to population variance memory  (input)\n @param epsilon            Scalar value for numerical stability (input)\n @return                   miopenStatus_t"]
    pub fn miopenSetOpArgsBatchNormInference(
        args: miopenOperatorArgs_t,
        bnOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        bnScale: *const ::std::os::raw::c_void,
        bnBias: *const ::std::os::raw::c_void,
        estimatedMean: *const ::std::os::raw::c_void,
        estimatedVariance: *const ::std::os::raw::c_void,
        epsilon: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for forward batch normalization op\n\n @param args               An arguments object type (output)\n @param bnOp               Batch normalization forward operator (input)\n @param alpha              Floating point scaling factor, allocated on the host (input)\n @param beta               Floating point shift factor, allocated on the host (input)\n @param bnScale            Pointer to the gamma tensor memory  (input)\n @param bnBias             Pointer to the beta tensor memory  (input)\n @param savedMean          Pointer to batch mean memory  (input)\n @param savedInvVariance   Pointer to batch inverse variance memory  (input)\n @param runningMean        Pointer to population mean memory  (input)\n @param runningVariance    Pointer to population variance memory  (input)\n @param expAvgFactor       Scalar value for control of population statistics (input)\n @param epsilon            Scalar value for numerical stability (input)\n @return                   miopenStatus_t"]
    pub fn miopenSetOpArgsBatchNormForward(
        args: miopenOperatorArgs_t,
        bnOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        bnScale: *const ::std::os::raw::c_void,
        bnBias: *const ::std::os::raw::c_void,
        savedMean: *mut ::std::os::raw::c_void,
        savedInvVariance: *mut ::std::os::raw::c_void,
        runningMean: *mut ::std::os::raw::c_void,
        runningVariance: *mut ::std::os::raw::c_void,
        expAvgFactor: f64,
        epsilon: f64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for backward batch normalization op\n\n @param args               An arguments object type (output)\n @param bnOp               Batch normalization forward operator (input)\n @param alpha              Floating point scaling factor, allocated on the host (input)\n @param beta               Floating point shift factor, allocated on the host (input)\n @param x                  Pointer to the forward input tensor memory  (input)\n @param bnScale            Pointer to the gamma tensor memory  (input)\n @param bnBias             Pointer to the beta tensor memory  (input)\n @param resultBnScaleDiff  Pointer to the gamma gradient tensor memory  (output)\n @param resultBnBiasDiff   Pointer to the beta gradient tensor memory  (output)\n @param savedMean          Pointer to batch mean memory  (input)\n @param savedInvVariance   Pointer to batch inverse variance memory  (input)\n @return                   miopenStatus_t"]
    pub fn miopenSetOpArgsBatchNormBackward(
        args: miopenOperatorArgs_t,
        bnOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        x: *const ::std::os::raw::c_void,
        bnScale: *const ::std::os::raw::c_void,
        bnBias: *const ::std::os::raw::c_void,
        resultBnScaleDiff: *mut ::std::os::raw::c_void,
        resultBnBiasDiff: *mut ::std::os::raw::c_void,
        savedMean: *const ::std::os::raw::c_void,
        savedInvVariance: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the arguments for forward bias op\n\n @param args           An arguments object type (output)\n @param biasOp         Forward bias operator (input)\n @param alpha          Floating point scaling factor, allocated on the host (input)\n @param beta           Floating point shift factor, allocated on the host (input)\n @param bias           Pointer to the forward bias input tensor memory  (input)\n @return               miopenStatus_t"]
    pub fn miopenSetOpArgsBiasForward(
        args: miopenOperatorArgs_t,
        biasOp: miopenFusionOpDescriptor_t,
        alpha: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        bias: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Executes the fusion plan. Only compatible with NHWC/NDHWC tensor layouts.\n\n  @deprecated This function is deprecated and may be removed in a future release.\n             Use miopenExecuteFusionPlan_v2 instead.\n\n @param handle           MIOpen handle (input)\n @param fusePlanDesc     fused plan descriptor (input)\n @param inputDesc        Descriptor of the input tensor (input)\n @param input            Source data tensor  (input)\n @param outputDesc       Descriptor of the output tensor (input)\n @param output           Destination data tensor  (output)\n @param args             An argument object of the fused kernel (input)\n @return           miopenStatus_t"]
    pub fn miopenExecuteFusionPlan(
        handle: miopenHandle_t,
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        inputDesc: miopenTensorDescriptor_t,
        input: *const ::std::os::raw::c_void,
        outputDesc: miopenTensorDescriptor_t,
        output: *mut ::std::os::raw::c_void,
        args: miopenOperatorArgs_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Executes the fusion plan with a workspace buffer for layout transformations.\n\n\n @param handle           MIOpen handle (input)\n @param fusePlanDesc     fused plan descriptor (input)\n @param inputDesc        Descriptor of the input tensor (input)\n @param input            Source data tensor  (input)\n @param outputDesc       Descriptor of the output tensor (input)\n @param output           Destination data tensor  (output)\n @param args             An argument object of the fused kernel (input)\n @param workspace        A pointer to an intermediate workspace (input)\n @param workspaceSize Size of the memory in bytes pointed to by workSpace above (input)\n @return           miopenStatus_t"]
    pub fn miopenExecuteFusionPlan_v2(
        handle: miopenHandle_t,
        fusePlanDesc: miopenFusionPlanDescriptor_t,
        inputDesc: miopenTensorDescriptor_t,
        input: *const ::std::os::raw::c_void,
        outputDesc: miopenTensorDescriptor_t,
        output: *mut ::std::os::raw::c_void,
        args: miopenOperatorArgs_t,
        workspace: *mut ::std::os::raw::c_void,
        workspaceSize: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Prepares and executes the Convlution+Bias+Activation Fusion.\n\n\n @param handle               MIOpen handle (input)\n @param alpha1               floating point scaling factor, allocated on the host (input)\n @param xDesc                Tensor descriptor for input data tensor x (input)\n @param x                    Data tensor x (input)\n @param wDesc                Tensor descriptor for weight tensor w (input)\n @param w                    Weights tensor w (input)\n @param convDesc             Convolution layer descriptor (input)\n @param algo                 Algorithm selected (inputs)\n @param workspace            Pointer to workspace required (input)\n @param workspaceSizeInBytes Size of the memory in bytes pointed to by workSpace above\n @param alpha2               floating point scaling factor, allocated on the host (input)\n @param zDesc                Tensor descriptor for tensor z (input)\n @param z                    Data tensor z (input)\n @param biasDesc             Tensor descriptor for input data tensor x (input)\n @param bias                 Data tensor bias (input)\n @param activationDesc       Activation descriptor that specifies the activation mode\n @param yDesc                Tensor descriptor for output data tensor y (input)\n @param y                    Output data tensor"]
    pub fn miopenConvolutionBiasActivationForward(
        handle: miopenHandle_t,
        alpha1: *const ::std::os::raw::c_void,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        convDesc: miopenConvolutionDescriptor_t,
        algo: miopenConvFwdAlgorithm_t,
        workspace: *mut ::std::os::raw::c_void,
        workspaceSizeInBytes: usize,
        alpha2: *const ::std::os::raw::c_void,
        zDesc: miopenTensorDescriptor_t,
        z: *const ::std::os::raw::c_void,
        biasDesc: miopenTensorDescriptor_t,
        bias: *const ::std::os::raw::c_void,
        activationDesc: miopenActivationDescriptor_t,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
#[doc = "< RNN with ReLU activation"]
pub const miopenRNNMode_t_miopenRNNRELU: miopenRNNMode_t = 0;
#[doc = "< RNN with tanh activation"]
pub const miopenRNNMode_t_miopenRNNTANH: miopenRNNMode_t = 1;
#[doc = "< LSTM"]
pub const miopenRNNMode_t_miopenLSTM: miopenRNNMode_t = 2;
#[doc = "< GRU"]
pub const miopenRNNMode_t_miopenGRU: miopenRNNMode_t = 3;
#[doc = "  @enum miopenRNNMode_t\n RNN mode selection for rnn layer preference"]
pub type miopenRNNMode_t = ::std::os::raw::c_uint;
#[doc = "< Matrix multiplication at the input of the first layer"]
pub const miopenRNNInputMode_t_miopenRNNlinear: miopenRNNInputMode_t = 0;
#[doc = "< No operation is performed at the input of the first layer."]
pub const miopenRNNInputMode_t_miopenRNNskip: miopenRNNInputMode_t = 1;
#[doc = " @enum miopenRNNInputMode_t\n Recurrent Neural Network layer initial input mode"]
pub type miopenRNNInputMode_t = ::std::os::raw::c_uint;
#[doc = "< Use dedicated gate-operation kernel for LSTM and fundamental\nalgorithm for vanilla RNN & GRU"]
pub const miopenRNNAlgo_t_miopenRNNdefault: miopenRNNAlgo_t = 0;
#[doc = "< Deprecated, low performance. Function by basic tensor\noperations, supported for vanilla RNN, LSTM, GRU"]
pub const miopenRNNAlgo_t_miopenRNNfundamental: miopenRNNAlgo_t = 1;
#[doc = "< The algorithm rounds some RNN parameters upwards\nto utilize the most optimal GEMM kernel in the computation."]
pub const miopenRNNAlgo_t_miopenRNNroundedDynamic: miopenRNNAlgo_t = 2;
#[doc = " @enum miopenRNNAlgo_t\n Recurrent Neural Network algorithm mode"]
pub type miopenRNNAlgo_t = ::std::os::raw::c_uint;
#[doc = "< Forward in time only."]
pub const miopenRNNDirectionMode_t_miopenRNNunidirection: miopenRNNDirectionMode_t = 0;
#[doc = "< Forward and backwards in time."]
pub const miopenRNNDirectionMode_t_miopenRNNbidirection: miopenRNNDirectionMode_t = 1;
#[doc = " @enum miopenRNNDirectionMode_t\n Recurrent Neural Network bi-directional behavior"]
pub type miopenRNNDirectionMode_t = ::std::os::raw::c_uint;
#[doc = "< No Biases will be applied to GEMM operations"]
pub const miopenRNNBiasMode_t_miopenRNNNoBias: miopenRNNBiasMode_t = 0;
#[doc = "< Biases will be applied to GEMM operations"]
pub const miopenRNNBiasMode_t_miopenRNNwithBias: miopenRNNBiasMode_t = 1;
#[doc = " @enum miopenRNNBiasMode_t\n Recurrent Neural Network add on bias"]
pub type miopenRNNBiasMode_t = ::std::os::raw::c_uint;
pub const miopenRNNGEMMalgoMode_t_miopenRNNAlgoGEMM: miopenRNNGEMMalgoMode_t = 0;
#[doc = " @enum miopenRNNGEMMalgoMode_t\n Recurrent Neural Network add on bias"]
pub type miopenRNNGEMMalgoMode_t = ::std::os::raw::c_uint;
#[doc = "< Not padded data at RNN input/output"]
pub const miopenRNNPaddingMode_t_miopenRNNIONotPadded: miopenRNNPaddingMode_t = 0;
#[doc = "< Padded data at RNN input/output"]
pub const miopenRNNPaddingMode_t_miopenRNNIOWithPadding: miopenRNNPaddingMode_t = 1;
#[doc = " @enum miopenRNNPaddingMode_t\n Recurrent Neural Network input/output data padding mode"]
pub type miopenRNNPaddingMode_t = ::std::os::raw::c_uint;
#[doc = "< FWD, BWD, WRW"]
pub const miopenRNNFWDMode_t_miopenRNNTraining: miopenRNNFWDMode_t = 0;
#[doc = "< Only FWD-inference no back-propagation"]
pub const miopenRNNFWDMode_t_miopenRNNInference: miopenRNNFWDMode_t = 1;
#[doc = " @enum miopenRNNFWDMode_t\n Recurrent Neural Network Training/Inference mode"]
pub type miopenRNNFWDMode_t = ::std::os::raw::c_uint;
pub const miopenRNNBaseLayout_t_miopenRNNDataUnknownLayout: miopenRNNBaseLayout_t = 0;
pub const miopenRNNBaseLayout_t_miopenRNNDataSeqMajorNotPadded: miopenRNNBaseLayout_t = 1;
pub const miopenRNNBaseLayout_t_miopenRNNDataSeqMajorPadded: miopenRNNBaseLayout_t = 2;
pub const miopenRNNBaseLayout_t_miopenRNNDataBatchMajorPadded: miopenRNNBaseLayout_t = 3;
#[doc = " @enum miopenRNNBaseLayout_t\n Data layouts for RNN operations"]
pub type miopenRNNBaseLayout_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Create a RNN layer Descriptor\n\n API for creating an uninitialized RNN layer descriptor.\n @param rnnDesc    Pointer to a tensor descriptor type\n @return           miopenStatus_t"]
    pub fn miopenCreateRNNDescriptor(rnnDesc: *mut miopenRNNDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Retrieves a RNN layer descriptor's details\n\n @param rnnDesc    RNN layer descriptor (input)\n @param rnnMode    RNN mode (output)\n @param algoMode   RNN algorithm mode (output)\n @param inputMode  RNN data input mode (output)\n @param dirMode    Uni or bi direction mode (output)\n @param biasMode   Bias used (output)\n @param hiddenSize Size of hidden state (output)\n @param layer      Number of stacked layers (output)\n @return           miopenStatus_t"]
    pub fn miopenGetRNNDescriptor(
        rnnDesc: miopenRNNDescriptor_t,
        rnnMode: *mut miopenRNNMode_t,
        algoMode: *mut miopenRNNAlgo_t,
        inputMode: *mut miopenRNNInputMode_t,
        dirMode: *mut miopenRNNDirectionMode_t,
        biasMode: *mut miopenRNNBiasMode_t,
        hiddenSize: *mut ::std::os::raw::c_int,
        layer: *mut ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Retrieves a RNN layer descriptor's details version 2. This version enables retrieving\n information of the dropout descriptor of the rnn descriptor.\n\n @param rnnDesc     RNN layer descriptor (input)\n @param hiddenSize  Size of hidden state (output)\n @param layer       Number of stacked layers (output)\n @param dropoutDesc Pre-configured dropout descriptor for dropout layer in between RNN layers\n (output)\n @param inputMode   RNN data input mode (output)\n @param dirMode     Uni or bi direction mode (output)\n @param rnnMode     RNN mode (output)\n @param biasMode    Bias used (output)\n @param algoMode    RNN algorithm mode (output)\n @param dataType    Data type of RNN (output)\n @return            miopenStatus_t"]
    pub fn miopenGetRNNDescriptor_V2(
        rnnDesc: miopenRNNDescriptor_t,
        hiddenSize: *mut ::std::os::raw::c_int,
        layer: *mut ::std::os::raw::c_int,
        dropoutDesc: *mut miopenDropoutDescriptor_t,
        inputMode: *mut miopenRNNInputMode_t,
        dirMode: *mut miopenRNNDirectionMode_t,
        rnnMode: *mut miopenRNNMode_t,
        biasMode: *mut miopenRNNBiasMode_t,
        algoMode: *mut miopenRNNAlgo_t,
        dataType: *mut miopenDataType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the tensor descriptor object\n\n @param rnnDesc RNN tensor descriptor type (input)\n @return           miopenStatus_t"]
    pub fn miopenDestroyRNNDescriptor(rnnDesc: miopenRNNDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the details of the RNN descriptor\n\n Interface for setting the values of the RNN descriptor object. This function requires specific\n algorithm selection.\n @param rnnDesc      RNN layer descriptor type (input)\n @param hsize        Hidden layer size (input)\n @param nlayers      Number of layers (input)\n @param inMode       RNN first layer input mode (input)\n @param direction    RNN direction (input)\n @param rnnMode      RNN model type (input)\n @param biasMode     RNN bias included (input)\n @param algo         RNN algorithm selected (input)\n @param dataType     MIOpen datatype (input)\n @return             miopenStatus_t"]
    pub fn miopenSetRNNDescriptor(
        rnnDesc: miopenRNNDescriptor_t,
        hsize: ::std::os::raw::c_int,
        nlayers: ::std::os::raw::c_int,
        inMode: miopenRNNInputMode_t,
        direction: miopenRNNDirectionMode_t,
        rnnMode: miopenRNNMode_t,
        biasMode: miopenRNNBiasMode_t,
        algo: miopenRNNAlgo_t,
        dataType: miopenDataType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the details of the RNN descriptor version 2. This version enables the use of dropout\n in rnn.\n\n Interface for setting the values of the RNN descriptor object. This function requires specific\n algorithm selection.\n @param rnnDesc      RNN layer descriptor type (input/output)\n @param hsize        Hidden layer size (input)\n @param nlayers      Number of layers (input)\n @param dropoutDesc  Pre-initialized dropout descriptor for dropout layer in between RNN layers\n (input)\n @param inMode       RNN first layer input mode (input)\n @param direction    RNN direction (input)\n @param rnnMode      RNN model type (input)\n @param biasMode     RNN bias included (input)\n @param algo         RNN algorithm selected (input)\n @param dataType     MIOpen datatype (input)\n @return             miopenStatus_t"]
    pub fn miopenSetRNNDescriptor_V2(
        rnnDesc: miopenRNNDescriptor_t,
        hsize: ::std::os::raw::c_int,
        nlayers: ::std::os::raw::c_int,
        dropoutDesc: miopenDropoutDescriptor_t,
        inMode: miopenRNNInputMode_t,
        direction: miopenRNNDirectionMode_t,
        rnnMode: miopenRNNMode_t,
        biasMode: miopenRNNBiasMode_t,
        algo: miopenRNNAlgo_t,
        dataType: miopenDataType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set shape of RNN seqData tensor\n\n Interface for setting tensor shape to be used as RNN input data\n\n @param seqTensorDesc     Tensor descriptor (input/output)\n @param dataType          MIOpen datatype (input)\n @param layout            One of the main supported layouts for RNN data(input)\n @param maxSequenceLen      Sequence length limit within this SeqTensor(input)\n @param batchSize         Number of sequences within this SeqTensor (input)\n @param vectorSize        Vector size (input)\n @param sequenceLenArray  Array containing the length of each sequence in the SeqTensor(input)\n @param paddingMarker     Not used, should be NULL (input)\n @return                  miopenStatus_t"]
    pub fn miopenSetRNNDataSeqTensorDescriptor(
        seqTensorDesc: miopenSeqTensorDescriptor_t,
        dataType: miopenDataType_t,
        layout: miopenRNNBaseLayout_t,
        maxSequenceLen: ::std::os::raw::c_int,
        batchSize: ::std::os::raw::c_int,
        vectorSize: ::std::os::raw::c_int,
        sequenceLenArray: *const ::std::os::raw::c_int,
        paddingMarker: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get shape of RNN seqData tensor\n\n Interface for setting tensor shape to be used as RNN input data\n\n @param seqTensorDesc             Tensor descriptor (input)\n @param dataType                  MIOpen datatype (output)\n @param layout                    One of the main supported layouts for RNN data(output)\n @param maxSequenceLen              Sequence length limit within this SeqTensor(output)\n @param batchSize                 Number of sequences within this SeqTensor (output)\n @param vectorSize                Vector size (output)\n @param sequenceLenArrayLimit  Limit for number of elements that can be returned to user\n by sequenceLenArray (input)\n @param sequenceLenArray          Array containing the length of each sequence in the\n SeqTensor. This is allowed to be a NULL pointer if sequenceLenArrayLimit is 0 (output)\n @param paddingMarker             Not used, should be NULL (input)\n @return                          miopenStatus_t"]
    pub fn miopenGetRNNDataSeqTensorDescriptor(
        seqTensorDesc: miopenSeqTensorDescriptor_t,
        dataType: *mut miopenDataType_t,
        layout: *mut miopenRNNBaseLayout_t,
        maxSequenceLen: *mut ::std::os::raw::c_int,
        batchSize: *mut ::std::os::raw::c_int,
        vectorSize: *mut ::std::os::raw::c_int,
        sequenceLenArrayLimit: ::std::os::raw::c_int,
        sequenceLenArray: *mut ::std::os::raw::c_int,
        paddingMarker: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of memory required to execute the RNN layer\n\n This function calculates the amount of memory required to run the RNN layer given an RNN\n descriptor and a tensor descriptor.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param sequenceLen     Number of iteration unrolls (input)\n @param xDesc           An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param numBytes        Number of bytes required for RNN layer execution (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNWorkspaceSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        sequenceLen: ::std::os::raw::c_int,
        xDesc: *const miopenTensorDescriptor_t,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of memory required for RNN training\n\n This function calculates the amount of memory required to train the RNN layer given an\n RNN descriptor and a tensor descriptor.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param sequenceLen     Number of iteration unrolls (input)\n @param xDesc           An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param numBytes        Number of bytes required for RNN layer execution (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNTrainingReserveSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        sequenceLen: ::std::os::raw::c_int,
        xDesc: *const miopenTensorDescriptor_t,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of additional memory required for this RNN layer execution.\n\n This function calculates the size of extra buffers, depending on the layer configuration, which\n is determined by: RNN descriptor, isInference, and data descriptor. If isInference is True,\n reserve_space_size is always zero, because the reserve_space buffer is not used in Inference\n computation.\n\n @param handle           MIOpen handle (input)\n @param rnnDesc          RNN layer descriptor type (input)\n @param xDesc            Sequence data tensor descriptor (input)\n @param fwdMode          Specifies in which mode the buffers will be used.\n @param workSpaceSize    Minimum WorkSpace buffer size required for RNN layer execution (output)\n @param reserveSpaceSize Minimum ReserveSpaceSize buffer size required for RNN layer execution\n (output)\n @return                 miopenStatus_t"]
    pub fn miopenGetRNNTempSpaceSizes(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        xDesc: miopenSeqTensorDescriptor_t,
        fwdMode: miopenRNNFWDMode_t,
        workSpaceSize: *mut usize,
        reserveSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of parameter memory required for RNN training\n\n This function calculates the amount of parameter memory required to train the RNN layer given an\n RNN descriptor and a tensor descriptor.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param xDesc           A tensor descriptor (input)\n @param numBytes        Number of bytes required for RNN layer execution (output)\n @param dtype           MIOpen data type enum (input)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNParamsSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        numBytes: *mut usize,
        dtype: miopenDataType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Obtain a weight tensor descriptor for RNNs\n\n This function populates a weight descriptor that describes the memory layout of the\n weight matrix.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         Fully populated RNN layer descriptor type (input)\n @param xDesc           A previously populated tensor descriptor (input)\n @param wDesc           A previously allocated tensor descriptor (output)\n @param dtype           MIOpen data type enum (input)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNParamsDescriptor(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        dtype: miopenDataType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Obtain the size in bytes of the RNN input tensor\n\n This function determines the size in bytes of the allocation needed for the input data\n tensor for an RNN layer. The number of bytes is derived from the array of\n tensor descriptors.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         Fully populated RNN layer descriptor (input)\n @param seqLen          Number of iteration unrolls (input)\n @param xDesc           An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param numBytes        Number of bytes required for input tensor (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNInputTensorSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        seqLen: ::std::os::raw::c_int,
        xDesc: *mut miopenTensorDescriptor_t,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Obtain the size in bytes of the RNN hidden tensor\n\n This function determines the size in bytes of the allocation needed for the\n hidden tensor over all layers\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         Fully populated RNN layer descriptor type (input)\n @param seqLen          Number of iteration unrolls (input)\n @param xDesc           An array of previously populated tensor descriptors (input)\n @param numBytes        Number of bytes required for input tensor (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNHiddenTensorSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        seqLen: ::std::os::raw::c_int,
        xDesc: *mut miopenTensorDescriptor_t,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the number of bytes of a parameter matrix\n\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, paramID == 0 retrieves the\n weight matrix associated with the in input GEMM, while paramID == 1 retrieves\n the weight matrix associated with the hidden state GEMM.\n\n For miopenLSTM paramID 0 to 3 refer to the weight matrices associated\n with the input GEMM, 4-7 are associated with matrices associated with the\n hidden state GEMM.\n\n * paramID 0 and 4 are for the input gate.\n\n * paramID 1 and 5 are for the forget gate.\n\n * paramID 2 and 6 are for the output gate.\n\n * paramID 3 and 7 are for the new memory gate.\n\n For miopenGRU paramID 0 to 2 refer to the weight matrix offset associated\n with the input GEMM, while 3 through 5 are associated with the hidden state\n GEMM.\n\n * paramID 0 and 3 are for the update gate.\n\n * paramID 1 and 4 are for the reset gate.\n\n * paramID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param xDesc           A tensor descriptor to input (input)\n @param paramID         ID of the internal parameter tensor (input)\n @param numBytes        The number of bytes of the layer's parameter matrix (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNLayerParamSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        paramID: ::std::os::raw::c_int,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the number of bytes of a bias\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, biasID == 0 retrieves the\n weight matrix associated with the in input GEMM, while biasID == 1 retrieves\n the bias associated with the hidden state GEMM.\n\n For miopenLSTM biasID 0 to 3 refer to the biases associated\n with the input GEMM, 4-7 are associated with biases associated with the\n hidden state GEMM.\n\n * biasID 0 and 4 are for the input gate.\n\n * biasID 1 and 5 are for the forget gate.\n\n * biasID 2 and 6 are for the output gate.\n\n * biasID 3 and 7 are for the new memory gate.\n\n For miopenGRU biasID 0 to 2 refer to the biases associated with the input GEMM,\n while 3 through 5 are associated with the hidden state GEMM.\n\n * biasID 0 and 3 are for the update gate.\n\n * biasID 1 and 4 are for the reset gate.\n\n * biasID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param biasID          ID of the internal parameter tensor (input)\n @param numBytes        The number of bytes of the layer's bias (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNLayerBiasSize(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        biasID: ::std::os::raw::c_int,
        numBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets a weight matrix for a specific layer in an RNN stack\n\n This function retrieves the weight matrix data for a specific layer and parameter ID\n and copies the data into previously allocated device memory.\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, paramID == 0 retrieves the\n weight matrix associated with the in input GEMM, while paramID == 1 retrieves\n the weight matrix associated with the hidden state GEMM.\n\n For miopenLSTM paramID 0 to 3 refer to the weight matrices associated\n with the input GEMM, 4-7 are associated with matrices associated with the\n hidden state GEMM.\n\n * paramID 0 and 4 are for the input gate.\n\n * paramID 1 and 5 are for the forget gate.\n\n * paramID 2 and 6 are for the output gate.\n\n * paramID 3 and 7 are for the new memory gate.\n\n For miopenGRU paramID 0 to 2 refer to the weight matrix offset associated\n with the input GEMM, while 3 through 5 are associated with the hidden state\n GEMM.\n\n * paramID 0 and 3 are for the update gate.\n\n * paramID 1 and 4 are for the reset gate.\n\n * paramID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n The output argument paramDesc is a previously created tensor descriptor that is populated\n to describe the memory layout of the parameter matrix. It is full packed and is used when\n calling to miopenSetRNNLayerParam()\n\n The argument layerParam should either be nullptr, or have device memory allocated\n to allow copying of the entire layer parameter matrix into it. If layerParam is\n nullptr then only the paramDesc is populated and returned. The size in bytes of the\n layer parameter matrix can be determined by using miopenGetRNNLayerParamSize().\n\n Note: When inputSkip mode is selected there is no input layer matrix operation,\n and therefore no associated memory. In this case miopenGetRNNLayerParam() will return\n a error status miopenStatusBadParm for input paramID associated with the input GEMM.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param xDesc           A tensor descriptor to input (input)\n @param wDesc           A tensor descriptor to the parameter tensor (input)\n @param w               Pointer to memory containing parameter tensor (input)\n @param paramID         ID of the internal parameter tensor (input)\n @param paramDesc       Tensor descriptor for the fully packed output parameter tensor (output)\n @param layerParam      Pointer to the memory location of the parameter tensor (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNLayerParam(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        paramID: ::std::os::raw::c_int,
        paramDesc: miopenTensorDescriptor_t,
        layerParam: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets a bias for a specific layer in an RNN stack\n\n This function retrieves the bias data for a specific layer and bias ID and copies\n the data into previously allocated device memory.\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, biasID == 0 retrieves the\n bias associated with the in input GEMM, while biasID == 1 retrieves\n the bias associated with the hidden state GEMM.\n\n For miopenLSTM biasID 0 to 3 refer to the biases associated\n with the input GEMM, 4-7 are associated with biases associated with the\n hidden state GEMM.\n\n * biasID 0 and 4 are for the input gate.\n\n * biasID 1 and 5 are for the forget gate.\n\n * biasID 2 and 6 are for the output gate.\n\n * biasID 3 and 7 are for the new memory gate.\n\n For miopenGRU biasID 0 to 2 refer to the biases associated with the input GEMM,\n while 3 through 5 are associated with the hidden state GEMM.\n\n * biasID 0 and 3 are for the update gate.\n\n * biasID 1 and 4 are for the reset gate.\n\n * biasID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n The output argument biasDesc is a previously created tensor descriptor that is populated\n to describe the memory layout of the bias. It is full packed and is used when\n calling to miopenSetRNNLayerBias()\n\n The argument layerBias should either be nullptr, or have device memory allocated\n to allow copying of the entire layer bias into it. If layerBias is\n nullptr then only the biasDesc is populated and returned. The size in bytes of the\n layer bias can be determined by using miopenGetRNNLayerBiasSize().\n\n Note: When inputSkip mode is selected there is no input layer matrix operation,\n and therefore no associated memory. In this case miopenGetRNNLayerBias() will return\n a error status miopenStatusBadParm for input biasID associated with the input GEMM.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param xDesc           A tensor descriptor to input (input)\n @param wDesc           A tensor descriptor to the parameter tensor (input)\n @param w               Pointer to memory containing parameter tensor (input)\n @param biasID          ID of the internal parameter tensor (input)\n @param biasDesc        Descriptor of the parameter tensor (output)\n @param layerBias       Pointer to the memory location of the bias tensor (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNLayerBias(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        biasID: ::std::os::raw::c_int,
        biasDesc: miopenTensorDescriptor_t,
        layerBias: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets an index offset for a specific weight matrix for a layer in the\n  RNN stack\n\n This function retrieves the index offset for a weight matrix in a layer.\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, paramID == 0 retrieves the\n weight matrix offset associated with the in input GEMM, while paramID == 1\n retrieves the weight matrix offset associated with the hidden state GEMM.\n\n For miopenLSTM paramID 0 to 3 refer to the weight matrix offsets associated\n with the input GEMM, 4-7 are associated with matrix offset associated with the\n hidden state GEMM.\n\n * paramID 0 and 4 are for the input gate.\n\n * paramID 1 and 5 are for the forget gate.\n\n * paramID 2 and 6 are for the output gate.\n\n * paramID 3 and 7 are for the new memory gate.\n\n For miopenGRU paramID 0 to 2 refer to the weight matrix offset associated\n with the input GEMM, while 3 through 5 are associated with the hidden state\n GEMM.\n\n * paramID 0 and 3 are for the update gate.\n\n * paramID 1 and 4 are for the reset gate.\n\n * paramID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n The output argument paramDesc is a previously created tensor descriptor that is populated\n to describe the memory layout of the parameter matrix. It is full packed and is used when\n calling to miopenSetRNNLayerParam().\n\n The argument layerParamOffset should either be nullptr, or an address to place the\n offset. If layerParamOffset is nullptr then only the paramDesc is populated and returned.\n\n Note: When inputSkip mode is selected there is no input layer matrix operation,\n and therefore no associated memory. In this case miopenGetRNNLayerParamOffset() will return\n a error status miopenStatusBadParm for input paramID associated with the input GEMM.\n\n\n @param rnnDesc           RNN layer descriptor type (input)\n @param layer             The layer number in the RNN stack (input)\n @param xDesc             A tensor descriptor to input (input)\n @param paramID           ID of the internal parameter tensor (input)\n @param paramDesc         Tensor descriptor for the fully packed output parameter tensor (output)\n @param layerParamOffset  Location for the parameter offset (output)\n @return                  miopenStatus_t"]
    pub fn miopenGetRNNLayerParamOffset(
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        paramID: ::std::os::raw::c_int,
        paramDesc: miopenTensorDescriptor_t,
        layerParamOffset: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets a bias index offset for a specific layer in an RNN stack\n\n This function retrieves the bias index offset for a specific layer and bias ID.\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, biasID == 0 retrieves the\n bias associated with the in input GEMM, while biasID == 1 retrieves\n the weight matrix associated with the hidden state GEMM.\n\n For miopenLSTM biasID 0 to 3 refer to the bias offset associated\n with the input GEMM, 4-7 are the bias offsets associated with the hidden state GEMM.\n\n * biasID 0 and 4 are for the input gate.\n\n * biasID 1 and 5 are for the forget gate.\n\n * biasID 2 and 6 are for the output gate.\n\n * biasID 3 and 7 are for the new memory gate.\n\n For miopenGRU biasID 0 to 2 refer to the biases associated with the input GEMM,\n while 3 through 5 are associated with the hidden state GEMM.\n\n * biasID 0 and 3 are for the update gate.\n\n * biasID 1 and 4 are for the reset gate.\n\n * biasID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n The output argument biasDesc is a previously created tensor descriptor that is populated\n to describe the memory layout of the bias. It is full packed and is used when\n calling to miopenSetRNNLayerBias()\n\n The argument layerBiasOffset should either be nullptr, or point to an output address.\n If layerBias is nullptr then only the biasDesc is populated and returned.\n\n Note: When inputSkip mode is selected there is no input layer matrix operation,\n and therefore no associated memory. In this case miopenGetRNNLayerBiasOffset() will return\n a error status miopenStatusBadParm for input biasID associated with the input GEMM.\n\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param xDesc           A tensor descriptor to input (input)\n @param biasID          ID of the internal parameter tensor (input)\n @param biasDesc        Descriptor of the parameter tensor (output)\n @param layerBiasOffset Pointer to the memory location of the bias tensor (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNLayerBiasOffset(
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        biasID: ::std::os::raw::c_int,
        biasDesc: miopenTensorDescriptor_t,
        layerBiasOffset: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets a weight matrix for a specific layer in an RNN stack\n\n This function sets the weight matrix data for a specific layer and parameter ID.\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, paramID == 0 sets the\n weight matrix associated with the in input GEMM, while paramID == 1 sets\n the weight matrix associated with the hidden state GEMM.\n\n\n For miopenLSTM paramID 0 to 3 refer to the weight matrices associated\n with the input GEMM, 4-7 are associated with matrices associated with the\n hidden state GEMM.\n\n * paramID 0 and 4 are for the input gate.\n\n * paramID 1 and 5 are for the forget gate.\n\n * paramID 2 and 6 are for the output gate.\n\n * paramID 3 and 7 are for the new memory gate.\n\n For miopenGRU paramID 0 to 2 refer to the weight matrix offset associated\n with the input GEMM, while 3 through 5 are associated with the hidden state\n GEMM.\n\n * paramID 0 and 3 are for the update gate.\n\n * paramID 1 and 4 are for the reset gate.\n\n * paramID 2 and 5 are for the new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n The input argument paramDesc is a previously populated tensor descriptor typically\n by first calling miopenGetRNNLayerParam().\n\n Note: When inputSkip mode is selected there is no input layer matrix operation,\n and therefore no associated memory. In this case miopenSetRNNLayerParam() will return\n a error status miopenStatusBadParm for input paramID associated with the input GEMM.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param xDesc           A tensor descriptor to input (input)\n @param wDesc           A tensor descriptor to the parameter tensor (input)\n @param w               Pointer to memory containing parameter tensor (input)\n @param paramID         ID of the internal parameter tensor (input)\n @param paramDesc       Descriptor of the parameter tensor (input)\n @param layerParam      Pointer to the memory location of the parameter tensor (input)\n @return                miopenStatus_t"]
    pub fn miopenSetRNNLayerParam(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        w: *mut ::std::os::raw::c_void,
        paramID: ::std::os::raw::c_int,
        paramDesc: miopenTensorDescriptor_t,
        layerParam: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets a bias for a specific layer in an RNN stack\n\n This function sets the bias data for a specific layer and bias ID.\n\n For RNN vanilla miopenRNNRELU and miopenRNNTANH, biasID == 0 retrieves the\n weight matrix associated with the in input GEMM, while biasID == 1 retrieves\n the bias associated with the hidden state GEMM.\n\n For miopenLSTM biasID 0 to 3 refer to the biases associated\n with the input GEMM, 4-7 are associated with the biases associated with the\n hidden state GEMM.\n\n * biasID 0 and 4 are for the input gate.\n\n * biasID 1 and 5 are for the forget gate.\n\n * biasID 2 and 6 are for the output gate.\n\n * biasID 3 and 7 are for the new memory gate.\n\n For miopenGRU biasID 0 to 2 refer to the biases associated with the input GEMM,\n while 3 through 5 are associated with the hidden state GEMM.\n\n * biasID 0 and 3 are for the update gate.\n\n * biasID 1 and 4 are for the reset gate.\n\n * biasID 2 and 5 are for the new new memory gate.\n\n For bi-directional RNNs the backwards in time direction is numbered as the layer\n directly after the forward in time direction.\n\n The input argument biasDesc is a previously populated tensor descriptor typically\n by first calling miopenGetRNNLayeBias().\n\n Note: When inputSkip mode is selected there is no input layer matrix operation,\n and therefore no associated memory. In this case miopenSetRNNLayerBias will return\n a error status miopenStatusBadParm for input biasID associated with the input GEMM.\n\n @param handle          MIOpen handle (input)\n @param rnnDesc         RNN layer descriptor type (input)\n @param layer           The layer number in the RNN stack (input)\n @param xDesc           A tensor descriptor to input (input)\n @param wDesc           A tensor descriptor to the bias tensor (input)\n @param w               Pointer to memory containing bias tensor (input)\n @param biasID          ID of the internal bias tensor (input)\n @param biasDesc        Descriptor of the bias tensor (output)\n @param layerBias       Pointer to the memory location of the bias tensor (output)\n @return                miopenStatus_t"]
    pub fn miopenSetRNNLayerBias(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        layer: ::std::os::raw::c_int,
        xDesc: miopenTensorDescriptor_t,
        wDesc: miopenTensorDescriptor_t,
        w: *mut ::std::os::raw::c_void,
        biasID: ::std::os::raw::c_int,
        biasDesc: miopenTensorDescriptor_t,
        layerBias: *const ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets a bias for a specific layer in an RNN stack\n\n This function changes padidng mode at previously created and initialized RNN descriptor.\n This function must be called before using miopenGetRNNWorkspaceSize()\n and miopenGetRNNTrainingReserveSize() functions.\n By default, not padded data is expected at the RNN input/output.\n\n @param rnnDesc         RNN layer descriptor type (input/output)\n @param paddingMode     RNN input/output data padding mode (input)\n @return                miopenStatus_t"]
    pub fn miopenSetRNNPaddingMode(
        rnnDesc: miopenRNNDescriptor_t,
        paddingMode: miopenRNNPaddingMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief This function retrieves the RNN padding mode from the RNN descriptor.\n\n @param rnnDesc         RNN layer descriptor type (input)\n @param paddingMode     Pointer to the RNN padding mode (output)\n @return                miopenStatus_t"]
    pub fn miopenGetRNNPaddingMode(
        rnnDesc: miopenRNNDescriptor_t,
        paddingMode: *mut miopenRNNPaddingMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training for recurrent layer.\n\n Interface for executing the forward training / inference pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n @param fwdMode          Specifies in which mode the buffers will be used.\n @param xDesc                 An input tensor descriptor for sequenced RNN data. This\n miopenSeqTensorDescriptor_t should be initialized by `miopenSetRNNDataSeqTensorDescriptor`\n function.(input)\n @param x                     Pointer to input tensor (input)\n\n @param hDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n @param hy                    Pointer to the hidden layer output tensor. If hy is NULL,\n then the final hidden state will not be saved. (output)\n\n @param cDesc                A cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cx                    Pointer to the cell layer input tensor. If cx is NULL,\n then the initial cell state will be zero initialized. (input)\n @param cy                    Pointer to the cell layer output tensor. If hy is NULL,\n then the final cell state will not be saved. (output)\n\n @param yDesc                 An array of fully packed tensor descriptors associated\n with the output from each time step. The first dimension of the tensor descriptors\n must equal the first dimension of the first descriptor (batch size) in the xDesc\n tensor array. The second dimension of the element of the descriptor array\n depends on the direction mode selected. If the direction mode is unidirectional,\n the second dimension is the hiddenSize. If direction mode is bidirectional\n the second dimension is twice the hiddenSize. (input)\n @param y                     Pointer to output tensor (output)\n\n @param w                     Pointer to input weights tensor (input)\n @param weightSpaceSize       Number of allocated bytes in memory for the weights tensor\n @param workSpace             Pointer to memory allocated for forward (input / output)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @param reserveSpace          Pointer to memory allocated for hidden states used during training\n (input / output)\n @param reserveSpaceNumBytes  Number of allocated bytes in memory for use in the forward  (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNForward(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        fwdMode: miopenRNNFWDMode_t,
        xDesc: miopenSeqTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        hDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        hy: *mut ::std::os::raw::c_void,
        cDesc: miopenTensorDescriptor_t,
        cx: *const ::std::os::raw::c_void,
        cy: *mut ::std::os::raw::c_void,
        yDesc: miopenSeqTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        w: *const ::std::os::raw::c_void,
        weightSpaceSize: usize,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
        reserveSpace: *mut ::std::os::raw::c_void,
        reserveSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backward data for recurrent layer\n\n Interface for executing the backward data pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n\n @param yDesc                 An output tensor descriptor for sequenced RNN data. This\n miopenSeqTensorDescriptor_t should be initialized by `miopenSetRNNDataSeqTensorDescriptor`\nfunction.(input)\n @param y                     Pointer to input tensor (input)\n @param dy                    Pointer to the hidden layer input tensor (input)\n\n @param hDesc                An input hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n @param dhy                   Pointer to the cell layer input tensor (input)\n @param dhx                   Pointer to the delta hidden layer output tensor. If dhx is NULL\n the hidden gradient will not ouput. (output)\n\n @param cDesc                A input cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cx                    Pointer to the hidden layer input tensor. If cx is NULL,\n then the initial cell state will be zero initialized. (input)\n @param dcy                   Pointer to the cell layer input tensor. If dcy is NULL,\n then the initial delta cell state will be zero initialized. (input)\n @param dcx                   Pointer to the cell layer output tensor. If dcx is NULL\n the cell gradient will not ouput. (output)\n\n @param xDesc                 An input tensor descriptor for sequenced RNN data. This\n miopenSeqTensorDescriptor_t should be initialized by `miopenSetRNNDataSeqTensorDescriptor`\nfunction.(input)\n @param dx                    Pointer to the cell layer output tensor (output)\n\n @param w                     Pointer to input weights tensor (input)\n @param weightSpaceSize       Number of allocated bytes in memory for the weights tensor\n @param workSpace             Pointer to memory allocated for forward training (input)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @param reserveSpace          Pointer to memory allocated for random states (input / output)\n @param reserveSpaceNumBytes  Number of allocated bytes in memory for use in the forward (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNBackwardSeqData(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        yDesc: miopenSeqTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dy: *const ::std::os::raw::c_void,
        hDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        dhy: *const ::std::os::raw::c_void,
        dhx: *mut ::std::os::raw::c_void,
        cDesc: miopenTensorDescriptor_t,
        cx: *const ::std::os::raw::c_void,
        dcy: *const ::std::os::raw::c_void,
        dcx: *mut ::std::os::raw::c_void,
        xDesc: miopenSeqTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        w: *const ::std::os::raw::c_void,
        weightSpaceSize: usize,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
        reserveSpace: *mut ::std::os::raw::c_void,
        reserveSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backward weights for recurrent layer\n\n Interface for executing the backward weights pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n\n @param xDesc                 An input tensor descriptor for sequenced RNN data. This\n miopenSeqTensorDescriptor_t should be initialized by `miopenSetRNNDataSeqTensorDescriptor`\nfunction.(input)\n @param x                     Pointer to input tensor (input)\n\n @param hDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n\n @param yDesc                 An output tensor descriptor for sequenced RNN data. This\n miopenSeqTensorDescriptor_t should be initialized by `miopenSetRNNDataSeqTensorDescriptor`\nfunction.(input)\n @param y                     Pointer to the output tensor (input)\n\n @param dw                    Pointer to input weights tensor (input / output)\n @param weightSpaceSize       Number of allocated bytes in memory for the weights tensor\n @param workSpace             Pointer to memory allocated for forward training (input)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @param reserveSpace          Pointer to memory allocated for random states (input)\n @param reserveSpaceNumBytes  Number of allocated bytes in memory for use in the forward (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNBackwardWeightsSeqTensor(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        xDesc: miopenSeqTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        hDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        yDesc: miopenSeqTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dw: *mut ::std::os::raw::c_void,
        weightSpaceSize: usize,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
        reserveSpace: *const ::std::os::raw::c_void,
        reserveSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward training for recurrent layer\n\n Interface for executing the forward training pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n @param sequenceLen           Temporal iterations to unroll (input)\n @param xDesc                 An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param x                     Pointer to input tensor (input)\n @param hxDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n @param cxDesc                A cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cx                    Pointer to the cell layer input tensor. If cx is NULL,\n then the initial cell state will be zero initialized. (input)\n @param wDesc                 A weights tensor descriptor (input)\n @param w                     Pointer to input weights tensor (input)\n @param yDesc                 An array of fully packed tensor descriptors associated\n with the output from each time step. The first dimension of the tensor descriptors\n must equal the first dimension of the first descriptor (batch size) in the xDesc\n tensor array. The second dimension of the element of the descriptor array\n depends on the direction mode selected. If the direction mode is unidirectional,\n the second dimension is the hiddenSize. If direction mode is bidirectional\n the second dimension is twice the hiddenSize. (input)\n @param y                     Pointer to output tensor (output)\n @param hyDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hy                    Pointer to the hidden layer output tensor. If hy is NULL,\n then the final hidden state will not be saved. (output)\n @param cyDesc                A cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cy                    Pointer to the cell layer output tensor. If hy is NULL,\n then the final cell state will not be saved. (output)\n @param workSpace             Pointer to memory allocated for forward training (input)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @param reserveSpace          Pointer to memory allocated for random states (input / output)\n @param reserveSpaceNumBytes  Number of allocated bytes in memory for use in the forward  (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNForwardTraining(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        sequenceLen: ::std::os::raw::c_int,
        xDesc: *const miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        hxDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        cxDesc: miopenTensorDescriptor_t,
        cx: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        yDesc: *const miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        hyDesc: miopenTensorDescriptor_t,
        hy: *mut ::std::os::raw::c_void,
        cyDesc: miopenTensorDescriptor_t,
        cy: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
        reserveSpace: *mut ::std::os::raw::c_void,
        reserveSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backward data for recurrent layer\n\n Interface for executing the backward data pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n @param sequenceLen           Temporal iterations to unroll (input)\n @param yDesc                 An array of tensor descriptors (input)\n @param y                     Pointer to input tensor (input)\n @param dyDesc                An array of fully packed tensor descriptors associated\n with the output from each time step. The first dimension of the tensor descriptors\n must equal the first dimension of the first descriptor (batch size) in the xDesc\n tensor array. The second dimension of the element of the descriptor array\n depends on the direction mode selected. If the direction mode is unidirectional,\n the second dimension is the hiddenSize. If direction mode is bidirectional\n the second dimension is twice the hiddenSize. (input)\n @param dy                    Pointer to the hidden layer input tensor (input)\n @param dhyDesc               A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param dhy                   Pointer to the cell layer input tensor (input)\n @param dcyDesc               A cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param dcy                   Pointer to the cell layer input tensor. If dcy is NULL,\n then the initial delta cell state will be zero initialized. (input)\n @param wDesc                 A weights tensor descriptor (input)\n @param w                     Pointer to input weights tensor (input)\n @param hxDesc                An input hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n @param cxDesc                A input cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cx                    Pointer to the hidden layer input tensor. If cx is NULL,\n then the initial cell state will be zero initialized. (input)\n @param dxDesc                An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param dx                    Pointer to the cell layer output tensor (output)\n @param dhxDesc               A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param dhx                   Pointer to the delta hidden layer output tensor. If dhx is NULL\n the hidden gradient will not ouput. (output)\n @param dcxDesc               A tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param dcx                   Pointer to the cell layer output tensor. If dcx is NULL\n the cell gradient will not ouput. (output)\n @param workSpace             Pointer to memory allocated for forward training (input)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @param reserveSpace          Pointer to memory allocated for random states (input / output)\n @param reserveSpaceNumBytes  Number of allocated bytes in memory for use in the forward (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNBackwardData(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        sequenceLen: ::std::os::raw::c_int,
        yDesc: *const miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dyDesc: *const miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        dhyDesc: miopenTensorDescriptor_t,
        dhy: *const ::std::os::raw::c_void,
        dcyDesc: miopenTensorDescriptor_t,
        dcy: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        hxDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        cxDesc: miopenTensorDescriptor_t,
        cx: *const ::std::os::raw::c_void,
        dxDesc: *const miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        dhxDesc: miopenTensorDescriptor_t,
        dhx: *mut ::std::os::raw::c_void,
        dcxDesc: miopenTensorDescriptor_t,
        dcx: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
        reserveSpace: *mut ::std::os::raw::c_void,
        reserveSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backward weights for recurrent layer\n\n Interface for executing the backward weights pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n @param sequenceLen           Temporal iterations to unroll (input)\n @param xDesc                 An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param x                     Pointer to input tensor (input)\n @param hxDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n @param yDesc                 An array of fully packed tensor descriptors associated\n with the output from each time step. The first dimension of the tensor descriptors\n must equal the first dimension of the first descriptor (batch size) in the xDesc\n tensor array. The second dimension of the element of the descriptor array\n depends on the direction mode selected. If the direction mode is unidirectional,\n the second dimension is the hiddenSize. If direction mode is bidirectional\n the second dimension is twice the hiddenSize. (input)\n @param y                     Pointer to the output tensor (input)\n @param dwDesc                A weights tensor descriptor (input)\n @param dw                    Pointer to input weights tensor (input / output)\n @param workSpace             Pointer to memory allocated for forward training (input)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @param reserveSpace          Pointer to memory allocated for random states (input)\n @param reserveSpaceNumBytes  Number of allocated bytes in memory for use in the forward (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNBackwardWeights(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        sequenceLen: ::std::os::raw::c_int,
        xDesc: *const miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        hxDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        yDesc: *const miopenTensorDescriptor_t,
        y: *const ::std::os::raw::c_void,
        dwDesc: miopenTensorDescriptor_t,
        dw: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
        reserveSpace: *const ::std::os::raw::c_void,
        reserveSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference for RNN layer\n\n Interface for executing the forward inference pass on a RNN.\n\n @param handle                MIOpen handle (input)\n @param rnnDesc               RNN layer descriptor type (input)\n @param sequenceLen           Temporal iterations to unroll (input)\n @param xDesc                 An array of tensor descriptors. These are the\n input descriptors to each time step. The first dimension of each descriptor is the\n batch size and may decrease from element n to element n+1 and not increase in size.\n The second dimension is the same for all descriptors in the array and is the input\n vector length. (input)\n @param x                     Pointer to input tensor (input)\n @param hxDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hx                    Pointer to the hidden layer input tensor. If hx is NULL,\n then the initial hidden state will be zero initialized. (input)\n @param cxDesc                A cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cx                    Pointer to the cell layer input tensor. If cx is NULL,\n then the initial cell state will be zero initialized. (input)\n @param wDesc                 A weights tensor descriptor (input)\n @param w                     Pointer to input weights tensor (input)\n @param yDesc                 An array of fully packed tensor descriptors associated\n with the output from each time step. The first dimension of the tensor descriptors\n must equal the first dimension of the first descriptor (batch size) in the xDesc\n tensor array. The second dimension of the element of the descriptor array\n depends on the direction mode selected. If the direction mode is unidirectional,\n the second dimension is the hiddenSize. If direction mode is bidirectional\n the second dimension is twice the hiddenSize. (input)\n @param y                     Pointer to output tensor (output)\n @param hyDesc                A hidden tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param hy                    Pointer to the hidden layer output tensor. If hy is NULL,\n then the final hidden state will not be saved. (output)\n @param cyDesc                A output cell tensor descriptor that has as its first dimension\n of the number of layers if the direction mode is unidirectional and twice the\n number of layers if the direction mode is bidirectional. The second dimension of\n the descriptor must equal the largest first dimension of the xDesc tensor descriptor\n array. The third dimension equals the hiddenSize. (input)\n @param cy                    Pointer to the cell layer output tensor. If cy is NULL,\n then the final cell state will not be saved. (output)\n @param workSpace             Pointer to memory allocated for forward training (input)\n @param workSpaceNumBytes     Number of allocated bytes in memory for the workspace (input)\n @return                      miopenStatus_t"]
    pub fn miopenRNNForwardInference(
        handle: miopenHandle_t,
        rnnDesc: miopenRNNDescriptor_t,
        sequenceLen: ::std::os::raw::c_int,
        xDesc: *const miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        hxDesc: miopenTensorDescriptor_t,
        hx: *const ::std::os::raw::c_void,
        cxDesc: miopenTensorDescriptor_t,
        cx: *const ::std::os::raw::c_void,
        wDesc: miopenTensorDescriptor_t,
        w: *const ::std::os::raw::c_void,
        yDesc: *const miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        hyDesc: miopenTensorDescriptor_t,
        hy: *mut ::std::os::raw::c_void,
        cyDesc: miopenTensorDescriptor_t,
        cy: *mut ::std::os::raw::c_void,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceNumBytes: usize,
    ) -> miopenStatus_t;
}
#[doc = "< Results are guaranteed to be reproducible"]
pub const miopenCTCLossAlgo_t_MIOPEN_CTC_LOSS_ALGO_DETERMINISTIC: miopenCTCLossAlgo_t = 0;
#[doc = " @enum miopenCTCLossAlgo_t\n Algorithms available to execute the CTC loss operation"]
pub type miopenCTCLossAlgo_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Create a CTC loss function Descriptor\n\n API for creating an uninitialized CTC loss function descriptor.\n @param ctcLossDesc  Pointer to the CTC loss function descriptor type (output)\n @return             miopenStatus_t"]
    pub fn miopenCreateCTCLossDescriptor(
        ctcLossDesc: *mut miopenCTCLossDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Retrieves a CTC loss function descriptor's details\n\n @param ctcLossDesc          CTC loss function descriptor (input)\n @param dataType             Data type used in this CTC loss operation, only fp32 currently\n supported (output)\n @param blank_label_id       User defined index for blank label (output)\n @param apply_softmax_layer  Boolean to toggle input layer property (output)\n @return                     miopenStatus_t"]
    pub fn miopenGetCTCLossDescriptor(
        ctcLossDesc: miopenCTCLossDescriptor_t,
        dataType: *mut miopenDataType_t,
        blank_label_id: *mut ::std::os::raw::c_int,
        apply_softmax_layer: *mut bool,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys a CTC loss function descriptor object\n\n @param ctcLossDesc  CTC loss function descriptor type (input)\n @return             miopenStatus_t"]
    pub fn miopenDestroyCTCLossDescriptor(ctcLossDesc: miopenCTCLossDescriptor_t)
        -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the details of a CTC loss function descriptor\n\n @param ctcLossDesc          CTC loss function descriptor type (input)\n @param dataType             Data type used in this CTC loss operation, only fp32 currently\n supported (input)\n @param blank_label_id       User defined index for blank label, default 0 (input)\n @param apply_softmax_layer  Boolean to toggle input layer property (input)\n @return             miopenStatus_t"]
    pub fn miopenSetCTCLossDescriptor(
        ctcLossDesc: miopenCTCLossDescriptor_t,
        dataType: miopenDataType_t,
        blank_label_id: ::std::os::raw::c_int,
        apply_softmax_layer: bool,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of memory required to execute miopenCTCLoss\n\n This function calculates the amount of memory required to run the CTC loss function given a CTC\n loss function descriptor with the specified algorithm.\n @param handle         MIOpen handle (input)\n @param probsDesc      Tensor descriptor for probabilities (input)\n @param gradientsDesc  Tensor descriptor for gradients (input)\n @param labels         Pointer to the flattened labels list (input)\n @param labelLengths   Pointer to the lengths list for \"labels\" (input)\n @param inputLengths   Pointer to the list of the time steps in each batch (input)\n @param algo           CTC loss algorithm selected (input)\n @param ctcLossDesc    CTC loss function descriptor type (input)\n @param workSpaceSize  Number of bytes of workspace required for CTC loss operation with selected\n algorithm (output)\n @return               miopenStatus_t"]
    pub fn miopenGetCTCLossWorkspaceSize(
        handle: miopenHandle_t,
        probsDesc: miopenTensorDescriptor_t,
        gradientsDesc: miopenTensorDescriptor_t,
        labels: *const ::std::os::raw::c_int,
        labelLengths: *const ::std::os::raw::c_int,
        inputLengths: *const ::std::os::raw::c_int,
        algo: miopenCTCLossAlgo_t,
        ctcLossDesc: miopenCTCLossDescriptor_t,
        workSpaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward inference for CTCLoss layer\n\n Interface for executing the forward inference pass on a CTCLoss.\n @param handle         MIOpen handle (input)\n @param probsDesc      Tensor descriptor for probabilities (input)\n @param probs          Pointer to the probabilities tensor (input)\n @param labels         Pointer to the flattened labels list (input)\n @param labelLengths   Pointer to the lengths list for \"labels\" (input)\n @param inputLengths   Pointer to the list of the time steps in each batch (input)\n @param losses         Pointer to the computed losses of CTC (Output)\n @param gradientsDesc  Tensor descriptor for gradients (input)\n @param gradients      Pointer to the computed gradients of CTC (Output)\n @param algo           CTC loss algorithm selected (input)\n @param ctcLossDesc    CTC loss function descriptor type (input)\n @param workSpace      Pointer to memory allocated for execute CTC loss operation (input)\n @param workSpaceSize  Number of bytes of workspace required for CTC loss operation with selected\n algorithm (input)\n @return               miopenStatus_t"]
    pub fn miopenCTCLoss(
        handle: miopenHandle_t,
        probsDesc: miopenTensorDescriptor_t,
        probs: *const ::std::os::raw::c_void,
        labels: *const ::std::os::raw::c_int,
        labelLengths: *const ::std::os::raw::c_int,
        inputLengths: *const ::std::os::raw::c_int,
        losses: *mut ::std::os::raw::c_void,
        gradientsDesc: miopenTensorDescriptor_t,
        gradients: *mut ::std::os::raw::c_void,
        algo: miopenCTCLossAlgo_t,
        ctcLossDesc: miopenCTCLossDescriptor_t,
        workSpace: *mut ::std::os::raw::c_void,
        workSpaceSize: usize,
    ) -> miopenStatus_t;
}
#[doc = "< XORWOW pseudorandom generator"]
pub const miopenRNGType_t_MIOPEN_RNG_PSEUDO_XORWOW: miopenRNGType_t = 0;
#[doc = "  @enum miopenRNGType_t\n random number generator type"]
pub type miopenRNGType_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Creates the dropout descriptor object\n\n @param dropoutDesc Pointer to a dropout descriptor type\n @return            miopenStatus_t"]
    pub fn miopenCreateDropoutDescriptor(
        dropoutDesc: *mut miopenDropoutDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys the dropout descriptor object\n\n @param dropoutDesc Dropout descriptor type (input)\n @return            miopenStatus_t"]
    pub fn miopenDestroyDropoutDescriptor(dropoutDesc: miopenDropoutDescriptor_t)
        -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of memory required to run dropout\n\n This function calculates the amount of memory required to run dropout.\n @param xDesc                    Tensor descriptor for data tensor x (input)\n @param reserveSpaceSizeInBytes  Number of bytes of reservespace required for executing dropout\n (Output)\n @return                         miopenStatus_t"]
    pub fn miopenDropoutGetReserveSpaceSize(
        xDesc: miopenTensorDescriptor_t,
        reserveSpaceSizeInBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query the amount of memory required to store the states of the random number generators\n\n This function calculates the amount of memory required to store the states of the random number\n generators used by miopenDropoutForward.\n @param handle            MIOpen handle (input)\n @param stateSizeInBytes  Number of bytes required to store random generator states (Output)\n @return                  miopenStatus_t"]
    pub fn miopenDropoutGetStatesSize(
        handle: miopenHandle_t,
        stateSizeInBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the details of the dropout descriptor\n\n Interface for querying the dropout descriptor\n @param dropoutDesc  Dropout layer descriptor (input)\n @param handle       MIOpen handle (input)\n @param dropout      The probability by which the input is set to 0 in the dropout layer (Output)\n @param states       Pointer to memory that holds random number generator states (Output)\n @param seed         Seed used to initialize random number generator states (Output)\n @param use_mask     Boolean flag indicating whether to use a saved mask (an existing or\n user-defined dropout layout) in reserveSpace (Output)\n @param state_evo    Boolean flag indicating whether to adopt state evolution strategy to update\n the PRNG states by the end of each implementation (Output placeholder, currently not enabled)\n @param rng_mode     Random number generator used to generate parallel random number sequences\n (Output)\n @return             miopenStatus_t"]
    pub fn miopenGetDropoutDescriptor(
        dropoutDesc: miopenDropoutDescriptor_t,
        handle: miopenHandle_t,
        dropout: *mut f32,
        states: *mut *mut ::std::os::raw::c_void,
        seed: *mut ::std::os::raw::c_ulonglong,
        use_mask: *mut bool,
        state_evo: *mut bool,
        rng_mode: *mut miopenRNGType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Restore the dropout descriptor to a saved state\n\n This function restores the state of dropout descriptor using the address of a state buffer with\n previously saved PRNG state pattern, without launching the expensive PRNG initialization process.\n\n Interface for restoring the dropout descriptor\n @param dropoutDesc       Dropout layer descriptor (input/Output)\n @param handle            MIOpen handle (input)\n @param dropout           The probability by which the input is set to 0 in the dropout layer\n (input)\n @param states            Pointer to memory that holds random number generator states (input)\n @param stateSizeInBytes  Number of bytes holding random generator states (input)\n @param seed              Seed used to initialize random number generator states (input)\n @param use_mask          Boolean flag indicating whether to use a saved mask (an existing or\n user-defined dropout layout) in reserveSpace (input)\n @param state_evo         Boolean flag indicating whether to adopt state evolution strategy to\n update the PRNG states by the end of each implementation (input placeholder, currently not\n enabled)\n @param rng_mode          Random number generator used to generate parallel random number\n sequences (input)\n @return                  miopenStatus_t"]
    pub fn miopenRestoreDropoutDescriptor(
        dropoutDesc: miopenDropoutDescriptor_t,
        handle: miopenHandle_t,
        dropout: f32,
        states: *mut ::std::os::raw::c_void,
        stateSizeInBytes: usize,
        seed: ::std::os::raw::c_ulonglong,
        use_mask: bool,
        state_evo: bool,
        rng_mode: miopenRNGType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Initialize the dropout descriptor\n\n Interface for setting up the dropout descriptor\n @param dropoutDesc       Dropout layer descriptor (input/Output)\n @param handle            MIOpen handle (input)\n @param dropout           The probability by which the input is set to 0 in the dropout layer\n (input)\n @param states            Pointer to memory that holds random number generator states (input)\n @param stateSizeInBytes  Number of bytes provided for random generator states (input)\n @param seed              Seed used to initialize random number generator states (input)\n @param use_mask          Boolean flag indicating whether to use a saved mask (an existing or\n user-defined dropout layout) in reserveSpace (input)\n @param state_evo         Boolean flag indicating whether to adopt state evolution strategy to\n update the PRNG states by the end of each implementation (input placeholder, currently not\n enabled)\n @param rng_mode          Random number generator used to generate parallel random number\n sequences (input)\n @return                  miopenStatus_t"]
    pub fn miopenSetDropoutDescriptor(
        dropoutDesc: miopenDropoutDescriptor_t,
        handle: miopenHandle_t,
        dropout: f32,
        states: *mut ::std::os::raw::c_void,
        stateSizeInBytes: usize,
        seed: ::std::os::raw::c_ulonglong,
        use_mask: bool,
        state_evo: bool,
        rng_mode: miopenRNGType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute forward dropout operation\n\n Interface for executing the forward pass on a Dropout.\n @param handle                   MIOpen handle (input)\n @param dropoutDesc              Dropout layer descriptor (input)\n @param noise_shape              Tensor descriptor for noise shape (input placeholder, currently\n not enabled)\n @param xDesc                    Tensor descriptor for data tensor x (input)\n @param x                        Data tensor x (input)\n @param yDesc                    Tensor descriptor for data tensor y (input)\n @param y                        Data tensor y (Output)\n @param reserveSpace             Pointer to memory allocated for executing forward dropout,\n expecting reserveSpace unchanged before next call of miopenDropoutBackward (Output)\n @param reserveSpaceSizeInBytes  Number of bytes of reservespace required for executing forward\n dropout (input)\n @return                         miopenStatus_t"]
    pub fn miopenDropoutForward(
        handle: miopenHandle_t,
        dropoutDesc: miopenDropoutDescriptor_t,
        noise_shape: miopenTensorDescriptor_t,
        xDesc: miopenTensorDescriptor_t,
        x: *const ::std::os::raw::c_void,
        yDesc: miopenTensorDescriptor_t,
        y: *mut ::std::os::raw::c_void,
        reserveSpace: *mut ::std::os::raw::c_void,
        reserveSpaceSizeInBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Execute backward dropout operation\n\n Interface for executing the backward pass on a Dropout.\n @param handle                   MIOpen handle (input)\n @param dropoutDesc              Dropout layer descriptor (input)\n @param noise_shape              Tensor descriptor for noise shape (input placeholder, currently\n not enabled)\n @param dyDesc                   Tensor descriptor for data delta tensor dy (input)\n @param dy                       Data delta tensor dy (input)\n @param dxDesc                   Tensor descriptor for data delta tensor dx (input)\n @param dx                       Data delta tensor dx (Output)\n @param reserveSpace             Pointer to memory allocated for executing backward dropout,\n expecting reserveSpace unchanged after previous call of miopenDropoutForward (input)\n @param reserveSpaceSizeInBytes  Number of bytes of reservespace required for executing backward\n dropout (input)\n @return                         miopenStatus_t"]
    pub fn miopenDropoutBackward(
        handle: miopenHandle_t,
        dropoutDesc: miopenDropoutDescriptor_t,
        noise_shape: miopenTensorDescriptor_t,
        dyDesc: miopenTensorDescriptor_t,
        dy: *const ::std::os::raw::c_void,
        dxDesc: miopenTensorDescriptor_t,
        dx: *mut ::std::os::raw::c_void,
        reserveSpace: *mut ::std::os::raw::c_void,
        reserveSpaceSizeInBytes: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates the ReduceTensor descriptor object\n\n @param reduceTensorDesc Pointer to a ReduceTensor descriptor type\n @return            miopenStatus_t"]
    pub fn miopenCreateReduceTensorDescriptor(
        reduceTensorDesc: *mut miopenReduceTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroy the ReduceTensor descriptor object\n\n @param reduceTensorDesc  ReduceTensor descriptor type (input)\n @return            miopenStatus_t"]
    pub fn miopenDestroyReduceTensorDescriptor(
        reduceTensorDesc: miopenReduceTensorDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Initialize a ReduceTensor descriptor object\n\n @param reduceTensorDesc         Pointer to the ReduceTensor descriptor object (output)\n @param reduceTensorOp           Enumerant specifying the operation used by ReduceTensor (input)\n @param reduceTensorCompType     Enumerant specifying the data type used with ReduceTensor\n operation (input)\n @param reduceTensorNanOpt       Enumerant specifying the NaN number propagation mode (input)\n @param reduceTensorIndices      Enumerant specifying the indices modes used by ReduceTensor\n (input)\n @param reduceTensorIndicesType  Enumerant specifying the data type of the indices (input)\n @return           miopenStatus_t"]
    pub fn miopenSetReduceTensorDescriptor(
        reduceTensorDesc: miopenReduceTensorDescriptor_t,
        reduceTensorOp: miopenReduceTensorOp_t,
        reduceTensorCompType: miopenDataType_t,
        reduceTensorNanOpt: miopenNanPropagation_t,
        reduceTensorIndices: miopenReduceTensorIndices_t,
        reduceTensorIndicesType: miopenIndicesType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Query a ReduceTensor descriptor object\n\n @param reduceTensorDesc         Pointer to the ReduceTensor descriptor object (input)\n @param reduceTensorOp           Pointer to enumerant specifying the operation used by\n ReduceTensor (output)\n @param reduceTensorCompType     Pointer to enumerant specifying the data type used with\n ReduceTensor operation (output)\n @param reduceTensorNanOpt       Pointer to enumerant specifying the NaN number propagation mode\n (output)\n @param reduceTensorIndices      Pointer to enumerant specifying the indices modes used by\n ReduceTensor (output)\n @param reduceTensorIndicesType  Pointer to enumerant specifying the data type of the indices\n (output)\n @return           miopenStatus_t"]
    pub fn miopenGetReduceTensorDescriptor(
        reduceTensorDesc: miopenReduceTensorDescriptor_t,
        reduceTensorOp: *mut miopenReduceTensorOp_t,
        reduceTensorCompType: *mut miopenDataType_t,
        reduceTensorNanOpt: *mut miopenNanPropagation_t,
        reduceTensorIndices: *mut miopenReduceTensorIndices_t,
        reduceTensorIndicesType: *mut miopenIndicesType_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Helper function to query the minimum index space size required by the ReduceTensor call\n\n @param handle                   MIOpen Handle (input)\n @param reduceTensorDesc         Pointer to the ReduceTensor descriptor object (input)\n @param aDesc                    Pointer to the input tensor descriptor (input)\n @param cDesc                    Pointer to the output tensor descriptor (input)\n @param sizeInBytes              Pointer to data to return the minimum index space size\n @return           miopenStatus_t"]
    pub fn miopenGetReductionIndicesSize(
        handle: miopenHandle_t,
        reduceTensorDesc: miopenReduceTensorDescriptor_t,
        aDesc: miopenTensorDescriptor_t,
        cDesc: miopenTensorDescriptor_t,
        sizeInBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Helper function to query the minimum workspace size required by the ReduceTensor call\n\n @param handle                   MIOpen Handle (input)\n @param reduceTensorDesc         Pointer to the ReduceTensor descriptor object (input)\n @param aDesc                    Pointer to the input tensor descriptor (input)\n @param cDesc                    Pointer to the output tensor descriptor (input)\n @param sizeInBytes              Pointer to data to return the minimum workspace size\n @return           miopenStatus_t"]
    pub fn miopenGetReductionWorkspaceSize(
        handle: miopenHandle_t,
        reduceTensorDesc: miopenReduceTensorDescriptor_t,
        aDesc: miopenTensorDescriptor_t,
        cDesc: miopenTensorDescriptor_t,
        sizeInBytes: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief TensorReduce function doing reduction on tensor A by implementing C = alpha * reduceOp(A)\n + beta * C\n\n The length of each dimension of output tensor C must match the length of the corresponding\n dimension of\n input tensor A or must be equal to 1. The dimensions with length equal to 1 indicate the\n dimensions\n of A to be reduced.\n\n @param handle                   MIOpen Handle (input)\n @param reduceTensorDesc         Pointer to the ReduceTensor descriptor object (input)\n @param indices                  Address of the allocated indices data space (output)\n @param indicesSizeInBytes       Size in bytes of the allocated indices data space (input)\n @param workspace                Address of the allocated workspace data (input)\n @param workspaceSizeInBytes     Size in bytes of the allocated workspace data (input)\n @param alpha                    Pointer to scale factor for data in input tensor A (input)\n @param aDesc                    Pointer to the tensor descriptor for input tensor A (input)\n @param A                        Pointer to the data of input tensor A (input)\n @param beta                     Pointer to scale factor for data in output tensor C (input)\n @param cDesc                    Pointer to the tensor descriptor for output tensor C (input)\n @param C                        Pointer to the data of output tensor C (output)\n @return           miopenStatus_t"]
    pub fn miopenReduceTensor(
        handle: miopenHandle_t,
        reduceTensorDesc: miopenReduceTensorDescriptor_t,
        indices: *mut ::std::os::raw::c_void,
        indicesSizeInBytes: usize,
        workspace: *mut ::std::os::raw::c_void,
        workspaceSizeInBytes: usize,
        alpha: *const ::std::os::raw::c_void,
        aDesc: miopenTensorDescriptor_t,
        A: *const ::std::os::raw::c_void,
        beta: *const ::std::os::raw::c_void,
        cDesc: miopenTensorDescriptor_t,
        C: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
#[doc = " @brief Describes a problem for different miopen operations.\n\n For now, this is only used for convolution, but could be used for other\n operators in the future(such as GEMM, Pooling, etc)"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenProblem {
    pub _address: u8,
}
#[doc = " @brief Describes a problem for different miopen operations.\n\n For now, this is only used for convolution, but could be used for other\n operators in the future(such as GEMM, Pooling, etc)"]
pub type miopenProblem_t = *mut miopenProblem;
pub const miopenProblemDirection_t_miopenProblemDirectionForward: miopenProblemDirection_t = 0;
pub const miopenProblemDirection_t_miopenProblemDirectionBackward: miopenProblemDirection_t = 1;
pub const miopenProblemDirection_t_miopenProblemDirectionBackwardWeights: miopenProblemDirection_t =
    2;
#[doc = " @enum miopenProblemDirection_t\n Directions of miopen operation."]
pub type miopenProblemDirection_t = ::std::os::raw::c_uint;
pub const miopenTensorArgumentId_t_miopenTensorArgumentIdInvalid: miopenTensorArgumentId_t = 0;
pub const miopenTensorArgumentId_t_miopenTensorConvolutionX: miopenTensorArgumentId_t = 1;
pub const miopenTensorArgumentId_t_miopenTensorConvolutionW: miopenTensorArgumentId_t = 2;
pub const miopenTensorArgumentId_t_miopenTensorConvolutionY: miopenTensorArgumentId_t = 3;
pub const miopenTensorArgumentId_t_miopenTensorMhaK: miopenTensorArgumentId_t = 4;
pub const miopenTensorArgumentId_t_miopenTensorMhaQ: miopenTensorArgumentId_t = 5;
pub const miopenTensorArgumentId_t_miopenTensorMhaV: miopenTensorArgumentId_t = 6;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleK: miopenTensorArgumentId_t = 7;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleQ: miopenTensorArgumentId_t = 8;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleV: miopenTensorArgumentId_t = 9;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleS: miopenTensorArgumentId_t = 10;
pub const miopenTensorArgumentId_t_miopenTensorMhaScaleS: miopenTensorArgumentId_t = 11;
pub const miopenTensorArgumentId_t_miopenTensorMhaScaleO: miopenTensorArgumentId_t = 12;
pub const miopenTensorArgumentId_t_miopenTensorMhaDropoutProbability: miopenTensorArgumentId_t = 13;
pub const miopenTensorArgumentId_t_miopenTensorMhaDropoutSeed: miopenTensorArgumentId_t = 14;
pub const miopenTensorArgumentId_t_miopenTensorMhaDropoutOffset: miopenTensorArgumentId_t = 15;
pub const miopenTensorArgumentId_t_miopenTensorMhaO: miopenTensorArgumentId_t = 16;
pub const miopenTensorArgumentId_t_miopenTensorMhaAmaxO: miopenTensorArgumentId_t = 17;
pub const miopenTensorArgumentId_t_miopenTensorMhaAmaxS: miopenTensorArgumentId_t = 18;
pub const miopenTensorArgumentId_t_miopenTensorMhaM: miopenTensorArgumentId_t = 19;
pub const miopenTensorArgumentId_t_miopenTensorMhaZInv: miopenTensorArgumentId_t = 20;
pub const miopenTensorArgumentId_t_miopenTensorMhaDO: miopenTensorArgumentId_t = 21;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleO: miopenTensorArgumentId_t = 22;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleDO: miopenTensorArgumentId_t = 23;
pub const miopenTensorArgumentId_t_miopenTensorMhaDescaleDS: miopenTensorArgumentId_t = 24;
pub const miopenTensorArgumentId_t_miopenTensorMhaScaleDS: miopenTensorArgumentId_t = 25;
pub const miopenTensorArgumentId_t_miopenTensorMhaScaleDQ: miopenTensorArgumentId_t = 26;
pub const miopenTensorArgumentId_t_miopenTensorMhaScaleDK: miopenTensorArgumentId_t = 27;
pub const miopenTensorArgumentId_t_miopenTensorMhaScaleDV: miopenTensorArgumentId_t = 28;
pub const miopenTensorArgumentId_t_miopenTensorMhaDQ: miopenTensorArgumentId_t = 29;
pub const miopenTensorArgumentId_t_miopenTensorMhaDK: miopenTensorArgumentId_t = 30;
pub const miopenTensorArgumentId_t_miopenTensorMhaDV: miopenTensorArgumentId_t = 31;
pub const miopenTensorArgumentId_t_miopenTensorMhaAmaxDQ: miopenTensorArgumentId_t = 32;
pub const miopenTensorArgumentId_t_miopenTensorMhaAmaxDK: miopenTensorArgumentId_t = 33;
pub const miopenTensorArgumentId_t_miopenTensorMhaAmaxDV: miopenTensorArgumentId_t = 34;
pub const miopenTensorArgumentId_t_miopenTensorMhaAmaxDS: miopenTensorArgumentId_t = 35;
pub const miopenTensorArgumentId_t_miopenTensorMhaBias: miopenTensorArgumentId_t = 36;
pub const miopenTensorArgumentId_t_miopenTensorArgumentIsScalar: miopenTensorArgumentId_t =
    2147483648;
pub const miopenTensorArgumentId_t_miopenTensorMhaMask: miopenTensorArgumentId_t = 2147483649;
#[doc = " @enum miopenTensorArgumentId_t\n Identifiers for tensor arguments of problems and operations."]
pub type miopenTensorArgumentId_t = ::std::os::raw::c_uint;
pub const miopenFindResultsOrder_t_miopenFindResultsOrderByTime: miopenFindResultsOrder_t = 0;
pub const miopenFindResultsOrder_t_miopenFindResultsOrderByWorkspaceSize: miopenFindResultsOrder_t =
    1;
#[doc = " @enum miopenTensorArgumentId_t\n Different ways to sort results of the find call."]
pub type miopenFindResultsOrder_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @brief Initializes a problem object describing a convolution operation.\n\n @param problem      Pointer to the problem to initialize\n @param operatorDesc Descriptor of the operator to be used\n @param direction    Direction of the operation\n @return             miopenStatus_t"]
    pub fn miopenCreateConvProblem(
        problem: *mut miopenProblem_t,
        operatorDesc: miopenConvolutionDescriptor_t,
        direction: miopenProblemDirection_t,
    ) -> miopenStatus_t;
}
pub const miopenMhaMask_t_miopenMhaMaskNone: miopenMhaMask_t = 0;
pub const miopenMhaMask_t_miopenMhaMaskCausal: miopenMhaMask_t = 1;
#[doc = " @enum miopenMhaMask_t\n Different masks for Mha."]
pub type miopenMhaMask_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn miopenCreateMhaProblem(
        problem: *mut miopenProblem_t,
        operatorDesc: miopenMhaDescriptor_t,
        direction: miopenProblemDirection_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates the mha descriptor object\n\n @param mhaDesc     Pointer to a mha descriptor type\n @return            miopenStatus_t"]
    pub fn miopenCreateMhaDescriptor(mhaDesc: *mut miopenMhaDescriptor_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the Mha descriptor details\n\n Sets all of the descriptor details for the Mha\n\n @param mhaDesc               Pointer to a Mha descriptor\n @param scale                 Scale\n @return                      miopenStatus_t"]
    pub fn miopenSetMhaDescriptor(mhaDesc: miopenMhaDescriptor_t, scale: f32) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the Mha descriptor details\n\n Retrieves all of the descriptor details for the Mha.\n\n @param mhaDesc       Pointer to a Mha descriptor\n @param scale         Scale (output)\n @return              miopenStatus_t"]
    pub fn miopenGetMhaDescriptor(
        mhaDesc: miopenMhaDescriptor_t,
        scale: *mut f32,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Creates the Softmax descriptor object\n\n @param softmaxDesc Pointer to an softmax descriptor type\n @return            miopenStatus_t"]
    pub fn miopenCreateSoftmaxDescriptor(
        softmaxDesc: *mut miopenSoftmaxDescriptor_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the softmax descriptor details\n\n Sets all of the descriptor details for the softmax layer\n\n @param softmaxDesc  Pointer to a softmax layer descriptor\n @param alpha        Softmax alpha parameter\n @param beta         Softmax beta parameter\n @param algorithm    Softmax algorithm\n @param mode         Softmax mode\n @return             miopenStatus_t"]
    pub fn miopenSetSoftmaxDescriptor(
        softmaxDesc: miopenSoftmaxDescriptor_t,
        alpha: f32,
        beta: f32,
        algorithm: miopenSoftmaxAlgorithm_t,
        mode: miopenSoftmaxMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the softmax layer descriptor details\n\n Retrieves all of the descriptor details for the softmax layer.\n\n @param softmaxDesc   Pointer to a softmax layer descriptor (input)\n @param alpha         Softmax alpha parameter (output)\n @param beta          Softmax beta parameter (output)\n @param algorithm     Softmax algorithm (output)\n @param mode          Softmax mode (output)\n @return              miopenStatus_t"]
    pub fn miopenGetSoftmaxDescriptor(
        softmaxDesc: miopenSoftmaxDescriptor_t,
        alpha: *mut f32,
        beta: *mut f32,
        algorithm: *mut miopenSoftmaxAlgorithm_t,
        mode: *mut miopenSoftmaxMode_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys a problem object.\n\n @param problem Problem to destroy\n @return        miopenStatus_t"]
    pub fn miopenDestroyProblem(problem: miopenProblem_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets a tensor descriptor for the specified argument.\n\n @param problem    Problem to update\n @param id         Id of the argument for the descriptor\n @param descriptor Tensor descriptor to set\n @return           miopenStatus_t"]
    pub fn miopenSetProblemTensorDescriptor(
        problem: miopenProblem_t,
        id: miopenTensorArgumentId_t,
        descriptor: miopenTensorDescriptor_t,
    ) -> miopenStatus_t;
}
#[doc = " @brief The miopenFindOptions allows the user to configure how find will be used."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenFindOptions {
    pub _address: u8,
}
#[doc = " @brief The miopenFindOptions allows the user to configure how find will be used."]
pub type miopenFindOptions_t = *mut miopenFindOptions;
unsafe extern "C" {
    #[doc = " @brief Initializes miopenFindOptions object.\n\n @param options    Pointer to options object to initialze\n @return           miopenStatus_t"]
    pub fn miopenCreateFindOptions(options: *mut miopenFindOptions_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys miopenFindOptions object.\n\n @param options    Options object to destroy\n @return           miopenStatus_t"]
    pub fn miopenDestroyFindOptions(options: miopenFindOptions_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the tuning find option. Default value is zero.\n\n @param options    Options object to update\n @param value      Value of zero means no tuning, value of one means tuning enabled\n @return           miopenStatus_t"]
    pub fn miopenSetFindOptionTuning(
        options: miopenFindOptions_t,
        value: ::std::os::raw::c_int,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the results order find option. Default value is miopenFindResultsOrderByTime.\n\n @param options    Options object to update\n @param value      Specifies what order should find results have\n @return           miopenStatus_t"]
    pub fn miopenSetFindOptionResultsOrder(
        options: miopenFindOptions_t,
        value: miopenFindResultsOrder_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Sets the workspace limit find option. Default value is maximum of size_t\n\n @param options    Options object to update\n @param value      Specifies the workspace limit for find call. All solvers exceeding the limit\n would be ignored.\n @return           miopenStatus_t"]
    pub fn miopenSetFindOptionWorkspaceLimit(
        options: miopenFindOptions_t,
        value: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Attaches the preallocated workspace to find options. Allocated by the library by default.\n\n @param options    Options object to update\n @param buffer     Specifies the workspace for find call\n @param size       Specifies the size of the buffer passed\n @return           miopenStatus_t"]
    pub fn miopenSetFindOptionPreallocatedWorkspace(
        options: miopenFindOptions_t,
        buffer: *mut ::std::os::raw::c_void,
        size: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Attaches a preallocated tensor to find options. If not used, buffers are allocated by\n MIOpen internally, which is not recommended.\n\n @param options    Options object to update\n @param id         Specifies the id of the tensor passed\n @param buffer     Specifies the tensor for find call\n @return           miopenStatus_t"]
    pub fn miopenSetFindOptionPreallocatedTensor(
        options: miopenFindOptions_t,
        id: miopenTensorArgumentId_t,
        buffer: *mut ::std::os::raw::c_void,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Forces library to attach kernel binaries to solutions for later saving. This allows zero\n lookup miopenRunSolution calls after miopenLoadSolution. Default value is 0.\n\n @param options    Options object to update\n @param attach     1 means attaching, 0 - skipping, any other value - reserved for future use\n @return           miopenStatus_t"]
    pub fn miopenSetFindOptionAttachBinaries(
        options: miopenFindOptions_t,
        attach: ::std::os::raw::c_uint,
    ) -> miopenStatus_t;
}
#[doc = " @brief The miopenSolution object describes a prepared solution."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenSolution {
    pub _address: u8,
}
#[doc = " @brief The miopenSolution object describes a prepared solution."]
pub type miopenSolution_t = *mut miopenSolution;
unsafe extern "C" {
    #[doc = " @brief Finds solutions to a problem by running different applicable solutions. Memory is\n automatically allocated.\n\n @param handle       Handle to execute the kernels\n @param problem      Problem to solve\n @param options      Find options. When null default values would be used\n @param solutions    Pointer to the first result. Must not be null\n @param numSolutions Pointer to the amount of results. Ignored if null\n @param maxSolutions Limits the amount of results\n @return             miopenStatus_t"]
    pub fn miopenFindSolutions(
        handle: miopenHandle_t,
        problem: miopenProblem_t,
        options: miopenFindOptions_t,
        solutions: *mut miopenSolution_t,
        numSolutions: *mut usize,
        maxSolutions: usize,
    ) -> miopenStatus_t;
}
#[doc = " @brief Values of a tensor or scalar argument for the miopenRunSolution function."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct miopenTensorArgument_t {
    pub id: miopenTensorArgumentId_t,
    pub descriptor: *mut miopenTensorDescriptor_t,
    pub buffer: *mut ::std::os::raw::c_void,
}
unsafe extern "C" {
    #[doc = " @brief Runs the solution using the passed in buffers.\n\n @param handle        Handle to execute the kernels\n @param solution      Solution to execute\n @param nInputs       Amount to inputs for the solution\n @param tensors       Tensor arguments described by miopenTensorArgument_t\n @param workspace     Pointer to device buffer used as workspace. May be null when not required.\n Should not be less than expected\n @param workspaceSize Size of the workspace buffer\n @return              miopenStatus_t"]
    pub fn miopenRunSolution(
        handle: miopenHandle_t,
        solution: miopenSolution_t,
        nInputs: usize,
        tensors: *const miopenTensorArgument_t,
        workspace: *mut ::std::os::raw::c_void,
        workspaceSize: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Destroys solution object.\n\n @param solution   Solution to destroy\n @return           miopenStatus_t"]
    pub fn miopenDestroySolution(solution: miopenSolution_t) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Loads solution object from binary data.\n\n @param solution   Pointer to the solution to load\n @param data       Data to load the solution from\n @param size       Size of the solution blob\n @return           miopenStatus_t"]
    pub fn miopenLoadSolution(
        solution: *mut miopenSolution_t,
        data: *const ::std::os::raw::c_char,
        size: usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Saves a solution object as binary data.\n\n @param solution   Solution to save\n @param data       Pointer to a buffer to save solution to\n @return           miopenStatus_t"]
    pub fn miopenSaveSolution(
        solution: miopenSolution_t,
        data: *mut ::std::os::raw::c_char,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Reads the expected size of a solution.\n\n @param solution   Solution to get size\n @param size       Pointer to a location where to write the size of the solution blob\n @return           miopenStatus_t"]
    pub fn miopenGetSolutionSize(solution: miopenSolution_t, size: *mut usize) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Reads the amount of workspace required to execute the solution.\n\n @param solution      Solution to get required workspace size\n @param workspaceSize Pointer to a location where to write the workspace size\n @return              miopenStatus_t"]
    pub fn miopenGetSolutionWorkspaceSize(
        solution: miopenSolution_t,
        workspaceSize: *mut usize,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Reads the time spent to execute the solution the last it was run.\n\n @param solution Solution to get execution time\n @param time     Pointer to a location where to write the execution time\n @return         miopenStatus_t"]
    pub fn miopenGetSolutionTime(solution: miopenSolution_t, time: *mut f32) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Reads id of the solver referred by the solution.\n\n @param solution Solution to get solver id from\n @param solverId Pointer to a location where to write the solver id\n @return         miopenStatus_t"]
    pub fn miopenGetSolutionSolverId(
        solution: miopenSolution_t,
        solverId: *mut u64,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @brief Gets the convolution algorithm implemented by a solver.\n\n @param solverId Solver id to get convolution algorithm of\n @param result   Pointer to a location where to write the algorithm\n @return         miopenStatus_t"]
    pub fn miopenGetSolverIdConvAlgorithm(
        solverId: u64,
        result: *mut miopenConvAlgorithm_t,
    ) -> miopenStatus_t;
}
pub const miopenAlphaBetaCase_t_DEFAULT: miopenAlphaBetaCase_t = 0;
pub const miopenAlphaBetaCase_t_SCALE: miopenAlphaBetaCase_t = 1;
pub const miopenAlphaBetaCase_t_BILINEAR: miopenAlphaBetaCase_t = 2;
pub const miopenAlphaBetaCase_t_ERROR_STATE: miopenAlphaBetaCase_t = 3;
#[doc = " @brief Enum for specifying the alpha-beta case for convolution operations.\n\n Describes how alpha and beta scaling factors are applied in convolution operations."]
pub type miopenAlphaBetaCase_t = ::std::os::raw::c_uint;
#[doc = "< do not enforce anything"]
pub const miopenTuningPolicy_t_miopenTuningPolicyNone: miopenTuningPolicy_t = 1;
#[doc = "< tune and update the db"]
pub const miopenTuningPolicy_t_miopenTuningPolicyDbUpdate: miopenTuningPolicy_t = 2;
pub const miopenTuningPolicy_t_miopenTuningPolicySearch: miopenTuningPolicy_t = 3;
#[doc = "< combination of Search and DbUpdate"]
pub const miopenTuningPolicy_t_miopenTuningPolicySearchDbUpdate: miopenTuningPolicy_t = 4;
#[doc = "< remove existing entry, do not tune"]
pub const miopenTuningPolicy_t_miopenTuningPolicyDbClean: miopenTuningPolicy_t = 5;
#[doc = " @ingroup handle\n @enum miopenTuningPolicy_t\n Tuning policy for MIOpen Find-related calls.\n Supports the following policies of MIOPEN_FIND_ENFORCE:\n 1. None: Do not enforce anything.\n 2. DbUpdate: Do not skip auto-tune even if PerfDb already contains optimized values.\n 3. Search: Search the database first; if no record is found, tune and update the database.\n 4. SearchDbUpdate: Combination of Search and DbUpdate.\n 5. DbClean: Remove existing entry, do not tune.\n Note: TuningPolicy has higher priority over MIOPEN_FIND_ENFORCE."]
pub type miopenTuningPolicy_t = ::std::os::raw::c_uint;
unsafe extern "C" {
    #[doc = " @ingroup handle\n @brief Update tuning policy for a specific handle. API alternative for MIOPEN_FIND_ENFORCE\n environment variable.\n\n @param [in] handle              MIOpen Handle to update\n @param [in] newValue            New tuning policy value. Default value is miopenTuningPolicyNone\n @return                         miopenStatus_t"]
    pub fn miopenSetTuningPolicy(
        handle: miopenHandle_t,
        newValue: miopenTuningPolicy_t,
    ) -> miopenStatus_t;
}
unsafe extern "C" {
    #[doc = " @ingroup handle\n @brief Get tuning policy from a handle.\n\n @param [in] handle              MIOpen Handle to fetch value from\n @param [in] value               Would be set to the current tuning policy value. Must not be null\n @return                         miopenStatus_t"]
    pub fn miopenGetTuningPolicy(
        handle: miopenHandle_t,
        value: *mut miopenTuningPolicy_t,
    ) -> miopenStatus_t;
}