ptx_parser/unparser/instruction/
wmma_load.rs

1//! Original PTX specification:
2//!
3//! // Floating point format .f16 loads:
4//! wmma.load.a.sync.aligned.layout.shape{.ss}.atype r, [p] {, stride};
5//! wmma.load.b.sync.aligned.layout.shape{.ss}.btype r, [p] {, stride};
6//! wmma.load.c.sync.aligned.layout.shape{.ss}.ctype r, [p] {, stride};
7//! .layout = {.row, .col};
8//! .shape  = {.m16n16k16, .m8n32k16, .m32n8k16};
9//! .ss     = {.global, .shared, .shared::cta};
10//! .atype  = {.f16, .s8, .u8};
11//! .btype  = {.f16, .s8, .u8};
12//! .ctype  = {.f16, .f32, .s32};
13//! ----------------------------------------------------------------
14//! // Alternate floating point format .bf16 loads:
15//! wmma.load.a.sync.aligned.layout.shape{.ss}.atype r, [p] {, stride};
16//! wmma.load.b.sync.aligned.layout.shape{.ss}.btype r, [p] {, stride};
17//! wmma.load.c.sync.aligned.layout.shape{.ss}.ctype r, [p] {, stride};
18//! .layout = {.row, .col};
19//! .shape  = {.m16n16k16, .m8n32k16, .m32n8k16};
20//! .ss     = {.global, .shared, .shared::cta};
21//! .atype  = {.bf16 };
22//! .btype  = {.bf16 };
23//! .ctype  = {.f32 };
24//! ----------------------------------------------------------------
25//! // Alternate floating point format .tf32 loads:
26//! wmma.load.a.sync.aligned.layout.shape{.ss}.atype r, [p] {, stride};
27//! wmma.load.b.sync.aligned.layout.shape{.ss}.btype r, [p] {, stride};
28//! wmma.load.c.sync.aligned.layout.shape{.ss}.ctype r, [p] {, stride};
29//! .layout = {.row, .col};
30//! .shape  = {.m16n16k8 };
31//! .ss     = {.global, .shared, .shared::cta};
32//! .atype  = {.tf32 };
33//! .btype  = {.tf32 };
34//! .ctype  = {.f32 };
35//! ----------------------------------------------------------------
36//! // Double precision Floating point .f64 loads:
37//! wmma.load.a.sync.aligned.layout.shape{.ss}.atype r, [p] {, stride};
38//! wmma.load.b.sync.aligned.layout.shape{.ss}.btype r, [p] {, stride};
39//! wmma.load.c.sync.aligned.layout.shape{.ss}.ctype r, [p] {, stride};
40//! .layout = {.row, .col};
41//! .shape  = {.m8n8k4 };
42//! .ss     = {.global, .shared, .shared::cta};
43//! .atype  = {.f64 };
44//! .btype  = {.f64 };
45//! .ctype  = {.f64 };
46//! ----------------------------------------------------------------
47//! // Sub-byte loads:
48//! wmma.load.a.sync.aligned.row.shape{.ss}.atype r, [p] {, stride};
49//! wmma.load.b.sync.aligned.col.shape{.ss}.btype r, [p] {, stride};
50//! wmma.load.c.sync.aligned.layout.shape{.ss}.ctype r, [p] {, stride};
51//! .layout = {.row, .col};
52//! .shape  = {.m8n8k32};
53//! .ss     = {.global, .shared, .shared::cta};
54//! .atype  = {.s4, .u4};
55//! .btype  = {.s4, .u4};
56//! .ctype  = {.s32};
57//! ----------------------------------------------------------------
58//! // Single-bit loads:
59//! wmma.load.a.sync.aligned.row.shape{.ss}.atype r, [p] {, stride};
60//! wmma.load.b.sync.aligned.col.shape{.ss}.btype r, [p] {, stride};
61//! wmma.load.c.sync.aligned.layout.shape{.ss}.ctype r, [p] {, stride};
62//! .layout = {.row, .col};
63//! .shape  = {.m8n8k128};
64//! .ss     = {.global, .shared, .shared::cta};
65//! .atype  = {.b1};
66//! .btype  = {.b1};
67//! .ctype  = {.s32};
68
69#![allow(unused)]
70
71use crate::lexer::PtxToken;
72use crate::unparser::{PtxUnparser, common::*};
73
74pub mod section_0 {
75    use super::*;
76    use crate::r#type::instruction::wmma_load::section_0::*;
77
78    impl PtxUnparser for WmmaLoadASyncAlignedLayoutShapeSsAtype {
79        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
80            push_opcode(tokens, "wmma");
81            push_directive(tokens, "load");
82            push_directive(tokens, "a");
83            push_directive(tokens, "sync");
84            push_directive(tokens, "aligned");
85            match &self.layout {
86                Layout::Row => {
87                    push_directive(tokens, "row");
88                }
89                Layout::Col => {
90                    push_directive(tokens, "col");
91                }
92            }
93            match &self.shape {
94                Shape::M16n16k16 => {
95                    push_directive(tokens, "m16n16k16");
96                }
97                Shape::M8n32k16 => {
98                    push_directive(tokens, "m8n32k16");
99                }
100                Shape::M32n8k16 => {
101                    push_directive(tokens, "m32n8k16");
102                }
103            }
104            if let Some(ss_0) = self.ss.as_ref() {
105                match ss_0 {
106                    Ss::SharedCta => {
107                        push_directive(tokens, "shared::cta");
108                    }
109                    Ss::Global => {
110                        push_directive(tokens, "global");
111                    }
112                    Ss::Shared => {
113                        push_directive(tokens, "shared");
114                    }
115                }
116            }
117            match &self.atype {
118                Atype::F16 => {
119                    push_directive(tokens, "f16");
120                }
121                Atype::S8 => {
122                    push_directive(tokens, "s8");
123                }
124                Atype::U8 => {
125                    push_directive(tokens, "u8");
126                }
127            }
128            self.r.unparse_tokens(tokens);
129            tokens.push(PtxToken::Comma);
130            self.p.unparse_tokens(tokens);
131            if self.stride.is_some() {
132                tokens.push(PtxToken::Comma);
133            }
134            if let Some(opt_1) = self.stride.as_ref() {
135                opt_1.unparse_tokens(tokens);
136            }
137            tokens.push(PtxToken::Semicolon);
138        }
139    }
140
141    impl PtxUnparser for WmmaLoadBSyncAlignedLayoutShapeSsBtype {
142        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
143            push_opcode(tokens, "wmma");
144            push_directive(tokens, "load");
145            push_directive(tokens, "b");
146            push_directive(tokens, "sync");
147            push_directive(tokens, "aligned");
148            match &self.layout {
149                Layout::Row => {
150                    push_directive(tokens, "row");
151                }
152                Layout::Col => {
153                    push_directive(tokens, "col");
154                }
155            }
156            match &self.shape {
157                Shape::M16n16k16 => {
158                    push_directive(tokens, "m16n16k16");
159                }
160                Shape::M8n32k16 => {
161                    push_directive(tokens, "m8n32k16");
162                }
163                Shape::M32n8k16 => {
164                    push_directive(tokens, "m32n8k16");
165                }
166            }
167            if let Some(ss_2) = self.ss.as_ref() {
168                match ss_2 {
169                    Ss::SharedCta => {
170                        push_directive(tokens, "shared::cta");
171                    }
172                    Ss::Global => {
173                        push_directive(tokens, "global");
174                    }
175                    Ss::Shared => {
176                        push_directive(tokens, "shared");
177                    }
178                }
179            }
180            match &self.btype {
181                Btype::F16 => {
182                    push_directive(tokens, "f16");
183                }
184                Btype::S8 => {
185                    push_directive(tokens, "s8");
186                }
187                Btype::U8 => {
188                    push_directive(tokens, "u8");
189                }
190            }
191            self.r.unparse_tokens(tokens);
192            tokens.push(PtxToken::Comma);
193            self.p.unparse_tokens(tokens);
194            if self.stride.is_some() {
195                tokens.push(PtxToken::Comma);
196            }
197            if let Some(opt_3) = self.stride.as_ref() {
198                opt_3.unparse_tokens(tokens);
199            }
200            tokens.push(PtxToken::Semicolon);
201        }
202    }
203
204    impl PtxUnparser for WmmaLoadCSyncAlignedLayoutShapeSsCtype {
205        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
206            push_opcode(tokens, "wmma");
207            push_directive(tokens, "load");
208            push_directive(tokens, "c");
209            push_directive(tokens, "sync");
210            push_directive(tokens, "aligned");
211            match &self.layout {
212                Layout::Row => {
213                    push_directive(tokens, "row");
214                }
215                Layout::Col => {
216                    push_directive(tokens, "col");
217                }
218            }
219            match &self.shape {
220                Shape::M16n16k16 => {
221                    push_directive(tokens, "m16n16k16");
222                }
223                Shape::M8n32k16 => {
224                    push_directive(tokens, "m8n32k16");
225                }
226                Shape::M32n8k16 => {
227                    push_directive(tokens, "m32n8k16");
228                }
229            }
230            if let Some(ss_4) = self.ss.as_ref() {
231                match ss_4 {
232                    Ss::SharedCta => {
233                        push_directive(tokens, "shared::cta");
234                    }
235                    Ss::Global => {
236                        push_directive(tokens, "global");
237                    }
238                    Ss::Shared => {
239                        push_directive(tokens, "shared");
240                    }
241                }
242            }
243            match &self.ctype {
244                Ctype::F16 => {
245                    push_directive(tokens, "f16");
246                }
247                Ctype::F32 => {
248                    push_directive(tokens, "f32");
249                }
250                Ctype::S32 => {
251                    push_directive(tokens, "s32");
252                }
253            }
254            self.r.unparse_tokens(tokens);
255            tokens.push(PtxToken::Comma);
256            self.p.unparse_tokens(tokens);
257            if self.stride.is_some() {
258                tokens.push(PtxToken::Comma);
259            }
260            if let Some(opt_5) = self.stride.as_ref() {
261                opt_5.unparse_tokens(tokens);
262            }
263            tokens.push(PtxToken::Semicolon);
264        }
265    }
266}
267
268pub mod section_1 {
269    use super::*;
270    use crate::r#type::instruction::wmma_load::section_1::*;
271
272    impl PtxUnparser for WmmaLoadASyncAlignedLayoutShapeSsAtype1 {
273        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
274            push_opcode(tokens, "wmma");
275            push_directive(tokens, "load");
276            push_directive(tokens, "a");
277            push_directive(tokens, "sync");
278            push_directive(tokens, "aligned");
279            match &self.layout {
280                Layout::Row => {
281                    push_directive(tokens, "row");
282                }
283                Layout::Col => {
284                    push_directive(tokens, "col");
285                }
286            }
287            match &self.shape {
288                Shape::M16n16k16 => {
289                    push_directive(tokens, "m16n16k16");
290                }
291                Shape::M8n32k16 => {
292                    push_directive(tokens, "m8n32k16");
293                }
294                Shape::M32n8k16 => {
295                    push_directive(tokens, "m32n8k16");
296                }
297            }
298            if let Some(ss_6) = self.ss.as_ref() {
299                match ss_6 {
300                    Ss::SharedCta => {
301                        push_directive(tokens, "shared::cta");
302                    }
303                    Ss::Global => {
304                        push_directive(tokens, "global");
305                    }
306                    Ss::Shared => {
307                        push_directive(tokens, "shared");
308                    }
309                }
310            }
311            match &self.atype {
312                Atype::Bf16 => {
313                    push_directive(tokens, "bf16");
314                }
315            }
316            self.r.unparse_tokens(tokens);
317            tokens.push(PtxToken::Comma);
318            self.p.unparse_tokens(tokens);
319            if self.stride.is_some() {
320                tokens.push(PtxToken::Comma);
321            }
322            if let Some(opt_7) = self.stride.as_ref() {
323                opt_7.unparse_tokens(tokens);
324            }
325            tokens.push(PtxToken::Semicolon);
326        }
327    }
328
329    impl PtxUnparser for WmmaLoadBSyncAlignedLayoutShapeSsBtype1 {
330        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
331            push_opcode(tokens, "wmma");
332            push_directive(tokens, "load");
333            push_directive(tokens, "b");
334            push_directive(tokens, "sync");
335            push_directive(tokens, "aligned");
336            match &self.layout {
337                Layout::Row => {
338                    push_directive(tokens, "row");
339                }
340                Layout::Col => {
341                    push_directive(tokens, "col");
342                }
343            }
344            match &self.shape {
345                Shape::M16n16k16 => {
346                    push_directive(tokens, "m16n16k16");
347                }
348                Shape::M8n32k16 => {
349                    push_directive(tokens, "m8n32k16");
350                }
351                Shape::M32n8k16 => {
352                    push_directive(tokens, "m32n8k16");
353                }
354            }
355            if let Some(ss_8) = self.ss.as_ref() {
356                match ss_8 {
357                    Ss::SharedCta => {
358                        push_directive(tokens, "shared::cta");
359                    }
360                    Ss::Global => {
361                        push_directive(tokens, "global");
362                    }
363                    Ss::Shared => {
364                        push_directive(tokens, "shared");
365                    }
366                }
367            }
368            match &self.btype {
369                Btype::Bf16 => {
370                    push_directive(tokens, "bf16");
371                }
372            }
373            self.r.unparse_tokens(tokens);
374            tokens.push(PtxToken::Comma);
375            self.p.unparse_tokens(tokens);
376            if self.stride.is_some() {
377                tokens.push(PtxToken::Comma);
378            }
379            if let Some(opt_9) = self.stride.as_ref() {
380                opt_9.unparse_tokens(tokens);
381            }
382            tokens.push(PtxToken::Semicolon);
383        }
384    }
385
386    impl PtxUnparser for WmmaLoadCSyncAlignedLayoutShapeSsCtype1 {
387        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
388            push_opcode(tokens, "wmma");
389            push_directive(tokens, "load");
390            push_directive(tokens, "c");
391            push_directive(tokens, "sync");
392            push_directive(tokens, "aligned");
393            match &self.layout {
394                Layout::Row => {
395                    push_directive(tokens, "row");
396                }
397                Layout::Col => {
398                    push_directive(tokens, "col");
399                }
400            }
401            match &self.shape {
402                Shape::M16n16k16 => {
403                    push_directive(tokens, "m16n16k16");
404                }
405                Shape::M8n32k16 => {
406                    push_directive(tokens, "m8n32k16");
407                }
408                Shape::M32n8k16 => {
409                    push_directive(tokens, "m32n8k16");
410                }
411            }
412            if let Some(ss_10) = self.ss.as_ref() {
413                match ss_10 {
414                    Ss::SharedCta => {
415                        push_directive(tokens, "shared::cta");
416                    }
417                    Ss::Global => {
418                        push_directive(tokens, "global");
419                    }
420                    Ss::Shared => {
421                        push_directive(tokens, "shared");
422                    }
423                }
424            }
425            match &self.ctype {
426                Ctype::F32 => {
427                    push_directive(tokens, "f32");
428                }
429            }
430            self.r.unparse_tokens(tokens);
431            tokens.push(PtxToken::Comma);
432            self.p.unparse_tokens(tokens);
433            if self.stride.is_some() {
434                tokens.push(PtxToken::Comma);
435            }
436            if let Some(opt_11) = self.stride.as_ref() {
437                opt_11.unparse_tokens(tokens);
438            }
439            tokens.push(PtxToken::Semicolon);
440        }
441    }
442}
443
444pub mod section_2 {
445    use super::*;
446    use crate::r#type::instruction::wmma_load::section_2::*;
447
448    impl PtxUnparser for WmmaLoadASyncAlignedLayoutShapeSsAtype2 {
449        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
450            push_opcode(tokens, "wmma");
451            push_directive(tokens, "load");
452            push_directive(tokens, "a");
453            push_directive(tokens, "sync");
454            push_directive(tokens, "aligned");
455            match &self.layout {
456                Layout::Row => {
457                    push_directive(tokens, "row");
458                }
459                Layout::Col => {
460                    push_directive(tokens, "col");
461                }
462            }
463            match &self.shape {
464                Shape::M16n16k8 => {
465                    push_directive(tokens, "m16n16k8");
466                }
467            }
468            if let Some(ss_12) = self.ss.as_ref() {
469                match ss_12 {
470                    Ss::SharedCta => {
471                        push_directive(tokens, "shared::cta");
472                    }
473                    Ss::Global => {
474                        push_directive(tokens, "global");
475                    }
476                    Ss::Shared => {
477                        push_directive(tokens, "shared");
478                    }
479                }
480            }
481            match &self.atype {
482                Atype::Tf32 => {
483                    push_directive(tokens, "tf32");
484                }
485            }
486            self.r.unparse_tokens(tokens);
487            tokens.push(PtxToken::Comma);
488            self.p.unparse_tokens(tokens);
489            if self.stride.is_some() {
490                tokens.push(PtxToken::Comma);
491            }
492            if let Some(opt_13) = self.stride.as_ref() {
493                opt_13.unparse_tokens(tokens);
494            }
495            tokens.push(PtxToken::Semicolon);
496        }
497    }
498
499    impl PtxUnparser for WmmaLoadBSyncAlignedLayoutShapeSsBtype2 {
500        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
501            push_opcode(tokens, "wmma");
502            push_directive(tokens, "load");
503            push_directive(tokens, "b");
504            push_directive(tokens, "sync");
505            push_directive(tokens, "aligned");
506            match &self.layout {
507                Layout::Row => {
508                    push_directive(tokens, "row");
509                }
510                Layout::Col => {
511                    push_directive(tokens, "col");
512                }
513            }
514            match &self.shape {
515                Shape::M16n16k8 => {
516                    push_directive(tokens, "m16n16k8");
517                }
518            }
519            if let Some(ss_14) = self.ss.as_ref() {
520                match ss_14 {
521                    Ss::SharedCta => {
522                        push_directive(tokens, "shared::cta");
523                    }
524                    Ss::Global => {
525                        push_directive(tokens, "global");
526                    }
527                    Ss::Shared => {
528                        push_directive(tokens, "shared");
529                    }
530                }
531            }
532            match &self.btype {
533                Btype::Tf32 => {
534                    push_directive(tokens, "tf32");
535                }
536            }
537            self.r.unparse_tokens(tokens);
538            tokens.push(PtxToken::Comma);
539            self.p.unparse_tokens(tokens);
540            if self.stride.is_some() {
541                tokens.push(PtxToken::Comma);
542            }
543            if let Some(opt_15) = self.stride.as_ref() {
544                opt_15.unparse_tokens(tokens);
545            }
546            tokens.push(PtxToken::Semicolon);
547        }
548    }
549
550    impl PtxUnparser for WmmaLoadCSyncAlignedLayoutShapeSsCtype2 {
551        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
552            push_opcode(tokens, "wmma");
553            push_directive(tokens, "load");
554            push_directive(tokens, "c");
555            push_directive(tokens, "sync");
556            push_directive(tokens, "aligned");
557            match &self.layout {
558                Layout::Row => {
559                    push_directive(tokens, "row");
560                }
561                Layout::Col => {
562                    push_directive(tokens, "col");
563                }
564            }
565            match &self.shape {
566                Shape::M16n16k8 => {
567                    push_directive(tokens, "m16n16k8");
568                }
569            }
570            if let Some(ss_16) = self.ss.as_ref() {
571                match ss_16 {
572                    Ss::SharedCta => {
573                        push_directive(tokens, "shared::cta");
574                    }
575                    Ss::Global => {
576                        push_directive(tokens, "global");
577                    }
578                    Ss::Shared => {
579                        push_directive(tokens, "shared");
580                    }
581                }
582            }
583            match &self.ctype {
584                Ctype::F32 => {
585                    push_directive(tokens, "f32");
586                }
587            }
588            self.r.unparse_tokens(tokens);
589            tokens.push(PtxToken::Comma);
590            self.p.unparse_tokens(tokens);
591            if self.stride.is_some() {
592                tokens.push(PtxToken::Comma);
593            }
594            if let Some(opt_17) = self.stride.as_ref() {
595                opt_17.unparse_tokens(tokens);
596            }
597            tokens.push(PtxToken::Semicolon);
598        }
599    }
600}
601
602pub mod section_3 {
603    use super::*;
604    use crate::r#type::instruction::wmma_load::section_3::*;
605
606    impl PtxUnparser for WmmaLoadASyncAlignedLayoutShapeSsAtype3 {
607        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
608            push_opcode(tokens, "wmma");
609            push_directive(tokens, "load");
610            push_directive(tokens, "a");
611            push_directive(tokens, "sync");
612            push_directive(tokens, "aligned");
613            match &self.layout {
614                Layout::Row => {
615                    push_directive(tokens, "row");
616                }
617                Layout::Col => {
618                    push_directive(tokens, "col");
619                }
620            }
621            match &self.shape {
622                Shape::M8n8k4 => {
623                    push_directive(tokens, "m8n8k4");
624                }
625            }
626            if let Some(ss_18) = self.ss.as_ref() {
627                match ss_18 {
628                    Ss::SharedCta => {
629                        push_directive(tokens, "shared::cta");
630                    }
631                    Ss::Global => {
632                        push_directive(tokens, "global");
633                    }
634                    Ss::Shared => {
635                        push_directive(tokens, "shared");
636                    }
637                }
638            }
639            match &self.atype {
640                Atype::F64 => {
641                    push_directive(tokens, "f64");
642                }
643            }
644            self.r.unparse_tokens(tokens);
645            tokens.push(PtxToken::Comma);
646            self.p.unparse_tokens(tokens);
647            if self.stride.is_some() {
648                tokens.push(PtxToken::Comma);
649            }
650            if let Some(opt_19) = self.stride.as_ref() {
651                opt_19.unparse_tokens(tokens);
652            }
653            tokens.push(PtxToken::Semicolon);
654        }
655    }
656
657    impl PtxUnparser for WmmaLoadBSyncAlignedLayoutShapeSsBtype3 {
658        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
659            push_opcode(tokens, "wmma");
660            push_directive(tokens, "load");
661            push_directive(tokens, "b");
662            push_directive(tokens, "sync");
663            push_directive(tokens, "aligned");
664            match &self.layout {
665                Layout::Row => {
666                    push_directive(tokens, "row");
667                }
668                Layout::Col => {
669                    push_directive(tokens, "col");
670                }
671            }
672            match &self.shape {
673                Shape::M8n8k4 => {
674                    push_directive(tokens, "m8n8k4");
675                }
676            }
677            if let Some(ss_20) = self.ss.as_ref() {
678                match ss_20 {
679                    Ss::SharedCta => {
680                        push_directive(tokens, "shared::cta");
681                    }
682                    Ss::Global => {
683                        push_directive(tokens, "global");
684                    }
685                    Ss::Shared => {
686                        push_directive(tokens, "shared");
687                    }
688                }
689            }
690            match &self.btype {
691                Btype::F64 => {
692                    push_directive(tokens, "f64");
693                }
694            }
695            self.r.unparse_tokens(tokens);
696            tokens.push(PtxToken::Comma);
697            self.p.unparse_tokens(tokens);
698            if self.stride.is_some() {
699                tokens.push(PtxToken::Comma);
700            }
701            if let Some(opt_21) = self.stride.as_ref() {
702                opt_21.unparse_tokens(tokens);
703            }
704            tokens.push(PtxToken::Semicolon);
705        }
706    }
707
708    impl PtxUnparser for WmmaLoadCSyncAlignedLayoutShapeSsCtype3 {
709        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
710            push_opcode(tokens, "wmma");
711            push_directive(tokens, "load");
712            push_directive(tokens, "c");
713            push_directive(tokens, "sync");
714            push_directive(tokens, "aligned");
715            match &self.layout {
716                Layout::Row => {
717                    push_directive(tokens, "row");
718                }
719                Layout::Col => {
720                    push_directive(tokens, "col");
721                }
722            }
723            match &self.shape {
724                Shape::M8n8k4 => {
725                    push_directive(tokens, "m8n8k4");
726                }
727            }
728            if let Some(ss_22) = self.ss.as_ref() {
729                match ss_22 {
730                    Ss::SharedCta => {
731                        push_directive(tokens, "shared::cta");
732                    }
733                    Ss::Global => {
734                        push_directive(tokens, "global");
735                    }
736                    Ss::Shared => {
737                        push_directive(tokens, "shared");
738                    }
739                }
740            }
741            match &self.ctype {
742                Ctype::F64 => {
743                    push_directive(tokens, "f64");
744                }
745            }
746            self.r.unparse_tokens(tokens);
747            tokens.push(PtxToken::Comma);
748            self.p.unparse_tokens(tokens);
749            if self.stride.is_some() {
750                tokens.push(PtxToken::Comma);
751            }
752            if let Some(opt_23) = self.stride.as_ref() {
753                opt_23.unparse_tokens(tokens);
754            }
755            tokens.push(PtxToken::Semicolon);
756        }
757    }
758}
759
760pub mod section_4 {
761    use super::*;
762    use crate::r#type::instruction::wmma_load::section_4::*;
763
764    impl PtxUnparser for WmmaLoadASyncAlignedRowShapeSsAtype {
765        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
766            push_opcode(tokens, "wmma");
767            push_directive(tokens, "load");
768            push_directive(tokens, "a");
769            push_directive(tokens, "sync");
770            push_directive(tokens, "aligned");
771            push_directive(tokens, "row");
772            match &self.shape {
773                Shape::M8n8k32 => {
774                    push_directive(tokens, "m8n8k32");
775                }
776            }
777            if let Some(ss_24) = self.ss.as_ref() {
778                match ss_24 {
779                    Ss::SharedCta => {
780                        push_directive(tokens, "shared::cta");
781                    }
782                    Ss::Global => {
783                        push_directive(tokens, "global");
784                    }
785                    Ss::Shared => {
786                        push_directive(tokens, "shared");
787                    }
788                }
789            }
790            match &self.atype {
791                Atype::S4 => {
792                    push_directive(tokens, "s4");
793                }
794                Atype::U4 => {
795                    push_directive(tokens, "u4");
796                }
797            }
798            self.r.unparse_tokens(tokens);
799            tokens.push(PtxToken::Comma);
800            self.p.unparse_tokens(tokens);
801            if self.stride.is_some() {
802                tokens.push(PtxToken::Comma);
803            }
804            if let Some(opt_25) = self.stride.as_ref() {
805                opt_25.unparse_tokens(tokens);
806            }
807            tokens.push(PtxToken::Semicolon);
808        }
809    }
810
811    impl PtxUnparser for WmmaLoadBSyncAlignedColShapeSsBtype {
812        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
813            push_opcode(tokens, "wmma");
814            push_directive(tokens, "load");
815            push_directive(tokens, "b");
816            push_directive(tokens, "sync");
817            push_directive(tokens, "aligned");
818            push_directive(tokens, "col");
819            match &self.shape {
820                Shape::M8n8k32 => {
821                    push_directive(tokens, "m8n8k32");
822                }
823            }
824            if let Some(ss_26) = self.ss.as_ref() {
825                match ss_26 {
826                    Ss::SharedCta => {
827                        push_directive(tokens, "shared::cta");
828                    }
829                    Ss::Global => {
830                        push_directive(tokens, "global");
831                    }
832                    Ss::Shared => {
833                        push_directive(tokens, "shared");
834                    }
835                }
836            }
837            match &self.btype {
838                Btype::S4 => {
839                    push_directive(tokens, "s4");
840                }
841                Btype::U4 => {
842                    push_directive(tokens, "u4");
843                }
844            }
845            self.r.unparse_tokens(tokens);
846            tokens.push(PtxToken::Comma);
847            self.p.unparse_tokens(tokens);
848            if self.stride.is_some() {
849                tokens.push(PtxToken::Comma);
850            }
851            if let Some(opt_27) = self.stride.as_ref() {
852                opt_27.unparse_tokens(tokens);
853            }
854            tokens.push(PtxToken::Semicolon);
855        }
856    }
857
858    impl PtxUnparser for WmmaLoadCSyncAlignedLayoutShapeSsCtype4 {
859        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
860            push_opcode(tokens, "wmma");
861            push_directive(tokens, "load");
862            push_directive(tokens, "c");
863            push_directive(tokens, "sync");
864            push_directive(tokens, "aligned");
865            match &self.layout {
866                Layout::Row => {
867                    push_directive(tokens, "row");
868                }
869                Layout::Col => {
870                    push_directive(tokens, "col");
871                }
872            }
873            match &self.shape {
874                Shape::M8n8k32 => {
875                    push_directive(tokens, "m8n8k32");
876                }
877            }
878            if let Some(ss_28) = self.ss.as_ref() {
879                match ss_28 {
880                    Ss::SharedCta => {
881                        push_directive(tokens, "shared::cta");
882                    }
883                    Ss::Global => {
884                        push_directive(tokens, "global");
885                    }
886                    Ss::Shared => {
887                        push_directive(tokens, "shared");
888                    }
889                }
890            }
891            match &self.ctype {
892                Ctype::S32 => {
893                    push_directive(tokens, "s32");
894                }
895            }
896            self.r.unparse_tokens(tokens);
897            tokens.push(PtxToken::Comma);
898            self.p.unparse_tokens(tokens);
899            if self.stride.is_some() {
900                tokens.push(PtxToken::Comma);
901            }
902            if let Some(opt_29) = self.stride.as_ref() {
903                opt_29.unparse_tokens(tokens);
904            }
905            tokens.push(PtxToken::Semicolon);
906        }
907    }
908}
909
910pub mod section_5 {
911    use super::*;
912    use crate::r#type::instruction::wmma_load::section_5::*;
913
914    impl PtxUnparser for WmmaLoadASyncAlignedRowShapeSsAtype1 {
915        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
916            push_opcode(tokens, "wmma");
917            push_directive(tokens, "load");
918            push_directive(tokens, "a");
919            push_directive(tokens, "sync");
920            push_directive(tokens, "aligned");
921            push_directive(tokens, "row");
922            match &self.shape {
923                Shape::M8n8k128 => {
924                    push_directive(tokens, "m8n8k128");
925                }
926            }
927            if let Some(ss_30) = self.ss.as_ref() {
928                match ss_30 {
929                    Ss::SharedCta => {
930                        push_directive(tokens, "shared::cta");
931                    }
932                    Ss::Global => {
933                        push_directive(tokens, "global");
934                    }
935                    Ss::Shared => {
936                        push_directive(tokens, "shared");
937                    }
938                }
939            }
940            match &self.atype {
941                Atype::B1 => {
942                    push_directive(tokens, "b1");
943                }
944            }
945            self.r.unparse_tokens(tokens);
946            tokens.push(PtxToken::Comma);
947            self.p.unparse_tokens(tokens);
948            if self.stride.is_some() {
949                tokens.push(PtxToken::Comma);
950            }
951            if let Some(opt_31) = self.stride.as_ref() {
952                opt_31.unparse_tokens(tokens);
953            }
954            tokens.push(PtxToken::Semicolon);
955        }
956    }
957
958    impl PtxUnparser for WmmaLoadBSyncAlignedColShapeSsBtype1 {
959        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
960            push_opcode(tokens, "wmma");
961            push_directive(tokens, "load");
962            push_directive(tokens, "b");
963            push_directive(tokens, "sync");
964            push_directive(tokens, "aligned");
965            push_directive(tokens, "col");
966            match &self.shape {
967                Shape::M8n8k128 => {
968                    push_directive(tokens, "m8n8k128");
969                }
970            }
971            if let Some(ss_32) = self.ss.as_ref() {
972                match ss_32 {
973                    Ss::SharedCta => {
974                        push_directive(tokens, "shared::cta");
975                    }
976                    Ss::Global => {
977                        push_directive(tokens, "global");
978                    }
979                    Ss::Shared => {
980                        push_directive(tokens, "shared");
981                    }
982                }
983            }
984            match &self.btype {
985                Btype::B1 => {
986                    push_directive(tokens, "b1");
987                }
988            }
989            self.r.unparse_tokens(tokens);
990            tokens.push(PtxToken::Comma);
991            self.p.unparse_tokens(tokens);
992            if self.stride.is_some() {
993                tokens.push(PtxToken::Comma);
994            }
995            if let Some(opt_33) = self.stride.as_ref() {
996                opt_33.unparse_tokens(tokens);
997            }
998            tokens.push(PtxToken::Semicolon);
999        }
1000    }
1001
1002    impl PtxUnparser for WmmaLoadCSyncAlignedLayoutShapeSsCtype5 {
1003        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
1004            push_opcode(tokens, "wmma");
1005            push_directive(tokens, "load");
1006            push_directive(tokens, "c");
1007            push_directive(tokens, "sync");
1008            push_directive(tokens, "aligned");
1009            match &self.layout {
1010                Layout::Row => {
1011                    push_directive(tokens, "row");
1012                }
1013                Layout::Col => {
1014                    push_directive(tokens, "col");
1015                }
1016            }
1017            match &self.shape {
1018                Shape::M8n8k128 => {
1019                    push_directive(tokens, "m8n8k128");
1020                }
1021            }
1022            if let Some(ss_34) = self.ss.as_ref() {
1023                match ss_34 {
1024                    Ss::SharedCta => {
1025                        push_directive(tokens, "shared::cta");
1026                    }
1027                    Ss::Global => {
1028                        push_directive(tokens, "global");
1029                    }
1030                    Ss::Shared => {
1031                        push_directive(tokens, "shared");
1032                    }
1033                }
1034            }
1035            match &self.ctype {
1036                Ctype::S32 => {
1037                    push_directive(tokens, "s32");
1038                }
1039            }
1040            self.r.unparse_tokens(tokens);
1041            tokens.push(PtxToken::Comma);
1042            self.p.unparse_tokens(tokens);
1043            if self.stride.is_some() {
1044                tokens.push(PtxToken::Comma);
1045            }
1046            if let Some(opt_35) = self.stride.as_ref() {
1047                opt_35.unparse_tokens(tokens);
1048            }
1049            tokens.push(PtxToken::Semicolon);
1050        }
1051    }
1052}