- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm often fighting with ICC not being able to vectorize something and it is really inconvenient to explore the logs having thousands of lines. Is there some pragma or something that would enable vectorization only on some part of the code of my choosing?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I try to use vecreport-file to get a separate report for each source file. This would be a reason for adhering to traditional limits on individual sources.
Another possibility (not the only one) is to set -no-vec and put pragma simd where you want to see vectorization.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the info, will try, not sure if any of the options will help though. Fortunately it's not a dealbreaker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vector Advisor really might help here:
https://software.intel.com/en-us/advisor_getting_started_intro
It tries to filter compiler logs in the right way:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if I will need to roll back my old box to win7 to use advisor. It looks somewhat promising if it weren't so difficult to get it running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aaaaha, so well, since it is part of the Composer product, does it work or doesn't it? :D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No it's part of parallel studio. They are working on it. They sent a python script which should unlock the current version for removal and reinstall . It doesn't run on either of my python installations. On win10 it hits permissions failures which presumably would be fixed if they begin to work on it for win10.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use for this purpose my own bash script (ran after link phase in project file). In the project I set that I want result redirect to .log file, and that script in case of error just outputs the result, so I see it in VS IDE. In case of success it greps for vectorization messages, sorts it and then greps for excluded and included messages. Filters for excludes and includes are just 2 text files, each phrase on a single line. The script is long like just 10 lines of bash code. It is not so hard when you know basics of Unix scripting. Unfortunately, you need cygwin or msys to run external bash script, as windows scripting features are so poor...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, in VS IDE, you can click into build log report, and pres Ctrl+f to find, or better Ctrl+i for incremental search.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, and I forgot, of course unfortunately you need to know line numbers of certain loop you want to inspect, e.g.:
2> c:\Users\...\....cpp(64,5):remark #15520: loop was not vectorized: loop with early exits cannot be vectorized unless it meets search loop idiom criteria
in this case it is file ....cpp line number 64, in my case there is a for() loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or you can always turn on in the project properties generation of assembler output (text file *.asm with assembly instructions and comments) and inspect it by searching for particular function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a simple suggestion for Intel to implement, but there may be an easy hack for you to accomplish this yourself.
This would be to have the vectorization report capture the #pragma message("***** Check this ****")
Or to add #pragma vector report message("looky here")
This way you can annotate the report.
The hack way, which I haven't explored, is to insert a piece of do nothing code that has the side effect of inserting something into the report that is useful as an annotation. An example might be to request something to be vectorized that you know cannot (and the report will indicate this). If you can do this with a #defined macro then you can easily enable/disable it.
Jim Demspey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good idea, though I'm not sure if it helps that much. The report will be full of "unsuccessful" vectorizations so...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
meldaproduction wrote:
Good idea, though I'm not sure if it helps that much. The report will be full of "unsuccessful" vectorizations so...
Yes, it will be so. But as I said you can always click into output box ("winlet"/"widget"/"sub-window") and press Ctrl+i for incremental search, and type immediately after Ctrl+i "Check this" or "*****" and you are on your way...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But beware when your function is auto-inlined or a templated function or inlined explicitly, or compiled with /Qipo, or in a header file included in more unit files, you might get multiple instances of these reports...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, meldaproduction
Please try option: -qopt-report-filter=string (Linux) or /Qopt-report-filter:string (Windows)
We start support this from 15.0, please find more details from 2015 user guide, see:
https://software.intel.com/en-us/node/524999
Hope this helps.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another option is: -qopt-report-routine=substring or /Qopt-report-routine:substring
See user guide: https://software.intel.com/en-us/node/525004
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
Here is a simple suggestion for Intel to implement, but there may be an easy hack for you to accomplish this yourself.
This would be to have the vectorization report capture the #pragma message("***** Check this ****")
Or to add #pragma vector report message("looky here")This way you can annotate the report.
The hack way, which I haven't explored, is to insert a piece of do nothing code that has the side effect of inserting something into the report that is useful as an annotation. An example might be to request something to be vectorized that you know cannot (and the report will indicate this). If you can do this with a #defined macro then you can easily enable/disable it.
Jim Demspey
- #pragma message("***** Check this ****"): it works only if you have not pre-compiled headers turned off, if you have it in header file included inside of them... so it is not suitable for release builds. E.g. my project is not suitable to run in Debug mode, since it is very slow there, since it's dependant on heavy optimizations, because it processes in real time the data, it is sound processing SW... I need to run in Release mode, and enable my own asserts to debug it, and it works fine then, but consuming only few extra percents of CPU...
- #pragma vector report message("looky here"): gives an error in MSVC 2013 ICC 15 as unknown pragma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir Polin (Intel) wrote:
Vector Advisor really might help here:
https://software.intel.com/en-us/advisor_getting_started_intro
It tries to filter compiler logs in the right way:)
The version posted 16 June 2015 appears to have resolved installation problems. I took the precaution of removing prior beta versions prior to install.
Compiler log filtering works only when main() and functions to be analyzed are built by the same Intel C++ version (15.0 or 16.0).
Advisor hasn't been made to work on Windows 10. As far as I could see, all the other tools are fine on win10.
Advisor runs with compilation by other compilers (I tested Microsoft and gnu) but of course it omits the features which depend on compile logs. You can see whether vector or fma code is executed by turning on asm view.
Advisor throws verbose warnings where it sees time spent in remainder loops, but I don't see these as posing a performance issue as long as they are vectorized remainders. It doesn't appear to be filtering on actual effectiveness of remainder loops, contrary to what is implied.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page