Function deepmd::validate_nlist_gpu_capacity

Function deepmd::validate_nlist_gpu_capacity#

Function Documentation#

int deepmd::validate_nlist_gpu_capacity(const InputNlist &nlist, const int row_capacity)#

Validate that every host neighbor-list row fits a GPU row buffer.

GPU neighbor lists are stored in a dense, fixed-width buffer. Validate the sparse host rows before any device allocation or copy so an oversized row cannot overwrite the following row.

Parameters:
  • nlist – Host neighbor list to validate.

  • row_capacity – Number of neighbor indices allocated for each GPU row.

Throws:

deepmd_exception – If any row exceeds row_capacity.

Returns:

Maximum neighbor count found in nlist.