[PATCH] D103695: [WIP][RFC][Utils] Helper script to check sanity of cost tables vs scheduler models
Haohai, Wen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 23 01:36:25 PDT 2021
HaohaiWen added a comment.
I think we can't completely trust reversed throughput reported by llvm-mca since some instructions' Rthroughput is not defined correctly in schedmodel.
e.g.
$./llvm_utils_check_cost_tables.py --cpulevel=avx512 --stop-on-diff
double fdiv double: cost (4.0 - 4.0) vs recipthroughput (3 - 3)
skylake-avx512 : 4.0 vs 3
defines in X86SchedSkylakeServer.td:
def SKXWriteResGroup184 : SchedWriteRes<[SKXPort0,SKXFPDivider]> {
let Latency = 14;
let NumMicroOps = 1;
let ResourceCycles = [1,3];
}
def : SchedAlias<WriteFDiv64, SKXWriteResGroup184>; // TODO - convert to ZnWriteResFpuPair
However, it's measured tpt is 4 from uops.info <https://uops.info/table.html?search=vdivsd&cb_lat=on&cb_tp=on&cb_uops=on&cb_ports=on&cb_SKX=on&cb_measurements=on&cb_doc=on&cb_base=on&cb_avx=on&cb_avx2=on&cb_avx512=on>. llvm-exegesis tpt result is also 4.
I think uops.info/agner.org should be more accurate.
Have you verified cost diff based on uops.info/anger.org?
We have seen some regression on our internal benchmarks due to TTI cost-model patches based on this tool...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103695/new/
https://reviews.llvm.org/D103695
More information about the llvm-commits
mailing list