Project

General

Profile

Task #3237

Feature #2816: GPU offload / optimization for update&constraits, buffer ops and multi-gpu communication

Feature #2817: GPU X/F buffer ops

Feature #2934: GPU X Buffer ops

data types mixed up and unsafe casting

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
uncategorized
Close

Description

The buffer ops code needs cleanup of data types, casting, and safety checks implicit type compatibility assumptions that remain.

The host code in nbnxn_gpu_x_to_nbat_x() uses hacky and unsafe cast of pointers, e.g. nb->atdata.xq is cast to float*, then the nbnxn_gpu_x_to_nbat_x_kernel() kernel calculates the offsets implicitly assuming the float4 data type, then casting the load to a float3.

gm_coordinatesRvec is passed as rvec then cast to float3 when storing without an assertion on the size compatibility.

Associated revisions

Revision e3859575 (diff)
Added by Artem Zhmurov 9 months ago

Clean-up buffer-ops CUDA kernels

1. Adjust naming according to conventions.
2. Reduce number of type casting.
3. Use native CUDA types.

Fixes #3237.

Change-Id: I79da0dd1edf6c302661ba0954e4191fde1ebf2e8

History

#1 Updated by Artem Zhmurov 9 months ago

  • Status changed from New to Fix uploaded

#3 Updated by Artem Zhmurov 9 months ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF