OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

How to disable auto-vectorization?

ardiyu07
Beginner
193 Views

How do you disable auto-vectorization? Meaning that even when I declare typen (float4, int4, etc) variables, the compiler won't do any implicit vectorazation for the code, since what I've found in this thread:
http://software.intel.com/en-us/forums/topic/281812

seems like declaring __attribute__((vec_type_hint(float))) does not do anything such..

0 Kudos
1 Solution
Raghupathi_M_Intel
193 Views
Do you want to disable just auto-vectorization or all optimizations? You can use -cl-opt-disable to disable all optimizations (incl. auto-vec). From the SDK documentation, vec_type_hint doesnt disable auto-vectorization, instead it tells the vectorization module to apply transformation to a particular type. Thanks, Raghu

View solution in original post

1 Reply
Raghupathi_M_Intel
194 Views
Do you want to disable just auto-vectorization or all optimizations? You can use -cl-opt-disable to disable all optimizations (incl. auto-vec). From the SDK documentation, vec_type_hint doesnt disable auto-vectorization, instead it tells the vectorization module to apply transformation to a particular type. Thanks, Raghu
Reply