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
If I comment out the assembly version of the 128-bit CAS loop and compile with OpenMP tests fail on X86 systems with GNU and Intel. Not sure but the fall-back may be broken which could have impact on other platforms.
The text was updated successfully, but these errors were encountered:
nmhamster
added
the
Bug
Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
label
Dec 19, 2015
The problem is that the use of cas128 was only protected by "if defined(KOKKOS_ENABLE_ASM)" while the contents of cas128 with the changes in the pull request were now protected by
"if defined(KOKKOS_ENABLE_ASM) && defined ( KOKKOS_USE_ISA_X86_64 )".
That way the 128 cas which got called was actually not atomic, which made the tests fail since the cas loops never finished.
I changed it so that the whole function is not visible anymore (not just the loop body) if those two things are not defined, and I protected the use of cas128 with both defines everywhere.
So now if either KOKKOS_ENABLE_ASM or KOKKOS_USE_ISA_X86_64 is not defined 128 bit atomics go to the generic backend.
Simon Hammond
Center for Computing Research (Scalable Computer Architectures)
Sandia National Laboratories, NM
[Sent from remote connection, please excuse typing errors]
From: Christian Trott notifications@github.com
Sent: Saturday, December 19, 2015 3:36 PM
To: kokkos/kokkos
Cc: Hammond, Simon David (-EXP)
Subject: [EXTERNAL] Re: [kokkos] 128-bit CAS without Assembly Broken? (#161)
The problem is that the use of cas128 was only protected by "if defined(KOKKOS_ENABLE_ASM)" while the contents of cas128 with the changes in the pull request were now protected by
"if defined(KOKKOS_ENABLE_ASM) && defined ( KOKKOS_USE_ISA_X86_64 )".
That way the 128 cas which got called was actually not atomic, which made the tests fail since the cas loops never finished.
I changed it so that the whole function is not visible anymore (not just the loop body) if those two things are not defined, and I protected the use of cas128 with both defines everywhere.
So now if either KOKKOS_ENABLE_ASM or KOKKOS_USE_ISA_X86_64 is not defined 128 bit atomics go to the generic backend.
Reply to this email directly or view it on GitHubhttps://github.com//issues/161#issuecomment-166031241.
If I comment out the assembly version of the 128-bit CAS loop and compile with OpenMP tests fail on X86 systems with GNU and Intel. Not sure but the fall-back may be broken which could have impact on other platforms.
The text was updated successfully, but these errors were encountered: