Skip to content

Vectorization issue Intel compiler #308

Open
@EnricoDeg

Description

Hello, I'm having problem vectorizing this very simple loop where dolic_c and tke_Lmix are mdspan objects:

for (int jc = start_index; jc <= end_index; jc++)
    tke_Lmix(blockNo, dolic_c(blockNo, jc), jc) = 0.0;

I'm using intel compiler and from the report I get the following output:

   remark #15389: vectorization support: reference dolic_c.__members.__members[blockNo*dolic_c.__members.__members.__members.__members.__members.__members.__members[1]+jc] has unaligned access   [ /home/k/k202136/YAOP/src/backends/CPU/cpu_kernels.hpp(68,38) ]
   remark #15381: vectorization support: unaligned access used inside loop body
   remark #15335: loop was not vectorized: vectorization possible but seems inefficient. Use vector always directive or -vec-threshold0 to override
   remark #15329: vectorization support: irregularly indexed store was emulated for the variable <tke_Lmix.__members.__members[(blockNo*tke_Lmix.__members.__membe>, part of index is read from memory   [ /home/k/k202136/YAOP/src/backends/CPU/cpu_kernels.hpp(68,21) ]
   remark #15305: vectorization support: vector length 4
   remark #15309: vectorization support: normalized vectorization overhead 0.049
   remark #15450: unmasked unaligned unit stride loads: 1
   remark #15463: unmasked indexed (or scatter) stores: 1
   remark #15475: --- begin vector cost summary ---
   remark #15476: scalar cost: 11
   remark #15477: vector cost: 25.750
   remark #15478: estimated potential speedup: 0.420
   remark #15488: --- end vector cost summary ---
   remark #25439: unrolled with remainder by 2

I think that this is simple enough that should be handled by the compiler and I also don't understand the "irregularly indexed store" issue mentioned in the report

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions