[PATCH] D130797: [AMDGPU] Implement pipeline solver for non-trivial pipelines
Jeffrey Byrnes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 29 13:07:25 PDT 2022
jrbyrnes created this revision.
jrbyrnes added reviewers: kerbowa, rampitec, arsenm, vangthao95.
Herald added subscribers: kosarev, jsilvanus, foad, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
jrbyrnes requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Requested SchedGroup pipelines may be non-trivial to satisify. A minimimal example is if the requested pipeline is {2 VMEM, 2 VALU, 2 VMEM} and the original order of SUnits is {VMEM, VALU, VMEM, VALU, VMEM}. Because of existing dependencies, the choice of which SchedGroup the middle VMEM goes into impacts how closely we are able to match the requested pipeline. It seems minimizing the degree of misfit (as measured by the number of edges we can't add) w.r.t the choice we make when mapping an instruction -> SchedGroup is an NP problem. This patch implements the PipelineSolver class which produces a solution for the defined problem for the sched_group_barrier mutation. The solver has both an exponential time exact algorithm and a greedy algorithm. The patch includes some controls which allows the user to select the greedy/exact algorithm.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130797
Files:
llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp
llvm/test/CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
llvm/test/CodeGen/AMDGPU/sched-group-barrier-pre-RA.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130797.448704.patch
Type: text/x-patch
Size: 71205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220729/53d3683b/attachment.bin>
More information about the llvm-commits
mailing list