Skip to content

Commit

Permalink
[SYCLomatic oneapi-src#1837] Add test for 36 cublas 64-bit API migrat…
Browse files Browse the repository at this point in the history
…ion (oneapi-src#673)

Signed-off-by: Jiang, Zhiwei <[email protected]>
  • Loading branch information
zhiweij1 authored Apr 9, 2024
1 parent ce053fe commit fb64662
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions features/feature_case/cublas/cublas_64.cu
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,69 @@ void foo() {
status = cublasScasum_64(handle, n, A_c, incx, &result_s);
status = cublasDzasum_64(handle, n, A_z, incx, &result_d);

const float *const_s;
const double *const_d;
const float2 *const_c;
const double2 *const_z;
float *s;
double *d;
float2 *c;
double2 *z;

status = cublasSrot_64(handle, n, C_s, incx, C1_s, incy, const_s, const_s);
status = cublasDrot_64(handle, n, C_d, incx, C1_d, incy, const_d, const_d);
status = cublasCrot_64(handle, n, C_c, incx, C1_c, incy, const_s, const_c);
status = cublasCsrot_64(handle, n, C_c, incx, C1_c, incy, const_s, const_s);
status = cublasZrot_64(handle, n, C_z, incx, C1_z, incy, const_d, const_z);
status = cublasZdrot_64(handle, n, C_z, incx, C1_z, incy, const_d, const_d);

status = cublasSrotm_64(handle, n, s, incx, s, incy, const_s);
status = cublasDrotm_64(handle, n, d, incx, d, incy, const_d);

const float *x_s;
const double *x_d;
const float2 *x_c;
const double2 *x_z;
float *y_s;
double *y_d;
float2 *y_c;
double2 *y_z;
status = cublasSgemv_64(handle, transa, m, n, alpha_s, A_s, lda, x_s, incx, beta_s, y_s, incy);
status = cublasDgemv_64(handle, transa, m, n, alpha_d, A_d, lda, x_d, incx, beta_d, y_d, incy);
status = cublasCgemv_64(handle, transa, m, n, alpha_c, A_c, lda, x_c, incx, beta_c, y_c, incy);
status = cublasZgemv_64(handle, transa, m, n, alpha_z, A_z, lda, x_z, incx, beta_z, y_z, incy);

int64_t kl, ku;
status = cublasSgbmv_64(handle, transa, m, n, kl, ku, alpha_s, A_s, lda, x_s, incx, beta_s, y_s, incy);
status = cublasDgbmv_64(handle, transa, m, n, kl, ku, alpha_d, A_d, lda, x_d, incx, beta_d, y_d, incy);
status = cublasCgbmv_64(handle, transa, m, n, kl, ku, alpha_c, A_c, lda, x_c, incx, beta_c, y_c, incy);
status = cublasZgbmv_64(handle, transa, m, n, kl, ku, alpha_z, A_z, lda, x_z, incx, beta_z, y_z, incy);

status = cublasStrmv_64(handle, uplo, transa, diag, n, A_s, lda, y_s, incy);
status = cublasDtrmv_64(handle, uplo, transa, diag, n, A_d, lda, y_d, incy);
status = cublasCtrmv_64(handle, uplo, transa, diag, n, A_c, lda, y_c, incy);
status = cublasZtrmv_64(handle, uplo, transa, diag, n, A_z, lda, y_z, incy);

status = cublasStbmv_64(handle, uplo, transa, diag, n, k, A_s, lda, y_s, incy);
status = cublasDtbmv_64(handle, uplo, transa, diag, n, k, A_d, lda, y_d, incy);
status = cublasCtbmv_64(handle, uplo, transa, diag, n, k, A_c, lda, y_c, incy);
status = cublasZtbmv_64(handle, uplo, transa, diag, n, k, A_z, lda, y_z, incy);

status = cublasStpmv_64(handle, uplo, transa, diag, n, A_s, y_s, incy);
status = cublasDtpmv_64(handle, uplo, transa, diag, n, A_d, y_d, incy);
status = cublasCtpmv_64(handle, uplo, transa, diag, n, A_c, y_c, incy);
status = cublasZtpmv_64(handle, uplo, transa, diag, n, A_z, y_z, incy);

status = cublasStrsv_64(handle, uplo, transa, diag, n, A_s, lda, y_s, incy);
status = cublasDtrsv_64(handle, uplo, transa, diag, n, A_d, lda, y_d, incy);
status = cublasCtrsv_64(handle, uplo, transa, diag, n, A_c, lda, y_c, incy);
status = cublasZtrsv_64(handle, uplo, transa, diag, n, A_z, lda, y_z, incy);

status = cublasStpsv_64(handle, uplo, transa, diag, n, A_s, y_s, incy);
status = cublasDtpsv_64(handle, uplo, transa, diag, n, A_d, y_d, incy);
status = cublasCtpsv_64(handle, uplo, transa, diag, n, A_c, y_c, incy);
status = cublasZtpsv_64(handle, uplo, transa, diag, n, A_z, y_z, incy);

status = cublasSgemm_64(handle, transa, transb, m, n, k, alpha_s, A_s, lda, B_s, ldb, beta_s, C_s, ldc);
status = cublasDgemm_64(handle, transa, transb, m, n, k, alpha_d, A_d, lda, B_d, ldb, beta_d, C_d, ldc);
status = cublasCgemm_64(handle, transa, transb, m, n, k, alpha_c, A_c, lda, B_c, ldb, beta_c, C_c, ldc);
Expand Down

0 comments on commit fb64662

Please sign in to comment.