nak: Rename AtomType::F16x2 to F16v2

This is more consistent with the SrcType.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
This commit is contained in:
Faith Ekstrand 2024-10-14 12:14:27 -05:00 committed by Marge Bot
parent 0e7eda7f23
commit b1fe47e944
4 changed files with 9 additions and 9 deletions

View file

@ -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"),

View file

@ -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"),

View file

@ -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,

View file

@ -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,
},