Fix computeNonbonded hang on the HIP platform (#4959)
* Add a workaround for infinite loop in computeNonbonded (HIP) computeNonbonded hangs in some tests (without neighbor list). Reproducible on ROCm 6.4 and 6.4.1 (maybe on older versions too) on various architectures (both CDNA and RDNA). Affected tests: TestHipATMForce, TestHipMonteCarloBarostat, TestHipNonbondedForce, TestHipVirtualSites. Disassembly shows that the compiler splits branches of `if (skipBase+tgx < NUM_TILES_WITH_EXCLUSIONS)` and does `SHFL(skipTiles, TILE_SIZE-1) < pos` checks in them separately, even though `__builtin_amdgcn_ds_bpermute` is a convergent function. Apparently in this case not all lanes participate in each call. * Simplify includeTile check using ballot
Showing
Please register or sign in to comment