You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nda::blas::dot gives incorrect results when nda arrays are non-contiguous in memory.
Steps to Reproduce
A patch to the existing linear algebra test demonstrates the issue by comparison of the dot products of non-contiguous arrays with dot products of contiguous array copies.
I think the problem is already the reshaping of the array, i.e.
auto v_3d_noncont_1d = nda::reshaped_view(v_3d_noncont, std::array<long,1>{n*n*n});
should not be allowed since v_3d_noncont is not contiguous in memory.
If you compile the code in debug mode, i.e. with -DCMAKE_BUILD_TYPE=Debug, then you should in fact get an error that the reshaping fails (see nda/layout_transforms.hpp).
Yes, as detailed also in the nda::reshape documentation the input needs to be contiguous. The runtime checks are currently enabled only in debug mode as @Thoemi09 pointed out. Closing this.
Description
nda::blas::dot gives incorrect results when nda arrays are non-contiguous in memory.
Steps to Reproduce
A patch to the existing linear algebra test demonstrates the issue by comparison of the dot products of non-contiguous arrays with dot products of contiguous array copies.
Versions
The issue is reproduced on Rusty with the following NDA version used in BeyondDFT:
The text was updated successfully, but these errors were encountered: