access2rohit opened a new issue #18954:
URL: https://github.com/apache/incubator-mxnet/issues/18954
## Description
MKL supports int64 indexing if MXNet is build with flag `MKL_USE_ILP64=ON`
but internally mkl uses `long long` for 64-bit int instead of `int64_t`. This
is fine as long as parameters are passed by value but when they are passed as
reference `*int64_t` is treated as `*long` hence for 64-bit integer pointers
there is a type mismatch by compiler while building MXNet which is `cannot
convert 'long int *' to 'long long int*'` as shown in colsole snippet shown
below
```
../src/api/operator/numpy/linalg/../../../../operator/numpy/linalg/../../tensor/.././c_lapa
ck_api.h: In function 'int MXNET_LAPACK_dgetri(int, int, double*, int, int*,
double*, int)'
:
../src/api/operator/numpy/linalg/../../../../operator/numpy/linalg/../../tensor/.././c_lapa
ck_api.h:382:68: error: cannot convert 'long int*' to 'long long int*' for
argument '5' to
'long long int LAPACKE_dgetri(int, long long int, double*, long long int,
const long long
int*)'
return LAPACKE_##prefix##getri(matrix_layout, n, a, lda, ipiv); \
^
../src/api/operator/numpy/linalg/../../../../operator/numpy/linalg/../../tensor/.././c_lapa
ck_api.h:388:3: note: in expansion of macro 'MXNET_LAPACK_CWRAP_GETRI'
MXNET_LAPACK_CWRAP_GETRI(d, double)
^~~~~~~~~~~~~~~~~~~~~~~~
```
In order to fix it LAPACK and BLAS declarations and calls to MKL need to
casted(reinterpret_cast<long long int*>) inside MXNet code base.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]