| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Flang][OpenMP] Implement workdistribute construct lowering (#140523) This PR introduces a new pass "lower-workdistribute" Fortran array statements are lowered to fir as fir.do_loop unordered. "lower-workdistribute" pass works mainly on identifying "fir.do_loop unordered" that is nested in target{teams{workdistribute{fir.do_loop unordered}}} and lowers it to target{teams{parallel{wsloop{loop_nest}}}}. It hoists all the other ops outside target region. Relaces heap allocation on target with omp.target_allocmem and deallocation with omp.target_freemem from host. Also replaces runtime function "Assign" with omp.target_memcpy from host. This pass implements following rewrites and optimisations: - **FissionWorkdistribute**: finds the parallelizable ops within teams {workdistribute} region and moves them to their own teams{workdistribute} region. - **WorkdistributeRuntimeCallLower**: finds the FortranAAssign calls nested in teams {workdistribute{}} and lowers it to unordered do loop if src is scalar and dest is array. Other runtime calls are not handled currently. - **WorkdistributeDoLower**: finds the fir.do_loop unoredered nested in teams {workdistribute{fir.do_loop unoredered}} and lowers it to teams {parallel { distribute {wsloop {loop_nest}}}}. - **TeamsWorkdistributeToSingle**: hoists all the ops inside teams {workdistribute{}} before teams op. The work in this PR is C-P and updated from @ivanradanov commits from coexecute implementation: [flang_workdistribute_iwomp_2024](https://github.com/ivanradanov/llvm-project/commits/flang_workdistribute_iwomp_2024) Paper related to this work by @ivanradanov ["Automatic Parallelization and OpenMP Offloadingof Fortran Array Notation"](https://www.osti.gov/servlets/purl/[2449728](https://www.osti.gov/servlets/purl/2449728)) | 9 个月前 | |
[Flang][OpenMP][Dialect] Swap to using MLIR dialect enum to encode map flags (#164043) This PR shifts from using the LLVM OpenMP enumerator bit flags to an OpenMP dialect specific enumerator. This allows us to better represent map types that wouldn't be of interest to the LLVM backend and runtime in the dialect. Primarily things like ref_ptr/ref_ptee/ref_ptr_ptee/atach_none/attach_always/attach_auto which are of interest to the compiler for certrain transformations (primarily in the FIR transformation passes dealing with mapping), but the runtime has no need to know about them. It also means if another OpenMP implementation comes along they won't need to stick to the same bit flag system LLVM chose/do leg work to address it. | 9 个月前 | |
[Flang][OpenMP][Dialect] Swap to using MLIR dialect enum to encode map flags (#164043) This PR shifts from using the LLVM OpenMP enumerator bit flags to an OpenMP dialect specific enumerator. This allows us to better represent map types that wouldn't be of interest to the LLVM backend and runtime in the dialect. Primarily things like ref_ptr/ref_ptee/ref_ptr_ptee/atach_none/attach_always/attach_auto which are of interest to the compiler for certrain transformations (primarily in the FIR transformation passes dealing with mapping), but the runtime has no need to know about them. It also means if another OpenMP implementation comes along they won't need to stick to the same bit flag system LLVM chose/do leg work to address it. | 9 个月前 | |
[Flang][OpenMP] Implement workdistribute construct lowering (#140523) This PR introduces a new pass "lower-workdistribute" Fortran array statements are lowered to fir as fir.do_loop unordered. "lower-workdistribute" pass works mainly on identifying "fir.do_loop unordered" that is nested in target{teams{workdistribute{fir.do_loop unordered}}} and lowers it to target{teams{parallel{wsloop{loop_nest}}}}. It hoists all the other ops outside target region. Relaces heap allocation on target with omp.target_allocmem and deallocation with omp.target_freemem from host. Also replaces runtime function "Assign" with omp.target_memcpy from host. This pass implements following rewrites and optimisations: - **FissionWorkdistribute**: finds the parallelizable ops within teams {workdistribute} region and moves them to their own teams{workdistribute} region. - **WorkdistributeRuntimeCallLower**: finds the FortranAAssign calls nested in teams {workdistribute{}} and lowers it to unordered do loop if src is scalar and dest is array. Other runtime calls are not handled currently. - **WorkdistributeDoLower**: finds the fir.do_loop unoredered nested in teams {workdistribute{fir.do_loop unoredered}} and lowers it to teams {parallel { distribute {wsloop {loop_nest}}}}. - **TeamsWorkdistributeToSingle**: hoists all the ops inside teams {workdistribute{}} before teams op. The work in this PR is C-P and updated from @ivanradanov commits from coexecute implementation: [flang_workdistribute_iwomp_2024](https://github.com/ivanradanov/llvm-project/commits/flang_workdistribute_iwomp_2024) Paper related to this work by @ivanradanov ["Automatic Parallelization and OpenMP Offloadingof Fortran Array Notation"](https://www.osti.gov/servlets/purl/[2449728](https://www.osti.gov/servlets/purl/2449728)) | 9 个月前 | |
[Flang][OpenMP] Implement workdistribute construct lowering (#140523) This PR introduces a new pass "lower-workdistribute" Fortran array statements are lowered to fir as fir.do_loop unordered. "lower-workdistribute" pass works mainly on identifying "fir.do_loop unordered" that is nested in target{teams{workdistribute{fir.do_loop unordered}}} and lowers it to target{teams{parallel{wsloop{loop_nest}}}}. It hoists all the other ops outside target region. Relaces heap allocation on target with omp.target_allocmem and deallocation with omp.target_freemem from host. Also replaces runtime function "Assign" with omp.target_memcpy from host. This pass implements following rewrites and optimisations: - **FissionWorkdistribute**: finds the parallelizable ops within teams {workdistribute} region and moves them to their own teams{workdistribute} region. - **WorkdistributeRuntimeCallLower**: finds the FortranAAssign calls nested in teams {workdistribute{}} and lowers it to unordered do loop if src is scalar and dest is array. Other runtime calls are not handled currently. - **WorkdistributeDoLower**: finds the fir.do_loop unoredered nested in teams {workdistribute{fir.do_loop unoredered}} and lowers it to teams {parallel { distribute {wsloop {loop_nest}}}}. - **TeamsWorkdistributeToSingle**: hoists all the ops inside teams {workdistribute{}} before teams op. The work in this PR is C-P and updated from @ivanradanov commits from coexecute implementation: [flang_workdistribute_iwomp_2024](https://github.com/ivanradanov/llvm-project/commits/flang_workdistribute_iwomp_2024) Paper related to this work by @ivanradanov ["Automatic Parallelization and OpenMP Offloadingof Fortran Array Notation"](https://www.osti.gov/servlets/purl/[2449728](https://www.osti.gov/servlets/purl/2449728)) | 9 个月前 | |
[Flang][OpenMP] Use internal linkage for OpenMP code-gen'ed helper functions (#117911) When compiling WORKSHARE construct in different compilation units, a linker error happened, when two equal WORKSHARE constructs with a copy operation have been compiled: `` /usr/bin/ld: module2.o: in function _workshare_copy_f64': FIRModule:(.text+0x0): multiple definition of _workshare_copy_f64'; module1.o:FIRModule:(.text+0x0): first defined here Reason is that the generate copy function has the wrong linkage: 0000000000000000 T _workshare_copy_f64 while it should be 0000000000000000 t _workshare_copy_f64 `` | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang][OpenMP] Fix handling of nested loop wrappers in LowerWorkshare (#117275) | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Lower omp.workshare to other omp constructs (#101446) Add a new pass that lowers an omp.workshare with its binding omp.workshare.loop_wrapper loop nests into other OpenMP constructs that can be lowered to LLVM. More specifically, in order to preserve the sequential execution semantics of the code contained, it wraps portions that needs to be executed on a single thread in omp.single blocks, converts code that must be parallelized into omp.wsloop nests and inserts the appropriate synchronization. | 1 年前 | |
[flang] Introduce hlfir.elemental lowerings to omp.workshare_loop_nest (#104748) This patch adds parallelization support for the following expression in OpenMP workshare constructs: * Elemental procedures in array expressions (reapplied with linking fix) | 1 年前 | |
[flang] Clean-up for fir.do_loop generation in lowering. (#160630) This patch changes two things: 1. We do not need to use the loop counter's last value for regular do-loops in Lowering. 2. The loop counter's increment is implied by fir.do_loop operation, so there is no need to increment it explicitly. The last point has been especially confusing to me, because it was unclear why we have an explicit increment if it is implied. It looks like CFGConversion somehow still makes the final code correct, i.e. the counter is not incremented twice. Anyway, the new lowering should look more concise. | 10 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 |