From f8409f18927391cf803476fb7427ac7811d2355f Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 19 Mar 2025 10:08:19 -0500 Subject: [PATCH] nak: hsetp2 and dsetp are slower on Volta Part-of: --- src/nouveau/compiler/nak/calc_instr_deps.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/nouveau/compiler/nak/calc_instr_deps.rs b/src/nouveau/compiler/nak/calc_instr_deps.rs index aef06d9de56..55740c8cc85 100644 --- a/src/nouveau/compiler/nak/calc_instr_deps.rs +++ b/src/nouveau/compiler/nak/calc_instr_deps.rs @@ -521,7 +521,12 @@ fn instr_latency(sm: u8, op: &Op, dst_idx: usize) -> u32 { | Op::HMul2(_) | Op::HSet2(_) | Op::HSetP2(_) - | Op::HMnMx2(_) => (13, 14), + | Op::HMnMx2(_) => if sm == 70 { + // Volta is even slower + (13, 15) + } else { + (13, 14) + } _ => (6, 13) } } else { @@ -578,8 +583,15 @@ fn waw_latency( } /// Predicate read-after-write latency -fn paw_latency(_sm: u8, _write: &Op, _dst_idx: usize) -> u32 { - 13 +fn paw_latency(sm: u8, write: &Op, _dst_idx: usize) -> u32 { + if sm == 70 { + match write { + Op::DSetP(_) | Op::HSetP2(_) => 15, + _ => 13, + } + } else { + 13 + } } fn calc_delays(f: &mut Function, sm: &dyn ShaderModel) {