Project

General

Profile

Task #2936

introduce check that CPU-GPU transfers are made between arrays of compatible types

Added by Szilárd Páll 9 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
simple
Close

Description

The bonded, constraints and update code makes the implicit assumption that the fvec and float3 types are compatible both in size and layout and it is safe to copy data from an array of the former to the latter.

We should add a check for this assumption in the relevant modules, checking at least that the sizes of the types are equal using a static_assert.


Related issues

Related to GROMACS - Feature #2888: CUDA Update and Constraints moduleClosed
Related to GROMACS - Task #2675: bonded CUDA offload taskIn Progress

History

#1 Updated by Szilárd Páll 9 months ago

  • Related to Feature #2888: CUDA Update and Constraints module added

#2 Updated by Szilárd Páll 9 months ago

  • Related to Task #2675: bonded CUDA offload task added

#3 Updated by Artem Zhmurov 9 months ago

Although this is not trivial in the current form, but since we use wrapper, maybe we should make these checks inside it? I guess, static_assert will not work in this case though.

#4 Updated by Artem Zhmurov about 1 month ago

  • Target version changed from 2020 to 2021

Started to add these checks in current master (see https://gerrit.gromacs.org/#/c/gromacs/+/14859/). Solution for the proper data type for the coordinates device buffer is needed: RVec/rvec can not be directly used in the GPU code, float3 is not available in the CPU code. Re-targeting to the next version.

Also available in: Atom PDF