Skip to content

sesmesh 1.3.0

Choose a tag to compare

@ugovaretto ugovaretto released this 21 Nov 04:56
· 4 commits to main since this release

A GPU back end for NVIDIA GPUs (CUDA), next to the AMD one from 1.2.0. Default meshes are unchanged from 1.2.0 (identical apart from the version in the OBJ header).

Added

  • GPU back end, CUDA (#25): Backend::Cuda(CudaOptions) / Backend::cuda(i) in SurfaceParams, --backend cuda in the CLI (feature cuda; default Cpu). It runs the same kernels as the HIP back end. They are compiled with nvcc into a fat binary for compute capability 7.5 (Turing) to 12.0, plus PTX. Only the NVIDIA driver is needed at run time; it is loaded when a device is opened, so a binary built with the feature still runs on the CPU where the driver is missing. Exact mode writes the CPU back end's files byte for byte, and --refine fast works as with HIP. Batches live in device memory (discrete GPUs). Backend::Auto tries HIP, then CUDA, then the CPU.
  • Tested on a laptop with a GeForce RTX 2070 Max-Q (sm_75, 8 GB) and a 6-core i7-9750H. The CPU/GPU gate found no difference in 774 SES and 212 SAS/vdW cases (3J3Q at 0.25 Å, 800 M triangles, included). 1AON at 0.5 Å takes 3.04 s exact and 1.70 s fast, against 5.48 s on the laptop's CPU, which bounds both modes (docs/06-gpu-cuda.md).
  • tools/gpu/cuda-build.Containerfile builds the CUDA back end on a machine without CUDA. tools/gpu/gate.sh takes BACKEND=cuda, and can make its CPU references on another machine (MODE=cpu|gpu).

Changed

  • sesmesh-gpu: the batch descriptions, encodings and self-test moved to a shared module batch, with traits both back ends implement. The kernel source is kernels/sesmesh.cuh, shared by HIP and CUDA. --gpu-device applies to --backend hip and cuda.
  • The GPU gate uses no Python. It streams the OBJ files (tens of GB at 0.25 Å) through sha256sum and grep, compares statistics with jq, and prints the totals with summary.sh. This release passed it on both back ends.

Binaries: macOS arm64 and Linux x86-64 (glibc 2.34 or newer), built without GPU features. On Linux arm64 and Windows, or for a GPU back end, use cargo install sesmesh-cli; add --features hip (needs ROCm's hipcc) or --features cuda (needs CUDA's nvcc) at build time.

Full details: CHANGELOG.md.