Reduce redundant GPU host buffer preparation
This commit is contained in:
@@ -124,25 +124,6 @@ void bssn_class::Step_MainPath_GPU(int lev, int YN)
|
||||
}
|
||||
};
|
||||
|
||||
auto stage_upload_var_list =
|
||||
[&](Block *cg, MyList<var> *var_list) {
|
||||
const int n = cg->shape[0] * cg->shape[1] * cg->shape[2];
|
||||
while (var_list)
|
||||
{
|
||||
if (bssn_gpu_stage_upload_buffer(cg->fgfs[var_list->data->sgfn], n))
|
||||
{
|
||||
cerr << "GPU state upload failure: lev=" << lev
|
||||
<< " var=" << var_list->data->name
|
||||
<< " bbox=(" << cg->bbox[0] << ":" << cg->bbox[3] << ","
|
||||
<< cg->bbox[1] << ":" << cg->bbox[4] << ","
|
||||
<< cg->bbox[2] << ":" << cg->bbox[5] << ")" << endl;
|
||||
ERROR = 1;
|
||||
break;
|
||||
}
|
||||
var_list = var_list->next;
|
||||
}
|
||||
};
|
||||
|
||||
auto ensure_stage_device_var_list =
|
||||
[&](Block *cg, MyList<var> *var_list) {
|
||||
const int n = cg->shape[0] * cg->shape[1] * cg->shape[2];
|
||||
@@ -340,7 +321,6 @@ void bssn_class::Step_MainPath_GPU(int lev, int YN)
|
||||
Block *cg = BP->data;
|
||||
if (myrank == cg->rank)
|
||||
{
|
||||
stage_upload_var_list(cg, StateList);
|
||||
if (gpu_rhs(CALLED_BY_STEP, myrank, RHS_PARA_CALLED_FIRST_TIME))
|
||||
ERROR = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user