Provide hints for parallelization #522

Closed
opened 7 years ago by wolfbeast · 5 comments
wolfbeast commented 7 years ago (Migrated from github.com)

Although the auto-parallelizer in MSVC will analyze and decide automatically, it's very conservative in where it applies multi-threading for multiple cores.

Providing hints with #pragma loop(hint_parallel(n)) and where needed re-ordering surrounding code or making it more parallel-friendly (e.g. duplicating scalar variables to exclusives) will help the compiler to make the right decision and parallelize where possible.

Although the auto-parallelizer in MSVC will analyze and decide automatically, it's very conservative in where it applies multi-threading for multiple cores. Providing hints with `#pragma loop(hint_parallel(n))` and where needed re-ordering surrounding code or making it more parallel-friendly (e.g. duplicating scalar variables to exclusives) will help the compiler to make the right decision and parallelize where possible.
wolfbeast commented 7 years ago (Migrated from github.com)

Vectorization is already used and in many cases this is mutually exclusive. Parallel code often means SIMD instructions can't be used; this is an important performance balance to keep in mind.

It may be a good idea to run with the vectorization reporter enabled to see what loops are already vectorized by the compiler and target loops for parallelization that aren't, first.

Vectorization is already used and in many cases this is mutually exclusive. Parallel code often means SIMD instructions can't be used; this is an important performance balance to keep in mind. It may be a good idea to run with the vectorization reporter enabled to see what loops are already vectorized by the compiler and target loops for parallelization that aren't, first.
wolfbeast commented 7 years ago (Migrated from github.com)

Apparently, Qpar #pragmas require the inclusion of vcomp{nnn}.dll, likely for the CPU core detection routine and dispatcher code. this needs to be included in the build system (manually added for now before packaging)

Apparently, Qpar `#pragmas` require the inclusion of `vcomp{nnn}.dll`, likely for the CPU core detection routine and dispatcher code. this needs to be included in the build system (manually added for now before packaging)
mattatobin commented 7 years ago (Migrated from github.com)

Tycho's build system was updated to handle this in 993a7bc93c

Branch v26_Dev is WONTFIX unless I get bored
Branch v25_Dev is N/A

Tycho's build system was updated to handle this in 993a7bc93c1855b1d9dda3768cc32cf91a4f15ec Branch v26_Dev is WONTFIX unless I get bored Branch v25_Dev is N/A
wolfbeast commented 7 years ago (Migrated from github.com)

Branch v26_Dev is WONTFIX unless I get bored

Branch v26_Dev is a WONTFIX. I doubt I'll build much more on that and even if so, a manual copy (or not using -Qpar in a pinch) is easy enough.

> Branch v26_Dev is WONTFIX unless I get bored Branch v26_Dev is a WONTFIX. I doubt I'll build much more on that and even if so, a manual copy (or not using `-Qpar` in a pinch) is easy enough.
wolfbeast commented 6 years ago (Migrated from github.com)

Considering #915 we should remove the MSVC pragmas and replace them with standardized OpenMP pragmas.

Considering #915 we should remove the MSVC pragmas and replace them with standardized OpenMP pragmas.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MoonchildProductions/Pale-Moon#522
Loading…
There is no content yet.