Closed CaRoLZhangxy closed 1 week ago
source/op/pt/comm.cc (1)
`200-200`: **Ensure appropriate use of `.contiguous()` for performance considerations.** The addition of `.contiguous()` ensures that the tensor is stored in a contiguous block of memory, which can be necessary for certain operations that expect this memory layout. However, this can also have performance implications, especially in a distributed system using MPI and potentially interacting with GPUs. It's crucial to verify that this change is indeed necessary for the operations that follow and does not introduce unnecessary overhead. If the subsequent operations require a contiguous layout, this change is justified. Otherwise, it might be beneficial to benchmark the performance impact of this change, particularly in scenarios involving large data transfers or operations.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.72%. Comparing base (
17cdcb0
) to head (d18c432
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
https://github.com/deepmodeling/deepmd-kit/issues/3910
Summary by CodeRabbit
Border
class to ensure proper memory management and performance by making tensors contiguous.