1. 06 May, 2026 1 commit
    • one's avatar
      Optimize HIP pair-list handling for CDNA LJPME · 939ecf28
      one authored
      - Use bitwise prefix accounting when storing sparse interactions as single pairs in the HIP pair-list kernel. This reduces the number of ballot operations needed to compute per-lane single-pair offsets.
      - For HIP CDNA single precision, raise MAX_BITS_FOR_PAIRS to 8 so more sparse interactions are emitted as single pairs instead of full tiles. Keep the existing double precision and RDNA thresholds unchanged.
      - Also simplify the HIP LJPME direct correction by computing alpha^2*r2
      939ecf28
  2. 19 Feb, 2026 1 commit
  3. 10 Feb, 2026 1 commit
    • Evan Pretti's avatar
      GPU implementation of L-BFGS (#5198) · 4ab645ea
      Evan Pretti authored
      * Make reference/CPU minimizer into a kernel
      
      * Add per-platform support for GPU minimization
      
      * Initial implementation of GPU minimization
      
      * Fixes
      
      * Increase robustness when initial gradient is huge
      
      * Handle overflow leading to non-finite values gracefully
      
      * Handle large forces in single precision more robustly
      
      * Optimize kernels
      
      * Fix kernel launch size
      
      * Update banner years
      
      * Don't create MinimizeKernel until first minimization requested
      
      * Make some compile-time constants into kernel arguments
      
      * Consolidate scale calculation kernel
      
      * Condense alpha/beta reduction kernels using atomics
      
      * Condense line search dot kernels with reductions
      
      * Remove a download, and download grad norm separately
      
      * Asynchronously check lbfgs convergence condition
      
      * Restructure line search to avoid download waiting
      
      * Start line search preemptively in case CPU evaluation is not needed
      
      * In rare cases, constraint error might not decrease after one optimization round
      
      * Better handling of unsupported 64-bit atomics, use FLT_MAX
      
      * Pick gradient mode based on GPU vs. CPU evaluation
      
      * Rework getDiff/getScale reduction, remove reduceBuffer
      
      * Older CUDA might not like float hex literals
      
      * Fix error in a comment
      4ab645ea
  4. 14 Dec, 2025 1 commit
    • Anton Gorenko's avatar
      Support ROCm 7 (#5162) · 07b738c5
      Anton Gorenko authored
      * Remove std::enable_if, warpRotateLeft is always used with TILE_SIZE
      
      * Do not use built-in warpSize in constexpr contexts
      
      Starting from ROCm 7 warpSize is no longer constexpr.
      findInteractingBlocks.hip uses it for sizes of __shared__ arrays.
      
      * Check if hipHostMallocNumaUser is allowed before using it
      07b738c5
  5. 07 Jun, 2025 1 commit
    • Anton Gorenko's avatar
      Fix computeNonbonded hang on the HIP platform (#4959) · a4b43a04
      Anton Gorenko authored
      * 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
      a4b43a04
  6. 23 Sep, 2024 1 commit
    • Anton Gorenko's avatar
      Optimize PME spread charge kernel (#4633) · 8ea42950
      Anton Gorenko authored
      * PME_ORDER threads process one atom;
      * PME_ORDER threads access consecutive addresses;
      * No need to permute z indices with zindexTable;
      * finishSpreadCharge is needed only with fixed point charge spreading;
      8ea42950
  7. 05 Sep, 2024 8 commits
  8. 01 Sep, 2024 2 commits
    • Anton Gorenko's avatar
      Optimize sorting kernels and tune block sizes · 7279c539
      Anton Gorenko authored
      * Compile kernels with max block size of 256 threads:
        The default hipcc behavior since ROCm 4.2 is to compile kernels
        with 1024 threads unless __launch_bounds__ is specified. This
        significantly increases register pressure especially in heavy kernels
        (double precision, for example), requiring register spilling;
      * Optimize computeRange by using multiple blocks for reduction;
      * Use blocks of 1024 threads for computeBucketPositions - it is executed
        as a single work group so larger block size is faster;
      * Sort up-to lenghtNextPow2 instead of blockDim.x (faster for short
        buckets);
      * Optimize sortShortList2;
      * Optimize sortBuckets with bit instructions;
      * Decrease bucket size for non-uniform sorting: too many buckets may
        have sizes too large to sort in shared memory;
      * Add more sizes in tests.
      7279c539
    • Anton Gorenko's avatar
      Add hipification of CUDA platform · 89d2ff0e
      Anton Gorenko authored
      Port changes in CUDA backend to HIP
      
      Fix a warning about arithmetic operations on void* in HipArray::uploadSubArray
      
      Fix "Error Initializing context ROCm 5.3.0"
      
          https://github.com/StreamHPC/openmm-hip/issues/3
      
      
          hipDeviceSetCacheConfig returns hipErrorNotSupported on 5.3
      Co-authored-by: default avatarNick Curtis <nicholas.curtis@amd.com>
      89d2ff0e