RAJA icon indicating copy to clipboard operation
RAJA copied to clipboard

Adds RAJA_ENABLE_SIMD CMake option

Open gzagaris opened this issue 2 years ago • 5 comments

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.

gzagaris avatar Jul 24 '22 00:07 gzagaris

This is a workaround for #1296. I thought it might be generally useful to have this option available in RAJA

gzagaris avatar Jul 24 '22 00:07 gzagaris

@ajkunen what do you think?

rhornung67 avatar Jul 24 '22 16:07 rhornung67

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.

Infinoid avatar Sep 13 '22 13:09 Infinoid

@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).

rchen20 avatar Oct 04 '22 03:10 rchen20

@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.

gzagaris avatar Oct 04 '22 12:10 gzagaris

Closing as this was addressed in https://github.com/LLNL/RAJA/pull/1339

rhornung67 avatar Oct 11 '22 17:10 rhornung67