From b5e657da48b73411870aa68b052d02db9de92b8f Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 9 May 2025 20:50:31 -0400 Subject: [PATCH] nak/sm70: Don't set a predicate destination on redg Reduction ops don't return anything, including predicates. On Turing through Hopper, this doesn't matter because these bits are ignored. However, Blackwell uses those bits to adjust address calculations for reduction ops. Part-of: --- src/nouveau/compiler/nak/sm70_encode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nouveau/compiler/nak/sm70_encode.rs b/src/nouveau/compiler/nak/sm70_encode.rs index e72d4f516c2..85c62c5d56f 100644 --- a/src/nouveau/compiler/nak/sm70_encode.rs +++ b/src/nouveau/compiler/nak/sm70_encode.rs @@ -3098,6 +3098,7 @@ impl SM70Op for OpAtom { assert!(cmp_src == AtomCmpSrc::Separate); e.set_reg_src(32..40, &self.cmpr); e.set_reg_src(64..72, &self.data); + e.set_pred_dst(81..84, &Dst::None); } else { if e.sm >= 90 && self.atom_type.is_float() { e.set_opcode(0x3a3); @@ -3106,11 +3107,10 @@ impl SM70Op for OpAtom { } e.set_reg_src(32..40, &self.data); + e.set_pred_dst(81..84, &Dst::None); e.set_atom_op(87..91, self.atom_op); } - e.set_pred_dst(81..84, &Dst::None); - e.set_field( 72..73, match self.mem_space.addr_type() {