RAJA
RAJA copied to clipboard
Adds RAJA_ENABLE_SIMD CMake option
Summary
Adds a new CMake option, RAJA_ENABLE_SIMD, which can be used to disable the SIMD/SIMT vectorization features in RAJA. By default, the new option is enabled to preserve the current behavior.
This is a workaround for #1296. I thought it might be generally useful to have this option available in RAJA
@ajkunen what do you think?
Note, I tried applying this as a workaround for a build issue I was having, and found that it did not work.
The issue I was trying to solve was nvcc complaining about the use of avx/avx2 vectors in cuda code. However, commenting out these simd/tensor includes disables much more than that; it also removes openmp and cuda stuff. So when I tried it, I got build failures due to a missing forall_impl
definition.
I guess in my case, I only wanted to disable vectorization, not other forms of parallelism. But I thought I should mention that this patch didn't build for me, when configured with -DRAJA_ENABLE_OPENMP=ON -DRAJA_ENABLE_CUDA=ON
.
@gzagaris Thanks for your help with this! I've incorporated most of your changes here https://github.com/LLNL/RAJA/pull/1339.
@Infinoid Thanks for reporting your experience. The latest PR here https://github.com/LLNL/RAJA/pull/1339 should likely work for you (it does not completely turn off all SIMD).
@gzagaris Thanks for your help with this! I've incorporated most of your changes here #1339.
Awesome! Thanks, @rchen20 -- I'll try it out once #1339 gets merged.
Closing as this was addressed in https://github.com/LLNL/RAJA/pull/1339