Refine GPU runtime controls and input checker
This commit is contained in:
@@ -552,6 +552,16 @@ bool fill_bssn_cuda_views_count(Block *cg, MyList<var> *vars,
|
||||
|
||||
bool bssn_cuda_use_resident_sync(int lev)
|
||||
{
|
||||
static int enabled = -1;
|
||||
if (enabled < 0)
|
||||
{
|
||||
const char *env = getenv("AMSS_CUDA_RESIDENT_SYNC");
|
||||
if (!env)
|
||||
env = getenv("AMSS_CUDA_BSSN_RESIDENT_SYNC");
|
||||
enabled = env ? ((atoi(env) != 0) ? 1 : 0) : 1;
|
||||
}
|
||||
if (!enabled)
|
||||
return false;
|
||||
(void)lev;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user