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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
//! Original PTX specification:
//!
//! sub.type d, a, b;
//! sub{.sat}.s32 d, a, b; // .sat applies only to .s32
//! .type = { .u16, .u32, .u64,
//! .s16, .s32, .s64 };
//! --------------------------------------------
//! sub{.rnd}{.ftz}{.sat}.f32 d, a, b;
//! sub{.rnd}{.ftz}.f32x2 d, a, b;
//! sub{.rnd}.f64 d, a, b;
//! .rnd = { .rn, .rz, .rm, .rp };
//! --------------------------------------------
//! sub{.rnd}{.ftz}{.sat}.f16 d, a, b;
//! sub{.rnd}{.ftz}{.sat}.f16x2 d, a, b;
//! sub{.rnd}.bf16 d, a, b;
//! sub{.rnd}.bf16x2 d, a, b;
//! .rnd = { .rn };
//! --------------------------------------------
//! sub{.rnd}{.sat}.f32.atype d, a, c;
//! .atype = { .f16, .bf16};
//! .rnd = { .rn, .rz, .rm, .rp };
#![allow(unused)]
use crate::r#type::common::*;
pub mod section_0 {
use crate::r#type::common::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Type {
U16, // .u16
U32, // .u32
U64, // .u64
S16, // .s16
S32, // .s32
S64, // .s64
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubType {
pub type_: Type, // .type
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubSatS32 {
pub sat: bool, // {.sat}
pub s32: (), // .s32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
}
pub mod section_1 {
use crate::r#type::common::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Rnd {
Rn, // .rn
Rz, // .rz
Rm, // .rm
Rp, // .rp
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndFtzSatF32 {
pub rnd: Option<Rnd>, // {.rnd}
pub ftz: bool, // {.ftz}
pub sat: bool, // {.sat}
pub f32: (), // .f32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndFtzF32x2 {
pub rnd: Option<Rnd>, // {.rnd}
pub ftz: bool, // {.ftz}
pub f32x2: (), // .f32x2
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndF64 {
pub rnd: Option<Rnd>, // {.rnd}
pub f64: (), // .f64
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
}
pub mod section_2 {
use crate::r#type::common::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Rnd {
Rn, // .rn
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndFtzSatF16 {
pub rnd: Option<Rnd>, // {.rnd}
pub ftz: bool, // {.ftz}
pub sat: bool, // {.sat}
pub f16: (), // .f16
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndFtzSatF16x2 {
pub rnd: Option<Rnd>, // {.rnd}
pub ftz: bool, // {.ftz}
pub sat: bool, // {.sat}
pub f16x2: (), // .f16x2
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndBf16 {
pub rnd: Option<Rnd>, // {.rnd}
pub bf16: (), // .bf16
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndBf16x2 {
pub rnd: Option<Rnd>, // {.rnd}
pub bf16x2: (), // .bf16x2
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
}
pub mod section_3 {
use crate::r#type::common::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Rnd {
Rn, // .rn
Rz, // .rz
Rm, // .rm
Rp, // .rp
}
#[derive(Debug, Clone, PartialEq)]
pub enum Atype {
Bf16, // .bf16
F16, // .f16
}
#[derive(Debug, Clone, PartialEq)]
pub struct SubRndSatF32Atype {
pub rnd: Option<Rnd>, // {.rnd}
pub sat: bool, // {.sat}
pub f32: (), // .f32
pub atype: Atype, // .atype
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub c: GeneralOperand, // c
}
}