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.
1719 Discussions

Intel OpenCL auto-vectorization switch

vince_f_
Beginner
435 Views

Hi, I want to disable the auto-vectorization of OpenCL kernel on Xeon Phi, is there any way to do that?

0 Kudos
2 Replies
Yuri_K_Intel
Employee
435 Views

Hi,

You may specify __attribute__((vec_type_hint(<typen>))) where typen is some vector type (float3 or char4). Per documentation:

This attribute indicates to the vectorization module apply only transformations that are useful for this type.

So if you specify some type that your kernel is not using it will effectively disable vecorization.

Thanks,

Yuri

0 Kudos
vince_f_
Beginner
435 Views

I gotcha, Thanks!

0 Kudos
Reply