DPCT1047#
Message#
The meaning of <parameter name> in the <API name> is different from the <API name>. You may need to check the migrated code.
Detailed Help#
In cuBLAS* and cuSolver* getrf API, the LU factorization is done as P*A=L*U
;
in IntelĀ® oneAPI Math Kernel Library API, it is done as
A=P*L*U
. The result of the matrix P may be different.
Suggestions to Fix#
If the matrix P is only used in library API, ignore this warning. If P is used other ways, you may need to adjust the value of P.
For example, this original CUDA* code:
1 void foo(cublasHandle_t handle, float **a_array, float **b_array, int *p_array,
2 int *info_array) {
3 cublasSgetrfBatched(handle, 2, a_array, 2, p_array, info_array, 1);
4 cublasSgetrsBatched(handle, CUBLAS_OP_N, 2, 2, a_array, 2, p_array, b_array,
5 2, info_array, 1);
6 }
results in the following migrated SYCL* code:
1 void foo(dpct::queue_ptr handle, float **a_array, float **b_array, int *p_array,
2 int *info_array) {
3 /*
4 DPCT1047:0: The meaning of p_array in the dpct::getrf_batch_wrapper is
5 different from the cublasSgetrfBatched. You may need to check the migrated
6 code.
7 */
8 dpct::getrf_batch_wrapper(*handle, 2, a_array, 2, p_array, info_array, 1);
9 dpct::getrs_batch_wrapper(*handle, oneapi::mkl::transpose::nontrans, 2, 2,
10 const_cast<float const **>(a_array), 2, p_array,
11 b_array, 2, info_array, 1);
12 }
which is rewritten to:
1 void foo(dpct::queue_ptr handle, float **a_array, float **b_array, int *p_array,
2 int *info_array) {
3 // cublas/cusolver API getrs need the output of cublas/cusolver getrf as input.
4 // MKL/dpct helper API getrs need the output of MKL/dpct helper getrf as input.
5 // In this case, matrix P is only used as a temporary data between library API
6 // invocations, so the warning can be ignored.
7 dpct::getrf_batch_wrapper(*handle, 2, a_array, 2, p_array, info_array, 1);
8 dpct::getrs_batch_wrapper(*handle, oneapi::mkl::transpose::nontrans, 2, 2,
9 const_cast<float const **>(a_array), 2, p_array,
10 b_array, 2, info_array, 1);
11 }