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
The use of the #pragma omp simd OpenMP directive in Configuration.cc does not result in AVX instructions with the GNU C++ compiler on ADL and CSL, even when -O3 is specified (-DCMAKE_CXX_FLAGS="-O3").
To generate AVX instructions, I needed to pass the -mavx flag with -DCMAKE_CXX_FLAGS="-O3 -mavx" when building with CMake. The GNU C++ compiler will now generate VMOVSD instructions instead of MOVSD instructions in the Spatter kernels.
π Reproduction steps
Go to project root directory
Run CMake to build OpenMP backend with cmake -DCMAKE_CXX_FLAGS="-O3" -DUSE_OPENMP=1 -B build_openmp -S . && make -j$(nproc) -C build_openmp
Disassemble a kernel with objdump --disassemble=_ZN7Spatter13ConfigurationINS_6OpenMPEE7scatterEbm._omp_fn.0 ./build_openmp/spatter
πΏ OS
Ubuntu 22
ποΈ Architecture
x86_64
π Description
The use of the
#pragma omp simd
OpenMP directive in Configuration.cc does not result in AVX instructions with the GNU C++ compiler on ADL and CSL, even when-O3
is specified (-DCMAKE_CXX_FLAGS="-O3"
).To generate AVX instructions, I needed to pass the
-mavx
flag with-DCMAKE_CXX_FLAGS="-O3 -mavx"
when building with CMake. The GNU C++ compiler will now generate VMOVSD instructions instead of MOVSD instructions in the Spatter kernels.π Reproduction steps
cmake -DCMAKE_CXX_FLAGS="-O3" -DUSE_OPENMP=1 -B build_openmp -S . && make -j$(nproc) -C build_openmp
objdump --disassemble=_ZN7Spatter13ConfigurationINS_6OpenMPEE7scatterEbm._omp_fn.0 ./build_openmp/spatter
π¬ Logs
The text was updated successfully, but these errors were encountered: