1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Original PTX specification:
//!
//! stmatrix.sync.aligned.shape.num{.trans}{.ss}.type [p], r;
//! .shape = {.m8n8, .m16n8};
//! .num = {.x1, .x2, .x4};
//! .ss = {.shared, .shared::cta};
//! .type = {.b16, .b8};
#![allow(unused)]
use crate::lexer::PtxToken;
use crate::unparser::{PtxUnparser, common::*};
pub mod section_0 {
use super::*;
use crate::r#type::instruction::stmatrix::section_0::*;
impl PtxUnparser for StmatrixSyncAlignedShapeNumTransSsType {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "stmatrix");
push_directive(tokens, "sync");
push_directive(tokens, "aligned");
match &self.shape {
Shape::M16n8 => {
push_directive(tokens, "m16n8");
}
Shape::M8n8 => {
push_directive(tokens, "m8n8");
}
}
match &self.num {
Num::X1 => {
push_directive(tokens, "x1");
}
Num::X2 => {
push_directive(tokens, "x2");
}
Num::X4 => {
push_directive(tokens, "x4");
}
}
if self.trans {
push_directive(tokens, "trans");
}
if let Some(ss_0) = self.ss.as_ref() {
match ss_0 {
Ss::SharedCta => {
push_directive(tokens, "shared::cta");
}
Ss::Shared => {
push_directive(tokens, "shared");
}
}
}
match &self.type_ {
Type::B16 => {
push_directive(tokens, "b16");
}
Type::B8 => {
push_directive(tokens, "b8");
}
}
self.p.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.r.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
}