Skip to content

Commit 6c89f6c

Browse files
authored
[SYCLomatic] Add query-api-mapping for 16 cusparse APIs and fix curand test (#2895)
Signed-off-by: Jiang, Zhiwei <zhiwei.jiang@intel.com>
1 parent 2ddc2f0 commit 6c89f6c

22 files changed

Lines changed: 470 additions & 8 deletions
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "cusparse.h"
2+
3+
void test(cusparseHandle_t handle, int algo, cusparseOperation_t trans_a,
4+
cusparseOperation_t trans_b, int m, int nrhs, int nnz,
5+
const cuComplex *alpha, const cusparseMatDescr_t descr,
6+
const cuComplex *value, const int *row_ptr, const int *col_ind,
7+
const cuComplex *b, int ldb, csrsm2Info_t info,
8+
cusparseSolvePolicy_t policy, void *buffer) {
9+
// Start
10+
cusparseCcsrsm2_analysis(
11+
handle /*cusparseHandle_t*/, algo /*int*/,
12+
trans_a /*cusparseOperation_t*/, trans_b /*cusparseOperation_t*/,
13+
m /*int*/, nrhs /*int*/, nnz /*int*/, alpha /*const cuComplex **/,
14+
descr /*const cusparseMatDescr_t*/, value /*const cuComplex **/,
15+
row_ptr /*const int **/, col_ind /*const int **/, b /*const cuComplex **/,
16+
ldb /*int*/, info /*csrsm2Info_t*/, policy /*cusparseSolvePolicy_t*/,
17+
buffer /*void **/);
18+
// End
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "cusparse.h"
2+
3+
void test(cusparseHandle_t handle, int algo, cusparseOperation_t trans_a,
4+
cusparseOperation_t trans_b, int m, int nrhs, int nnz,
5+
const cuComplex *alpha, const cusparseMatDescr_t descr,
6+
const cuComplex *value, const int *row_ptr, const int *col_ind,
7+
const cuComplex *b, int ldb, csrsm2Info_t info,
8+
cusparseSolvePolicy_t policy, size_t *buffer_size) {
9+
// Start
10+
cusparseCcsrsm2_bufferSizeExt(
11+
handle /*cusparseHandle_t*/, algo /*int*/,
12+
trans_a /*cusparseOperation_t*/, trans_b /*cusparseOperation_t*/,
13+
m /*int*/, nrhs /*int*/, nnz /*int*/, alpha /*const cuComplex **/,
14+
descr /*const cusparseMatDescr_t*/, value /*const cuComplex **/,
15+
row_ptr /*const int **/, col_ind /*const int **/, b /*const cuComplex **/,
16+
ldb /*int*/, info /*csrsm2Info_t*/, policy /*cusparseSolvePolicy_t*/,
17+
buffer_size /*size_t **/);
18+
// End
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "cusparse.h"
2+
3+
void test(cusparseHandle_t handle, int algo, cusparseOperation_t trans_a,
4+
cusparseOperation_t trans_b, int m, int nrhs, int nnz,
5+
const cuComplex *alpha, const cusparseMatDescr_t descr,
6+
const cuComplex *value, const int *row_ptr, const int *col_ind,
7+
cuComplex *b, int ldb, csrsm2Info_t info,
8+
cusparseSolvePolicy_t policy, void *buffer) {
9+
// Start
10+
cusparseCcsrsm2_solve(
11+
handle /*cusparseHandle_t*/, algo /*int*/,
12+
trans_a /*cusparseOperation_t*/, trans_b /*cusparseOperation_t*/,
13+
m /*int*/, nrhs /*int*/, nnz /*int*/, alpha /*const cuComplex **/,
14+
descr /*const cusparseMatDescr_t*/, value /*const cuComplex **/,
15+
row_ptr /*const int **/, col_ind /*const int **/, b /*cuComplex **/,
16+
ldb /*int*/, info /*csrsm2Info_t*/, policy /*cusparseSolvePolicy_t*/,
17+
buffer /*void **/);
18+
// End
19+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "cusparse.h"
2+
3+
void test() {
4+
// Start
5+
csrgemm2Info_t info;
6+
cusparseCreateCsrgemm2Info(&info /*csrgemm2Info_t **/);
7+
// End
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "cusparse.h"
2+
3+
void test() {
4+
// Start
5+
csrsm2Info_t info;
6+
cusparseCreateCsrsm2Info(&info /*csrsm2Info_t **/);
7+
// End
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "cusparse.h"
2+
3+
void test(cusparseHandle_t handle, int algo, cusparseOperation_t trans_a,
4+
cusparseOperation_t trans_b, int m, int nrhs, int nnz,
5+
const double *alpha, const cusparseMatDescr_t descr,
6+
const double *value, const int *row_ptr, const int *col_ind,
7+
const double *b, int ldb, csrsm2Info_t info,
8+
cusparseSolvePolicy_t policy, void *buffer) {
9+
// Start
10+
cusparseDcsrsm2_analysis(
11+
handle /*cusparseHandle_t*/, algo /*int*/,
12+
trans_a /*cusparseOperation_t*/, trans_b /*cusparseOperation_t*/,
13+
m /*int*/, nrhs /*int*/, nnz /*int*/, alpha /*const double **/,
14+
descr /*const cusparseMatDescr_t*/, value /*const double **/,
15+
row_ptr /*const int **/, col_ind /*const int **/, b /*const double **/,
16+
ldb /*int*/, info /*csrsm2Info_t*/, policy /*cusparseSolvePolicy_t*/,
17+
buffer /*void **/);
18+
// End
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "cusparse.h"
2+
3+
void test(cusparseHandle_t handle, int algo, cusparseOperation_t trans_a,
4+
cusparseOperation_t trans_b, int m, int nrhs, int nnz,
5+
const double *alpha, const cusparseMatDescr_t descr,
6+
const double *value, const int *row_ptr, const int *col_ind,
7+
const double *b, int ldb, csrsm2Info_t info,
8+
cusparseSolvePolicy_t policy, size_t *buffer_size) {
9+
// Start
10+
cusparseDcsrsm2_bufferSizeExt(
11+
handle /*cusparseHandle_t*/, algo /*int*/,
12+
trans_a /*cusparseOperation_t*/, trans_b /*cusparseOperation_t*/,
13+
m /*int*/, nrhs /*int*/, nnz /*int*/, alpha /*const double **/,
14+
descr /*const cusparseMatDescr_t*/, value /*const double **/,
15+
row_ptr /*const int **/, col_ind /*const int **/, b /*const double **/,
16+
ldb /*int*/, info /*csrsm2Info_t*/, policy /*cusparseSolvePolicy_t*/,
17+
buffer_size /*size_t **/);
18+
// End
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "cusparse.h"
2+
3+
void test(cusparseHandle_t handle, int algo, cusparseOperation_t trans_a,
4+
cusparseOperation_t trans_b, int m, int nrhs, int nnz,
5+
const double *alpha, const cusparseMatDescr_t descr,
6+
const double *value, const int *row_ptr, const int *col_ind,
7+
double *b, int ldb, csrsm2Info_t info, cusparseSolvePolicy_t policy,
8+
void *buffer) {
9+
// Start
10+
cusparseDcsrsm2_solve(
11+
handle /*cusparseHandle_t*/, algo /*int*/,
12+
trans_a /*cusparseOperation_t*/, trans_b /*cusparseOperation_t*/,
13+
m /*int*/, nrhs /*int*/, nnz /*int*/, alpha /*const double **/,
14+
descr /*const cusparseMatDescr_t*/, value /*const double **/,
15+
row_ptr /*const int **/, col_ind /*const int **/, b /*double **/,
16+
ldb /*int*/, info /*csrsm2Info_t*/, policy /*cusparseSolvePolicy_t*/,
17+
buffer /*void **/);
18+
// End
19+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "cusparse.h"
2+
3+
void test(csrgemm2Info_t info) {
4+
// Start
5+
cusparseDestroyCsrgemm2Info(info /*csrgemm2Info_t*/);
6+
// End
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "cusparse.h"
2+
3+
void test(csrsm2Info_t info) {
4+
// Start
5+
cusparseDestroyCsrsm2Info(info /*csrsm2Info_t*/);
6+
// End
7+
}

0 commit comments

Comments
 (0)