From b1fe47e94409d81924c8663f58fac97e66ab4527 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 14 Oct 2024 12:14:27 -0500 Subject: [PATCH] nak: Rename AtomType::F16x2 to F16v2 This is more consistent with the SrcType. Reviewed-by: Mel Henning Part-of: --- src/nouveau/compiler/nak/ir.rs | 8 ++++---- src/nouveau/compiler/nak/nvdisasm_tests.rs | 2 +- src/nouveau/compiler/nak/sm20.rs | 2 +- src/nouveau/compiler/nak/sm70_encode.rs | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/nouveau/compiler/nak/ir.rs b/src/nouveau/compiler/nak/ir.rs index bf0753b0295..f9247b3b2f4 100644 --- a/src/nouveau/compiler/nak/ir.rs +++ b/src/nouveau/compiler/nak/ir.rs @@ -2613,7 +2613,7 @@ impl MemAccess { #[allow(dead_code)] #[derive(Clone, Copy, Eq, Hash, PartialEq)] pub enum AtomType { - F16x2, + F16v2, U32, I32, F32, @@ -2650,7 +2650,7 @@ impl AtomType { pub fn bits(&self) -> usize { match self { - AtomType::F16x2 | AtomType::F32 => 32, + AtomType::F16v2 | AtomType::F32 => 32, AtomType::U32 | AtomType::I32 => 32, AtomType::U64 | AtomType::I64 | AtomType::F64 => 64, } @@ -2658,7 +2658,7 @@ impl AtomType { pub fn is_float(&self) -> bool { match self { - AtomType::F16x2 | AtomType::F32 | AtomType::F64 => true, + AtomType::F16v2 | AtomType::F32 | AtomType::F64 => true, AtomType::U32 | AtomType::I32 | AtomType::U64 | AtomType::I64 => { false } @@ -2669,7 +2669,7 @@ impl AtomType { impl fmt::Display for AtomType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - AtomType::F16x2 => write!(f, ".f16x2"), + AtomType::F16v2 => write!(f, ".f16v2"), AtomType::U32 => write!(f, ".u32"), AtomType::I32 => write!(f, ".i32"), AtomType::F32 => write!(f, ".f32"), diff --git a/src/nouveau/compiler/nak/nvdisasm_tests.rs b/src/nouveau/compiler/nak/nvdisasm_tests.rs index 120b36dc3c4..642c23b585e 100644 --- a/src/nouveau/compiler/nak/nvdisasm_tests.rs +++ b/src/nouveau/compiler/nak/nvdisasm_tests.rs @@ -297,7 +297,7 @@ pub fn test_ld_st_atom() { let order = MemOrder::Strong(MemScope::CTA); let atom_types = [ - (AtomType::F16x2, ".f16x2.rn"), + (AtomType::F16v2, ".f16v2.rn"), (AtomType::U32, ""), (AtomType::I32, ".s32"), (AtomType::F32, ".f32.ftz.rn"), diff --git a/src/nouveau/compiler/nak/sm20.rs b/src/nouveau/compiler/nak/sm20.rs index 2a0ebcabc76..c2bdf05152f 100644 --- a/src/nouveau/compiler/nak/sm20.rs +++ b/src/nouveau/compiler/nak/sm20.rs @@ -2500,7 +2500,7 @@ impl SM20Op for OpAtom { e.set_field(5..9, op); let typ = match self.atom_type { - AtomType::F16x2 => panic!("Unsupported atomic type"), + AtomType::F16v2 => panic!("Unsupported atomic type"), // AtomType::U8 => 0x0_u8, // AtomType::I8 => 0x1_u8, // AtomType::U16 => 0x2_u8, diff --git a/src/nouveau/compiler/nak/sm70_encode.rs b/src/nouveau/compiler/nak/sm70_encode.rs index e33f26362f7..438392f6e6d 100644 --- a/src/nouveau/compiler/nak/sm70_encode.rs +++ b/src/nouveau/compiler/nak/sm70_encode.rs @@ -3486,10 +3486,10 @@ impl SM70Encoder<'_> { self.set_field( 73..77, match atom_type { - AtomType::F16x2 => 0_u8, + AtomType::F16v2 => 0_u8, // f16x4 => 1 // f16x8 => 2 - // bf16x2 => 3 + // bf16v2 => 3 // bf16x4 => 4 // bf16x8 => 5 AtomType::F32 => 9_u8, // .ftz @@ -3515,7 +3515,7 @@ impl SM70Encoder<'_> { AtomType::I32 => 1_u8, AtomType::U64 => 2_u8, AtomType::F32 => 3_u8, - AtomType::F16x2 => 4_u8, + AtomType::F16v2 => 4_u8, AtomType::I64 => 5_u8, AtomType::F64 => 6_u8, },