Add mixed GPU RP path for EScalar

This commit is contained in:
2026-05-02 18:27:26 +08:00
parent 59a216ad93
commit f638cbc4e8
5 changed files with 280 additions and 23 deletions

View File

@@ -102,6 +102,17 @@ int amss_escalar_split_rp_recursive_enabled()
return enabled;
}
int amss_escalar_mixed_gpu_rp_enabled()
{
static int enabled = -1;
if (enabled < 0)
{
const char *env = getenv("AMSS_ESCALAR_MIXED_GPU_RP");
enabled = (!env || atoi(env) != 0) ? 1 : 0;
}
return enabled;
}
MyList<var> *clone_var_sublist(MyList<var> *src, int skip, int take)
{
for (int i = 0; i < skip && src; ++i)
@@ -7197,7 +7208,8 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
STEP_TIMER_ADD(TB_RESTRICT_PROLONG, timer_restrict_prolong);
return;
}
if (lev > 0 && var_list_count(SL) > BSSN_CUDA_STATE_COUNT)
if (lev > 0 && !amss_escalar_mixed_gpu_rp_enabled() &&
var_list_count(SL) > BSSN_CUDA_STATE_COUNT)
{
download_bssn_prefix_for_list(GH->PatL[lev], SL, myrank);
download_bssn_prefix_for_list(GH->PatL[lev - 1], SL, myrank);