It looks like you're new here. If you want to get involved, click one of these buttons!
I was just wondering if there was a way to output the successfully auto vectorized loops while compiling KL code? I've seen that LLVM have some flags related to that, but I can't find the option with KL tool.
Not sure it is possible to inspect this right now. Will ask the core team!
Technical Product Manager
Fabric Software Inc.
The only way I know how to do this right now is in the KL tool, and just looking at the output using the --asm flag. In general, however, I would recommend using the vecAdd etc. methods functions that are automatically created for structures whose members are all the same integer or floating-point type; this should guarantee that a vector operation is used if possible on the target hardware.
Hey @Peter Zion, I'm coming back to this, so I should look for xmm*, or ymm* instruction in the assembly is that right?
Also there shouldn't be any penalty of using them? I'm asking because I'm wondering why the math lib wasn't build with with them.
It's possible that there is a penalty for using them under certain circumstances where is would make the optimizer have trouble managing the use of the registers, but it's unlikely -- fortunately it's really easy to try it and compare. I'm not sure why the Math extension doesn't use them..
All right, thanks!
I'm also wondering how will it choose between sse and avx? is it based on the platform?
My CPU supports avx but only the xmm registers seems to be used.
©Copyright 2017 Fabric Software Inc. All rights reserved. | Privacy