Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CUDA compilation issues #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/contraction/spctr_offload.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ namespace CTF_int {
return tot_time;
}

double spctr_offload::est_time_rec(int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C){
return rec_ctr->est_time_rec(nlyr, nnz_frac_A, nnz_frac_B, nnz_frac_C) + est_time_fp(nlyr, nnz_frac_A, nnz_frac_B, nnz_frac_C);
double spctr_offload::est_time_rec(int nlyr, int nblk_A, int nblk_B, int nblk_C, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C){
return rec_ctr->est_time_rec(nlyr, nblk_A, nblk_B, nblk_C, nnz_frac_A, nnz_frac_B, nnz_frac_C) + est_time_fp(nlyr, nnz_frac_A, nnz_frac_B, nnz_frac_C);
}

int64_t spctr_offload::spmem_fp(double nnz_frac_A, double nnz_frac_B, double nnz_frac_C){
return 0;
}

int64_t spctr_offload::mem_rec(double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) {
return rec_ctr->mem_rec(nnz_frac_A, nnz_frac_B, nnz_frac_C) + spmem_fp(nnz_frac_A, nnz_frac_B, nnz_frac_C);
return rec_ctr->spmem_rec(nnz_frac_A, nnz_frac_B, nnz_frac_C) + spmem_fp(nnz_frac_A, nnz_frac_B, nnz_frac_C);
}

void spctr_offload::run(char * A, int nblk_A, int64_t const * size_blk_A,
Expand Down
4 changes: 2 additions & 2 deletions src/contraction/spctr_offload.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace CTF_int {
we need
* \return bytes needed
*/
int64_t spmem_fp();
int64_t spmem_fp(double nnz_frac_A, double nnz_frac_B, double nnz_frac_C);

/**
* \brief returns the number of bytes of buffer space we need recursively
Expand All @@ -60,7 +60,7 @@ namespace CTF_int {
* \brief returns the time this kernel will take including calls to rec_ctr
* \return seconds needed for recursive contraction
*/
double est_time_rec(int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C);
double est_time_rec(int nlyr, int nblk_A, int nblk_B, int nblk_C, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C);

spctr * clone();

Expand Down
2 changes: 2 additions & 0 deletions src/shared/init_models.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ double seq_tsr_ctr_mdl_inr_init[] = {1.0689E-05, 9.4660E-10, 2.1921E-10};
double seq_tsr_ctr_mdl_off_init[] = {6.2925E-05, 1.7449E-11, 1.7211E-12};
double seq_tsr_ctr_mdl_cst_inr_init[] = {1.3863E-04, 2.0119E-10, 9.8820E-09};
double seq_tsr_ctr_mdl_cst_off_init[] = {8.4844E-04, 5.9246E-11, 3.5247E-10};
double upload_mdl_init[] = {8.4844E-04, 5.9246E-11, 3.5247E-10};
double download_mdl_init[] = {8.4844E-04, 5.9246E-11, 3.5247E-10};
double long_contig_transp_mdl_init[] = {1.5117E-04, 1.9091E-09};
double shrt_contig_transp_mdl_init[] = {7.7643E-05, 6.4347E-12};
double non_contig_transp_mdl_init[] = {2.6680E-05, 4.6247E-06};
Expand Down
2 changes: 1 addition & 1 deletion src/shared/offload.cu
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ namespace CTF_int{
}

cublasStatus_t status =
cublasDgemm(cuhandle, cuA, cuB, m, n, k, &alpha,
cublasSgemm(cuhandle, cuA, cuB, m, n, k, &alpha,
dev_A, lda_A,
dev_B, lda_B, &beta,
dev_C, lda_C);
Expand Down