@@ -55,7 +55,9 @@ extern "C" {
55
55
#endif
56
56
57
57
/*! \brief manually define unsigned int */
58
- typedef unsigned int mx_uint ;
58
+ typedef uint32_t mx_uint ;
59
+ /*! \brief manually define 64-bit int */
60
+ typedef int64_t mx_int64 ;
59
61
/*! \brief manually define float */
60
62
typedef float mx_float ;
61
63
/*! \brief data type to store dim size */
@@ -572,6 +574,13 @@ MXNET_DLL int MXNDArrayCreateEx(const mx_uint *shape,
572
574
int dtype ,
573
575
NDArrayHandle * out );
574
576
577
+ MXNET_DLL int MXNDArrayCreateEx64 (const mx_int64 * shape ,
578
+ int ndim ,
579
+ int dev_type ,
580
+ int dev_id ,
581
+ int delay_alloc ,
582
+ int dtype ,
583
+ NDArrayHandle * out );
575
584
576
585
/*!
577
586
* \brief create an empty sparse NDArray with specified shape and data type
@@ -603,6 +612,19 @@ MXNET_DLL int MXNDArrayCreateSparseEx(int storage_type,
603
612
const mx_uint * aux_shape ,
604
613
NDArrayHandle * out );
605
614
615
+ MXNET_DLL int MXNDArrayCreateSparseEx64 (int storage_type ,
616
+ const mx_int64 * shape ,
617
+ int ndim ,
618
+ int dev_type ,
619
+ int dev_id ,
620
+ int delay_alloc ,
621
+ int dtype ,
622
+ mx_uint num_aux ,
623
+ int * aux_type ,
624
+ int * aux_ndims ,
625
+ const mx_int64 * aux_shape ,
626
+ NDArrayHandle * out );
627
+
606
628
/*!
607
629
* \brief create a NDArray handle that is loaded from raw bytes.
608
630
* \param buf the head of the raw bytes
@@ -650,6 +672,12 @@ MXNET_DLL int MXNDArrayLoad(const char* fname,
650
672
mx_uint * out_name_size ,
651
673
const char * * * out_names );
652
674
675
+ MXNET_DLL int MXNDArrayLoad64 (const char * fname ,
676
+ mx_int64 * out_size ,
677
+ NDArrayHandle * * out_arr ,
678
+ mx_int64 * out_name_size ,
679
+ const char * * * out_names );
680
+
653
681
/*!
654
682
* \brief Load list / dictionary of narrays from file content loaded into memory.
655
683
* This will load a list of ndarrays in a similar
@@ -665,11 +693,18 @@ MXNET_DLL int MXNDArrayLoad(const char* fname,
665
693
* \return 0 when success, -1 when failure happens
666
694
*/
667
695
MXNET_DLL int MXNDArrayLoadFromBuffer (const void * ndarray_buffer ,
668
- size_t size ,
669
- mx_uint * out_size ,
670
- NDArrayHandle * * out_arr ,
671
- mx_uint * out_name_size ,
672
- const char * * * out_names );
696
+ size_t size ,
697
+ mx_uint * out_size ,
698
+ NDArrayHandle * * out_arr ,
699
+ mx_uint * out_name_size ,
700
+ const char * * * out_names );
701
+
702
+ MXNET_DLL int MXNDArrayLoadFromBuffer64 (const void * ndarray_buffer ,
703
+ size_t size ,
704
+ mx_int64 * out_size ,
705
+ NDArrayHandle * * out_arr ,
706
+ mx_int64 * out_name_size ,
707
+ const char * * * out_names );
673
708
674
709
/*!
675
710
* \brief Perform a synchronize copy from a continugous CPU memory region.
@@ -809,6 +844,11 @@ MXNET_DLL int MXNDArrayReshape64(NDArrayHandle handle,
809
844
MXNET_DLL int MXNDArrayGetShape (NDArrayHandle handle ,
810
845
mx_uint * out_dim ,
811
846
const mx_uint * * out_pdata );
847
+
848
+ MXNET_DLL int MXNDArrayGetShape64 (NDArrayHandle handle ,
849
+ int * out_dim ,
850
+ const int64_t * * out_pdata );
851
+
812
852
/*!
813
853
* \brief get the shape of the array
814
854
* \param handle the handle to the narray
@@ -819,6 +859,11 @@ MXNET_DLL int MXNDArrayGetShape(NDArrayHandle handle,
819
859
MXNET_DLL int MXNDArrayGetShapeEx (NDArrayHandle handle ,
820
860
int * out_dim ,
821
861
const int * * out_pdata );
862
+
863
+ MXNET_DLL int MXNDArrayGetShapeEx64 (NDArrayHandle handle ,
864
+ int * out_dim ,
865
+ const mx_int64 * * out_pdata );
866
+
822
867
/*!
823
868
* \brief get the content of the data in NDArray
824
869
* \param handle the handle to the ndarray
@@ -902,6 +947,10 @@ MXNET_DLL int MXNDArrayGetAuxType(NDArrayHandle handle,
902
947
mx_uint i ,
903
948
int * out_type );
904
949
950
+ MXNET_DLL int MXNDArrayGetAuxType64 (NDArrayHandle handle ,
951
+ mx_int64 i ,
952
+ int * out_type );
953
+
905
954
/*!
906
955
* \brief Get a deep copy of the ith aux data blob
907
956
* in the form of an NDArray of default storage type.
@@ -911,6 +960,10 @@ MXNET_DLL int MXNDArrayGetAuxNDArray(NDArrayHandle handle,
911
960
mx_uint i ,
912
961
NDArrayHandle * out );
913
962
963
+ MXNET_DLL int MXNDArrayGetAuxNDArray64 (NDArrayHandle handle ,
964
+ mx_int64 i ,
965
+ NDArrayHandle * out );
966
+
914
967
/*!
915
968
* \brief Get a deep copy of the data blob
916
969
* in the form of an NDArray of default storage type.
@@ -966,6 +1019,10 @@ MXNET_DLL int MXNDArrayGetGradState(NDArrayHandle handle, int *out);
966
1019
*/
967
1020
MXNET_DLL int MXListFunctions (mx_uint * out_size ,
968
1021
FunctionHandle * * out_array );
1022
+
1023
+ MXNET_DLL int MXListFunctions64 (mx_int64 * out_size ,
1024
+ FunctionHandle * * out_array );
1025
+
969
1026
/*!
970
1027
* \brief get the function handle by name
971
1028
* \param name the name of the function
@@ -1233,6 +1290,10 @@ MXNET_DLL int MXInvokeCachedOpEx(CachedOpHandle handle,
1233
1290
*/
1234
1291
MXNET_DLL int MXListAllOpNames (mx_uint * out_size ,
1235
1292
const char * * * out_array );
1293
+
1294
+ MXNET_DLL int MXListAllOpNames64 (mx_int64 * out_size ,
1295
+ const char * * * out_array );
1296
+
1236
1297
/*!
1237
1298
* \brief list all the available AtomicSymbolEntry
1238
1299
* \param out_size the size of returned array
@@ -1242,6 +1303,9 @@ MXNET_DLL int MXListAllOpNames(mx_uint *out_size,
1242
1303
MXNET_DLL int MXSymbolListAtomicSymbolCreators (mx_uint * out_size ,
1243
1304
AtomicSymbolCreator * * out_array );
1244
1305
1306
+ MXNET_DLL int MXSymbolListAtomicSymbolCreators64 (mx_int64 * out_size ,
1307
+ AtomicSymbolCreator * * out_array );
1308
+
1245
1309
/*!
1246
1310
* \brief Get the name of an atomic symbol.
1247
1311
* \param creator the AtomicSymbolCreator.
@@ -1454,6 +1518,11 @@ MXNET_DLL int MXSymbolListAttrShallow(SymbolHandle symbol,
1454
1518
MXNET_DLL int MXSymbolListArguments (SymbolHandle symbol ,
1455
1519
mx_uint * out_size ,
1456
1520
const char * * * out_str_array );
1521
+
1522
+ MXNET_DLL int MXSymbolListArguments64 (SymbolHandle symbol ,
1523
+ size_t * out_size ,
1524
+ const char * * * out_str_array );
1525
+
1457
1526
/*!
1458
1527
* \brief List returns in the symbol.
1459
1528
* \param symbol the symbol
@@ -1465,14 +1534,18 @@ MXNET_DLL int MXSymbolListOutputs(SymbolHandle symbol,
1465
1534
mx_uint * out_size ,
1466
1535
const char * * * out_str_array );
1467
1536
1537
+ MXNET_DLL int MXSymbolListOutputs64 (SymbolHandle symbol ,
1538
+ size_t * out_size ,
1539
+ const char * * * out_str_array );
1540
+
1468
1541
/*!
1469
1542
* \brief Get number of outputs of the symbol.
1470
1543
* \param symbol The symbol
1471
1544
* \param out_size number of outputs
1472
1545
* \return 0 when success, -1 when failure happens
1473
1546
*/
1474
1547
MXNET_DLL int MXSymbolGetNumOutputs (SymbolHandle symbol ,
1475
- mx_uint * output_count );
1548
+ mx_uint * output_count );
1476
1549
1477
1550
/*!
1478
1551
* \brief Get a symbol that contains all the internals.
@@ -1511,6 +1584,11 @@ MXNET_DLL int MXSymbolGetOutput(SymbolHandle symbol,
1511
1584
MXNET_DLL int MXSymbolListAuxiliaryStates (SymbolHandle symbol ,
1512
1585
mx_uint * out_size ,
1513
1586
const char * * * out_str_array );
1587
+
1588
+ MXNET_DLL int MXSymbolListAuxiliaryStates64 (SymbolHandle symbol ,
1589
+ size_t * out_size ,
1590
+ const char * * * out_str_array );
1591
+
1514
1592
/*!
1515
1593
* \brief Compose the symbol on other symbols.
1516
1594
*
@@ -1582,6 +1660,22 @@ MXNET_DLL int MXSymbolInferShape(SymbolHandle sym,
1582
1660
const mx_uint * * * aux_shape_data ,
1583
1661
int * complete );
1584
1662
1663
+ MXNET_DLL int MXSymbolInferShape64 (SymbolHandle sym ,
1664
+ mx_uint num_args ,
1665
+ const char * * keys ,
1666
+ const mx_int64 * arg_ind_ptr ,
1667
+ const mx_int64 * arg_shape_data ,
1668
+ size_t * in_shape_size ,
1669
+ const int * * in_shape_ndim ,
1670
+ const mx_int64 * * * in_shape_data ,
1671
+ size_t * out_shape_size ,
1672
+ const int * * out_shape_ndim ,
1673
+ const mx_int64 * * * out_shape_data ,
1674
+ size_t * aux_shape_size ,
1675
+ const int * * aux_shape_ndim ,
1676
+ const mx_int64 * * * aux_shape_data ,
1677
+ int * complete );
1678
+
1585
1679
/*!
1586
1680
* \brief infer shape of unknown input shapes given the known one.
1587
1681
* The shapes are packed into a CSR matrix represented by arg_ind_ptr and arg_shape_data
@@ -1619,6 +1713,23 @@ MXNET_DLL int MXSymbolInferShapeEx(SymbolHandle sym,
1619
1713
const int * * aux_shape_ndim ,
1620
1714
const int * * * aux_shape_data ,
1621
1715
int * complete );
1716
+
1717
+ MXNET_DLL int MXSymbolInferShapeEx64 (SymbolHandle sym ,
1718
+ mx_uint num_args ,
1719
+ const char * * keys ,
1720
+ const mx_int64 * arg_ind_ptr ,
1721
+ const mx_int64 * arg_shape_data ,
1722
+ size_t * in_shape_size ,
1723
+ const int * * in_shape_ndim ,
1724
+ const mx_int64 * * * in_shape_data ,
1725
+ size_t * out_shape_size ,
1726
+ const int * * out_shape_ndim ,
1727
+ const mx_int64 * * * out_shape_data ,
1728
+ size_t * aux_shape_size ,
1729
+ const int * * aux_shape_ndim ,
1730
+ const mx_int64 * * * aux_shape_data ,
1731
+ int * complete );
1732
+
1622
1733
/*!
1623
1734
* \brief DEPRECATED. Use MXSymbolInferShapePartialEx instead.
1624
1735
* partially infer shape of unknown input shapes given the known one.
@@ -1660,6 +1771,21 @@ MXNET_DLL int MXSymbolInferShapePartial(SymbolHandle sym,
1660
1771
const mx_uint * * * aux_shape_data ,
1661
1772
int * complete );
1662
1773
1774
+ MXNET_DLL int MXSymbolInferShapePartial64 (SymbolHandle sym ,
1775
+ mx_uint num_args ,
1776
+ const char * * keys ,
1777
+ const mx_int64 * arg_ind_ptr ,
1778
+ const mx_int64 * arg_shape_data ,
1779
+ size_t * in_shape_size ,
1780
+ const int * * in_shape_ndim ,
1781
+ const mx_int64 * * * in_shape_data ,
1782
+ size_t * out_shape_size ,
1783
+ const int * * out_shape_ndim ,
1784
+ const mx_int64 * * * out_shape_data ,
1785
+ size_t * aux_shape_size ,
1786
+ const int * * aux_shape_ndim ,
1787
+ const mx_int64 * * * aux_shape_data ,
1788
+ int * complete );
1663
1789
1664
1790
/*!
1665
1791
* \brief partially infer shape of unknown input shapes given the known one.
@@ -1701,6 +1827,22 @@ MXNET_DLL int MXSymbolInferShapePartialEx(SymbolHandle sym,
1701
1827
const int * * * aux_shape_data ,
1702
1828
int * complete );
1703
1829
1830
+ MXNET_DLL int MXSymbolInferShapePartialEx64 (SymbolHandle sym ,
1831
+ mx_uint num_args ,
1832
+ const char * * keys ,
1833
+ const mx_int64 * arg_ind_ptr ,
1834
+ const mx_int64 * arg_shape_data ,
1835
+ size_t * in_shape_size ,
1836
+ const int * * in_shape_ndim ,
1837
+ const mx_int64 * * * in_shape_data ,
1838
+ size_t * out_shape_size ,
1839
+ const int * * out_shape_ndim ,
1840
+ const mx_int64 * * * out_shape_data ,
1841
+ size_t * aux_shape_size ,
1842
+ const int * * aux_shape_ndim ,
1843
+ const mx_int64 * * * aux_shape_data ,
1844
+ int * complete );
1845
+
1704
1846
/*!
1705
1847
* \brief infer type of unknown input types given the known one.
1706
1848
* The types are packed into a CSR matrix represented by arg_ind_ptr and arg_type_data
0 commit comments