Project

General

Profile

Bug #2990

ARM neon SIMD4 error

Added by Szilárd Páll 6 months ago. Updated 2 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

On a NEON build with gcc 8 (on jetson tk1) I get:

gmx: /nethome/pszilard/gromacs-master/src/gromacs/simd/impl_arm_neon/impl_arm_neon_simd4_float.h:78: gmx::Simd4Float gmx::load4(const float*): Assertion `size_t(m) % 16 == 0' failed.
Aborted

History

#1 Updated by Paul Bauer 3 months ago

I'm trying this again now and I no longer get the error but a whole bunch of warnings.
@Szilard is there still something to do here?

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

Paul Bauer wrote:

I'm trying this again now and I no longer get the error but a whole bunch of warnings.
@Szilard is there still something to do here?

I've not tried and I can't prioritize this for beta1.

#3 Updated by Paul Bauer 3 months ago

  • Target version changed from 2020-beta1 to 2020-beta2

#4 Updated by Paul Bauer about 1 month ago

  • Target version changed from 2020-beta2 to 2020-beta3

bump

#5 Updated by Paul Bauer 6 days ago

  • Target version changed from 2020-beta3 to 2020-rc1

bump!

#6 Updated by Paul Bauer 2 days ago

This is the warning I get now (and a few more)
As far as I understand from reading about it this should be caused by different sizes of GMX_SIMD_ALIGNMENT and GMX_SIMD_FINT32_WIDTH

/home/jenkins/test-2020/gromacs/src/gromacs/simd/impl_arm_neon/impl_arm_neon_util_float.h: In function ‘void gmx::gatherLoadBySimdIntTranspose(const float*, gmx::SimdFInt32, gmx::SimdFloat*, gmx::SimdFloat*, gmx::SimdFloat*, gmx::SimdFloat*)’:
/home/jenkins/test-2020/gromacs/src/gromacs/simd/impl_arm_neon/impl_arm_neon_util_float.h:274:75: warning: requested alignment 16 is larger than 8 [-Wattributes]
     alignas(GMX_SIMD_ALIGNMENT) std::int32_t ioffset[GMX_SIMD_FINT32_WIDTH];

#7 Updated by Berk Hess 2 days ago

Paul Bauer wrote:

This is the warning I get now (and a few more)
As far as I understand from reading about it this should be caused by different sizes of GMX_SIMD_ALIGNMENT and GMX_SIMD_FINT32_WIDTH
[...]

No, those are both 16.

Somehow the compiler seems to want to have an alignment of 8 instead of 16. I don't know why the compiler wants 8. 16 should give better performance.

#8 Updated by Paul Bauer 2 days ago

this should be the result of std::max_align_t being not correct for this case according to my google searches, but I don't get why it becomes an issue here

#9 Updated by Mark Abraham 2 days ago

ARMv7 doesn't actually have 128-bit registers, so our x86-based assumptions do not apply

#10 Updated by Mark Abraham 2 days ago

Paul Bauer wrote:

this should be the result of std::max_align_t being not correct for this case according to my google searches, but I don't get why it becomes an issue here

That constant is 8, because that's necessary for double to load on ARMv7. But it only documents the maximum alignment needed for loading any scalar type, which is a different thing from the alignment necessary for SIMD-style loads. The warning would be useful if we were allocating lots of excessively aligned things, but we don't. There's also a pile of other warnings with recent gcc on ARMv7 that aren't worth fixing. Since there's never been a relevant ARMv7 system, and won't be one, we should retire supporting and testing this arch before releasing 2020.

Also available in: Atom PDF