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