[llvm-branch-commits] [llvm] [AMDGPU] Add block carried latency to CoExecSched (PR #187413)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 24 15:58:10 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.h llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp llvm/lib/Target/AMDGPU/GCNSchedStrategy.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
index 9e070dbde..8cfb6e5fb 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
@@ -400,7 +400,8 @@ bool CandidateHeuristics::tryEffectiveStall(
unsigned CarriedLatency = CarriedLatencies.lookup_or(SU->getInstr(), 0);
Costs.Carried = CarriedLatency > CurrCycle ? CarriedLatency - CurrCycle : 0;
- Costs.Effective = std::max({Costs.Ready, Costs.Structural, Costs.Latency, Costs.Carried});
+ Costs.Effective =
+ std::max({Costs.Ready, Costs.Structural, Costs.Latency, Costs.Carried});
return Costs;
};
@@ -410,13 +411,15 @@ bool CandidateHeuristics::tryEffectiveStall(
LLVM_DEBUG(if (TryCosts.Effective || CandCosts.Effective) {
dbgs() << "Effective stalls: try=" << TryCosts.Effective
<< " (ready=" << TryCosts.Ready << ", struct=" << TryCosts.Structural
- << ", lat=" << TryCosts.Latency << ", carried=" << TryCosts.Carried << ") cand=" << CandCosts.Effective
- << " (ready=" << CandCosts.Ready
- << ", struct=" << CandCosts.Structural << ", carried=" << CandCosts.Carried
- << ", lat=" << CandCosts.Latency << ")\n";
+ << ", lat=" << TryCosts.Latency << ", carried=" << TryCosts.Carried
+ << ") cand=" << CandCosts.Effective << " (ready=" << CandCosts.Ready
+ << ", struct=" << CandCosts.Structural
+ << ", carried=" << CandCosts.Carried << ", lat=" << CandCosts.Latency
+ << ")\n";
});
- return tryLess(TryCosts.Effective, CandCosts.Effective, TryCand, Cand, AMDGPUCoExecSchedStrategy::Stall);
+ return tryLess(TryCosts.Effective, CandCosts.Effective, TryCand, Cand,
+ AMDGPUCoExecSchedStrategy::Stall);
}
bool CandidateHeuristics::tryCriticalResourceDependency(
``````````
</details>
https://github.com/llvm/llvm-project/pull/187413
More information about the llvm-branch-commits
mailing list