1#![allow(unused)]
41
42use crate::lexer::PtxToken;
43use crate::parser::{PtxParseError, PtxParser, PtxTokenStream, Span};
44use crate::r#type::common::*;
45
46pub mod section_0 {
47 use super::*;
48 use crate::r#type::instruction::cvt::section_0::*;
49
50 impl PtxParser for Atype {
55 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
56 {
58 let saved_pos = stream.position();
59 if stream.expect_string(".bf16").is_ok() {
60 return Ok(Atype::Bf16);
61 }
62 stream.set_position(saved_pos);
63 }
64 let saved_pos = stream.position();
65 {
67 let saved_pos = stream.position();
68 if stream.expect_string(".u16").is_ok() {
69 return Ok(Atype::U16);
70 }
71 stream.set_position(saved_pos);
72 }
73 stream.set_position(saved_pos);
74 let saved_pos = stream.position();
75 {
77 let saved_pos = stream.position();
78 if stream.expect_string(".u32").is_ok() {
79 return Ok(Atype::U32);
80 }
81 stream.set_position(saved_pos);
82 }
83 stream.set_position(saved_pos);
84 let saved_pos = stream.position();
85 {
87 let saved_pos = stream.position();
88 if stream.expect_string(".u64").is_ok() {
89 return Ok(Atype::U64);
90 }
91 stream.set_position(saved_pos);
92 }
93 stream.set_position(saved_pos);
94 let saved_pos = stream.position();
95 {
97 let saved_pos = stream.position();
98 if stream.expect_string(".s16").is_ok() {
99 return Ok(Atype::S16);
100 }
101 stream.set_position(saved_pos);
102 }
103 stream.set_position(saved_pos);
104 let saved_pos = stream.position();
105 {
107 let saved_pos = stream.position();
108 if stream.expect_string(".s32").is_ok() {
109 return Ok(Atype::S32);
110 }
111 stream.set_position(saved_pos);
112 }
113 stream.set_position(saved_pos);
114 let saved_pos = stream.position();
115 {
117 let saved_pos = stream.position();
118 if stream.expect_string(".s64").is_ok() {
119 return Ok(Atype::S64);
120 }
121 stream.set_position(saved_pos);
122 }
123 stream.set_position(saved_pos);
124 let saved_pos = stream.position();
125 {
127 let saved_pos = stream.position();
128 if stream.expect_string(".f16").is_ok() {
129 return Ok(Atype::F16);
130 }
131 stream.set_position(saved_pos);
132 }
133 stream.set_position(saved_pos);
134 let saved_pos = stream.position();
135 {
137 let saved_pos = stream.position();
138 if stream.expect_string(".f32").is_ok() {
139 return Ok(Atype::F32);
140 }
141 stream.set_position(saved_pos);
142 }
143 stream.set_position(saved_pos);
144 let saved_pos = stream.position();
145 {
147 let saved_pos = stream.position();
148 if stream.expect_string(".f64").is_ok() {
149 return Ok(Atype::F64);
150 }
151 stream.set_position(saved_pos);
152 }
153 stream.set_position(saved_pos);
154 let saved_pos = stream.position();
155 {
157 let saved_pos = stream.position();
158 if stream.expect_string(".u8").is_ok() {
159 return Ok(Atype::U8);
160 }
161 stream.set_position(saved_pos);
162 }
163 stream.set_position(saved_pos);
164 let saved_pos = stream.position();
165 {
167 let saved_pos = stream.position();
168 if stream.expect_string(".s8").is_ok() {
169 return Ok(Atype::S8);
170 }
171 stream.set_position(saved_pos);
172 }
173 stream.set_position(saved_pos);
174 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
175 let expected = &[".bf16", ".u16", ".u32", ".u64", ".s16", ".s32", ".s64", ".f16", ".f32", ".f64", ".u8", ".s8"];
176 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
177 Err(crate::parser::unexpected_value(span, expected, found))
178 }
179 }
180
181 impl PtxParser for Dtype {
182 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
183 {
185 let saved_pos = stream.position();
186 if stream.expect_string(".bf16").is_ok() {
187 return Ok(Dtype::Bf16);
188 }
189 stream.set_position(saved_pos);
190 }
191 let saved_pos = stream.position();
192 {
194 let saved_pos = stream.position();
195 if stream.expect_string(".u16").is_ok() {
196 return Ok(Dtype::U16);
197 }
198 stream.set_position(saved_pos);
199 }
200 stream.set_position(saved_pos);
201 let saved_pos = stream.position();
202 {
204 let saved_pos = stream.position();
205 if stream.expect_string(".u32").is_ok() {
206 return Ok(Dtype::U32);
207 }
208 stream.set_position(saved_pos);
209 }
210 stream.set_position(saved_pos);
211 let saved_pos = stream.position();
212 {
214 let saved_pos = stream.position();
215 if stream.expect_string(".u64").is_ok() {
216 return Ok(Dtype::U64);
217 }
218 stream.set_position(saved_pos);
219 }
220 stream.set_position(saved_pos);
221 let saved_pos = stream.position();
222 {
224 let saved_pos = stream.position();
225 if stream.expect_string(".s16").is_ok() {
226 return Ok(Dtype::S16);
227 }
228 stream.set_position(saved_pos);
229 }
230 stream.set_position(saved_pos);
231 let saved_pos = stream.position();
232 {
234 let saved_pos = stream.position();
235 if stream.expect_string(".s32").is_ok() {
236 return Ok(Dtype::S32);
237 }
238 stream.set_position(saved_pos);
239 }
240 stream.set_position(saved_pos);
241 let saved_pos = stream.position();
242 {
244 let saved_pos = stream.position();
245 if stream.expect_string(".s64").is_ok() {
246 return Ok(Dtype::S64);
247 }
248 stream.set_position(saved_pos);
249 }
250 stream.set_position(saved_pos);
251 let saved_pos = stream.position();
252 {
254 let saved_pos = stream.position();
255 if stream.expect_string(".f16").is_ok() {
256 return Ok(Dtype::F16);
257 }
258 stream.set_position(saved_pos);
259 }
260 stream.set_position(saved_pos);
261 let saved_pos = stream.position();
262 {
264 let saved_pos = stream.position();
265 if stream.expect_string(".f32").is_ok() {
266 return Ok(Dtype::F32);
267 }
268 stream.set_position(saved_pos);
269 }
270 stream.set_position(saved_pos);
271 let saved_pos = stream.position();
272 {
274 let saved_pos = stream.position();
275 if stream.expect_string(".f64").is_ok() {
276 return Ok(Dtype::F64);
277 }
278 stream.set_position(saved_pos);
279 }
280 stream.set_position(saved_pos);
281 let saved_pos = stream.position();
282 {
284 let saved_pos = stream.position();
285 if stream.expect_string(".u8").is_ok() {
286 return Ok(Dtype::U8);
287 }
288 stream.set_position(saved_pos);
289 }
290 stream.set_position(saved_pos);
291 let saved_pos = stream.position();
292 {
294 let saved_pos = stream.position();
295 if stream.expect_string(".s8").is_ok() {
296 return Ok(Dtype::S8);
297 }
298 stream.set_position(saved_pos);
299 }
300 stream.set_position(saved_pos);
301 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
302 let expected = &[".bf16", ".u16", ".u32", ".u64", ".s16", ".s32", ".s64", ".f16", ".f32", ".f64", ".u8", ".s8"];
303 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
304 Err(crate::parser::unexpected_value(span, expected, found))
305 }
306 }
307
308 impl PtxParser for F4x2type {
309 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
310 {
312 let saved_pos = stream.position();
313 if stream.expect_string(".e2m1x2").is_ok() {
314 return Ok(F4x2type::E2m1x2);
315 }
316 stream.set_position(saved_pos);
317 }
318 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
319 let expected = &[".e2m1x2"];
320 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
321 Err(crate::parser::unexpected_value(span, expected, found))
322 }
323 }
324
325 impl PtxParser for F4x4type {
326 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
327 {
329 let saved_pos = stream.position();
330 if stream.expect_string(".e2m1x4").is_ok() {
331 return Ok(F4x4type::E2m1x4);
332 }
333 stream.set_position(saved_pos);
334 }
335 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
336 let expected = &[".e2m1x4"];
337 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
338 Err(crate::parser::unexpected_value(span, expected, found))
339 }
340 }
341
342 impl PtxParser for F6x2type {
343 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
344 {
346 let saved_pos = stream.position();
347 if stream.expect_string(".e2m3x2").is_ok() {
348 return Ok(F6x2type::E2m3x2);
349 }
350 stream.set_position(saved_pos);
351 }
352 let saved_pos = stream.position();
353 {
355 let saved_pos = stream.position();
356 if stream.expect_string(".e3m2x2").is_ok() {
357 return Ok(F6x2type::E3m2x2);
358 }
359 stream.set_position(saved_pos);
360 }
361 stream.set_position(saved_pos);
362 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
363 let expected = &[".e2m3x2", ".e3m2x2"];
364 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
365 Err(crate::parser::unexpected_value(span, expected, found))
366 }
367 }
368
369 impl PtxParser for F6x4type {
370 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
371 {
373 let saved_pos = stream.position();
374 if stream.expect_string(".e2m3x4").is_ok() {
375 return Ok(F6x4type::E2m3x4);
376 }
377 stream.set_position(saved_pos);
378 }
379 let saved_pos = stream.position();
380 {
382 let saved_pos = stream.position();
383 if stream.expect_string(".e3m2x4").is_ok() {
384 return Ok(F6x4type::E3m2x4);
385 }
386 stream.set_position(saved_pos);
387 }
388 stream.set_position(saved_pos);
389 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
390 let expected = &[".e2m3x4", ".e3m2x4"];
391 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
392 Err(crate::parser::unexpected_value(span, expected, found))
393 }
394 }
395
396 impl PtxParser for F8x2type {
397 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
398 {
400 let saved_pos = stream.position();
401 if stream.expect_string(".e4m3x2").is_ok() {
402 return Ok(F8x2type::E4m3x2);
403 }
404 stream.set_position(saved_pos);
405 }
406 let saved_pos = stream.position();
407 {
409 let saved_pos = stream.position();
410 if stream.expect_string(".e5m2x2").is_ok() {
411 return Ok(F8x2type::E5m2x2);
412 }
413 stream.set_position(saved_pos);
414 }
415 stream.set_position(saved_pos);
416 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
417 let expected = &[".e4m3x2", ".e5m2x2"];
418 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
419 Err(crate::parser::unexpected_value(span, expected, found))
420 }
421 }
422
423 impl PtxParser for F8x4type {
424 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
425 {
427 let saved_pos = stream.position();
428 if stream.expect_string(".e4m3x4").is_ok() {
429 return Ok(F8x4type::E4m3x4);
430 }
431 stream.set_position(saved_pos);
432 }
433 let saved_pos = stream.position();
434 {
436 let saved_pos = stream.position();
437 if stream.expect_string(".e5m2x4").is_ok() {
438 return Ok(F8x4type::E5m2x4);
439 }
440 stream.set_position(saved_pos);
441 }
442 stream.set_position(saved_pos);
443 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
444 let expected = &[".e4m3x4", ".e5m2x4"];
445 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
446 Err(crate::parser::unexpected_value(span, expected, found))
447 }
448 }
449
450 impl PtxParser for Frnd {
451 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
452 {
454 let saved_pos = stream.position();
455 if stream.expect_string(".rn").is_ok() {
456 return Ok(Frnd::Rn);
457 }
458 stream.set_position(saved_pos);
459 }
460 let saved_pos = stream.position();
461 {
463 let saved_pos = stream.position();
464 if stream.expect_string(".rz").is_ok() {
465 return Ok(Frnd::Rz);
466 }
467 stream.set_position(saved_pos);
468 }
469 stream.set_position(saved_pos);
470 let saved_pos = stream.position();
471 {
473 let saved_pos = stream.position();
474 if stream.expect_string(".rm").is_ok() {
475 return Ok(Frnd::Rm);
476 }
477 stream.set_position(saved_pos);
478 }
479 stream.set_position(saved_pos);
480 let saved_pos = stream.position();
481 {
483 let saved_pos = stream.position();
484 if stream.expect_string(".rp").is_ok() {
485 return Ok(Frnd::Rp);
486 }
487 stream.set_position(saved_pos);
488 }
489 stream.set_position(saved_pos);
490 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
491 let expected = &[".rn", ".rz", ".rm", ".rp"];
492 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
493 Err(crate::parser::unexpected_value(span, expected, found))
494 }
495 }
496
497 impl PtxParser for Frnd2 {
498 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
499 {
501 let saved_pos = stream.position();
502 if stream.expect_string(".rn").is_ok() {
503 return Ok(Frnd2::Rn);
504 }
505 stream.set_position(saved_pos);
506 }
507 let saved_pos = stream.position();
508 {
510 let saved_pos = stream.position();
511 if stream.expect_string(".rz").is_ok() {
512 return Ok(Frnd2::Rz);
513 }
514 stream.set_position(saved_pos);
515 }
516 stream.set_position(saved_pos);
517 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
518 let expected = &[".rn", ".rz"];
519 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
520 Err(crate::parser::unexpected_value(span, expected, found))
521 }
522 }
523
524 impl PtxParser for Frnd3 {
525 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
526 {
528 let saved_pos = stream.position();
529 if stream.expect_string(".rz").is_ok() {
530 return Ok(Frnd3::Rz);
531 }
532 stream.set_position(saved_pos);
533 }
534 let saved_pos = stream.position();
535 {
537 let saved_pos = stream.position();
538 if stream.expect_string(".rp").is_ok() {
539 return Ok(Frnd3::Rp);
540 }
541 stream.set_position(saved_pos);
542 }
543 stream.set_position(saved_pos);
544 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
545 let expected = &[".rz", ".rp"];
546 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
547 Err(crate::parser::unexpected_value(span, expected, found))
548 }
549 }
550
551 impl PtxParser for Irnd {
552 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
553 {
555 let saved_pos = stream.position();
556 if stream.expect_string(".rni").is_ok() {
557 return Ok(Irnd::Rni);
558 }
559 stream.set_position(saved_pos);
560 }
561 let saved_pos = stream.position();
562 {
564 let saved_pos = stream.position();
565 if stream.expect_string(".rzi").is_ok() {
566 return Ok(Irnd::Rzi);
567 }
568 stream.set_position(saved_pos);
569 }
570 stream.set_position(saved_pos);
571 let saved_pos = stream.position();
572 {
574 let saved_pos = stream.position();
575 if stream.expect_string(".rmi").is_ok() {
576 return Ok(Irnd::Rmi);
577 }
578 stream.set_position(saved_pos);
579 }
580 stream.set_position(saved_pos);
581 let saved_pos = stream.position();
582 {
584 let saved_pos = stream.position();
585 if stream.expect_string(".rpi").is_ok() {
586 return Ok(Irnd::Rpi);
587 }
588 stream.set_position(saved_pos);
589 }
590 stream.set_position(saved_pos);
591 let span = stream.peek().map(|(_, s)| s.clone()).unwrap_or(Span { start: 0, end: 0 });
592 let expected = &[".rni", ".rzi", ".rmi", ".rpi"];
593 let found = stream.peek().map(|(t, _)| format!("{:?}", t)).unwrap_or_else(|_| "<end of input>".to_string());
594 Err(crate::parser::unexpected_value(span, expected, found))
595 }
596 }
597
598 impl PtxParser for CvtIrndFtzSatDtypeAtype {
599 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
600 stream.expect_string("cvt")?;
601 let saved_pos = stream.position();
602 let irnd = match Irnd::parse(stream) {
603 Ok(val) => Some(val),
604 Err(_) => {
605 stream.set_position(saved_pos);
606 None
607 }
608 };
609 stream.expect_complete()?;
610 let saved_pos = stream.position();
611 let ftz = stream.expect_string(".ftz").is_ok();
612 if !ftz {
613 stream.set_position(saved_pos);
614 }
615 stream.expect_complete()?;
616 let saved_pos = stream.position();
617 let sat = stream.expect_string(".sat").is_ok();
618 if !sat {
619 stream.set_position(saved_pos);
620 }
621 stream.expect_complete()?;
622 let dtype = Dtype::parse(stream)?;
623 stream.expect_complete()?;
624 let atype = Atype::parse(stream)?;
625 stream.expect_complete()?;
626 let d = GeneralOperand::parse(stream)?;
627 stream.expect_complete()?;
628 stream.expect(&PtxToken::Comma)?;
629 let a = GeneralOperand::parse(stream)?;
630 stream.expect_complete()?;
631 stream.expect_complete()?;
632 stream.expect(&PtxToken::Semicolon)?;
633 Ok(CvtIrndFtzSatDtypeAtype {
634 irnd,
635 ftz,
636 sat,
637 dtype,
638 atype,
639 d,
640 a,
641 })
642 }
643 }
644
645
646 impl PtxParser for CvtFrndFtzSatDtypeAtype {
647 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
648 stream.expect_string("cvt")?;
649 let saved_pos = stream.position();
650 let frnd = match Frnd::parse(stream) {
651 Ok(val) => Some(val),
652 Err(_) => {
653 stream.set_position(saved_pos);
654 None
655 }
656 };
657 stream.expect_complete()?;
658 let saved_pos = stream.position();
659 let ftz = stream.expect_string(".ftz").is_ok();
660 if !ftz {
661 stream.set_position(saved_pos);
662 }
663 stream.expect_complete()?;
664 let saved_pos = stream.position();
665 let sat = stream.expect_string(".sat").is_ok();
666 if !sat {
667 stream.set_position(saved_pos);
668 }
669 stream.expect_complete()?;
670 let dtype = Dtype::parse(stream)?;
671 stream.expect_complete()?;
672 let atype = Atype::parse(stream)?;
673 stream.expect_complete()?;
674 let d = GeneralOperand::parse(stream)?;
675 stream.expect_complete()?;
676 stream.expect(&PtxToken::Comma)?;
677 let a = GeneralOperand::parse(stream)?;
678 stream.expect_complete()?;
679 stream.expect_complete()?;
680 stream.expect(&PtxToken::Semicolon)?;
681 Ok(CvtFrndFtzSatDtypeAtype {
682 frnd,
683 ftz,
684 sat,
685 dtype,
686 atype,
687 d,
688 a,
689 })
690 }
691 }
692
693
694 impl PtxParser for CvtFrnd2ReluSatfiniteF16F32 {
695 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
696 stream.expect_string("cvt")?;
697 let frnd2 = Frnd2::parse(stream)?;
698 stream.expect_complete()?;
699 let saved_pos = stream.position();
700 let relu = stream.expect_string(".relu").is_ok();
701 if !relu {
702 stream.set_position(saved_pos);
703 }
704 stream.expect_complete()?;
705 let saved_pos = stream.position();
706 let satfinite = stream.expect_string(".satfinite").is_ok();
707 if !satfinite {
708 stream.set_position(saved_pos);
709 }
710 stream.expect_complete()?;
711 stream.expect_string(".f16")?;
712 let f16 = ();
713 stream.expect_complete()?;
714 stream.expect_string(".f32")?;
715 let f32 = ();
716 stream.expect_complete()?;
717 let d = GeneralOperand::parse(stream)?;
718 stream.expect_complete()?;
719 stream.expect(&PtxToken::Comma)?;
720 let a = GeneralOperand::parse(stream)?;
721 stream.expect_complete()?;
722 stream.expect_complete()?;
723 stream.expect(&PtxToken::Semicolon)?;
724 Ok(CvtFrnd2ReluSatfiniteF16F32 {
725 frnd2,
726 relu,
727 satfinite,
728 f16,
729 f32,
730 d,
731 a,
732 })
733 }
734 }
735
736
737 impl PtxParser for CvtFrnd2ReluSatfiniteF16x2F32 {
738 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
739 stream.expect_string("cvt")?;
740 let frnd2 = Frnd2::parse(stream)?;
741 stream.expect_complete()?;
742 let saved_pos = stream.position();
743 let relu = stream.expect_string(".relu").is_ok();
744 if !relu {
745 stream.set_position(saved_pos);
746 }
747 stream.expect_complete()?;
748 let saved_pos = stream.position();
749 let satfinite = stream.expect_string(".satfinite").is_ok();
750 if !satfinite {
751 stream.set_position(saved_pos);
752 }
753 stream.expect_complete()?;
754 stream.expect_string(".f16x2")?;
755 let f16x2 = ();
756 stream.expect_complete()?;
757 stream.expect_string(".f32")?;
758 let f32 = ();
759 stream.expect_complete()?;
760 let d = GeneralOperand::parse(stream)?;
761 stream.expect_complete()?;
762 stream.expect(&PtxToken::Comma)?;
763 let a = GeneralOperand::parse(stream)?;
764 stream.expect_complete()?;
765 stream.expect(&PtxToken::Comma)?;
766 let b = GeneralOperand::parse(stream)?;
767 stream.expect_complete()?;
768 stream.expect_complete()?;
769 stream.expect(&PtxToken::Semicolon)?;
770 Ok(CvtFrnd2ReluSatfiniteF16x2F32 {
771 frnd2,
772 relu,
773 satfinite,
774 f16x2,
775 f32,
776 d,
777 a,
778 b,
779 })
780 }
781 }
782
783
784 impl PtxParser for CvtRsReluSatfiniteF16x2F32 {
785 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
786 stream.expect_string("cvt")?;
787 stream.expect_string(".rs")?;
788 let rs = ();
789 stream.expect_complete()?;
790 let saved_pos = stream.position();
791 let relu = stream.expect_string(".relu").is_ok();
792 if !relu {
793 stream.set_position(saved_pos);
794 }
795 stream.expect_complete()?;
796 let saved_pos = stream.position();
797 let satfinite = stream.expect_string(".satfinite").is_ok();
798 if !satfinite {
799 stream.set_position(saved_pos);
800 }
801 stream.expect_complete()?;
802 stream.expect_string(".f16x2")?;
803 let f16x2 = ();
804 stream.expect_complete()?;
805 stream.expect_string(".f32")?;
806 let f32 = ();
807 stream.expect_complete()?;
808 let d = GeneralOperand::parse(stream)?;
809 stream.expect_complete()?;
810 stream.expect(&PtxToken::Comma)?;
811 let a = GeneralOperand::parse(stream)?;
812 stream.expect_complete()?;
813 stream.expect(&PtxToken::Comma)?;
814 let b = GeneralOperand::parse(stream)?;
815 stream.expect_complete()?;
816 stream.expect(&PtxToken::Comma)?;
817 let rbits = GeneralOperand::parse(stream)?;
818 stream.expect_complete()?;
819 stream.expect_complete()?;
820 stream.expect(&PtxToken::Semicolon)?;
821 Ok(CvtRsReluSatfiniteF16x2F32 {
822 rs,
823 relu,
824 satfinite,
825 f16x2,
826 f32,
827 d,
828 a,
829 b,
830 rbits,
831 })
832 }
833 }
834
835
836 impl PtxParser for CvtFrnd2ReluSatfiniteBf16F32 {
837 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
838 stream.expect_string("cvt")?;
839 let frnd2 = Frnd2::parse(stream)?;
840 stream.expect_complete()?;
841 let saved_pos = stream.position();
842 let relu = stream.expect_string(".relu").is_ok();
843 if !relu {
844 stream.set_position(saved_pos);
845 }
846 stream.expect_complete()?;
847 let saved_pos = stream.position();
848 let satfinite = stream.expect_string(".satfinite").is_ok();
849 if !satfinite {
850 stream.set_position(saved_pos);
851 }
852 stream.expect_complete()?;
853 stream.expect_string(".bf16")?;
854 let bf16 = ();
855 stream.expect_complete()?;
856 stream.expect_string(".f32")?;
857 let f32 = ();
858 stream.expect_complete()?;
859 let d = GeneralOperand::parse(stream)?;
860 stream.expect_complete()?;
861 stream.expect(&PtxToken::Comma)?;
862 let a = GeneralOperand::parse(stream)?;
863 stream.expect_complete()?;
864 stream.expect_complete()?;
865 stream.expect(&PtxToken::Semicolon)?;
866 Ok(CvtFrnd2ReluSatfiniteBf16F32 {
867 frnd2,
868 relu,
869 satfinite,
870 bf16,
871 f32,
872 d,
873 a,
874 })
875 }
876 }
877
878
879 impl PtxParser for CvtFrnd2ReluSatfiniteBf16x2F32 {
880 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
881 stream.expect_string("cvt")?;
882 let frnd2 = Frnd2::parse(stream)?;
883 stream.expect_complete()?;
884 let saved_pos = stream.position();
885 let relu = stream.expect_string(".relu").is_ok();
886 if !relu {
887 stream.set_position(saved_pos);
888 }
889 stream.expect_complete()?;
890 let saved_pos = stream.position();
891 let satfinite = stream.expect_string(".satfinite").is_ok();
892 if !satfinite {
893 stream.set_position(saved_pos);
894 }
895 stream.expect_complete()?;
896 stream.expect_string(".bf16x2")?;
897 let bf16x2 = ();
898 stream.expect_complete()?;
899 stream.expect_string(".f32")?;
900 let f32 = ();
901 stream.expect_complete()?;
902 let d = GeneralOperand::parse(stream)?;
903 stream.expect_complete()?;
904 stream.expect(&PtxToken::Comma)?;
905 let a = GeneralOperand::parse(stream)?;
906 stream.expect_complete()?;
907 stream.expect(&PtxToken::Comma)?;
908 let b = GeneralOperand::parse(stream)?;
909 stream.expect_complete()?;
910 stream.expect_complete()?;
911 stream.expect(&PtxToken::Semicolon)?;
912 Ok(CvtFrnd2ReluSatfiniteBf16x2F32 {
913 frnd2,
914 relu,
915 satfinite,
916 bf16x2,
917 f32,
918 d,
919 a,
920 b,
921 })
922 }
923 }
924
925
926 impl PtxParser for CvtRsReluSatfiniteBf16x2F32 {
927 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
928 stream.expect_string("cvt")?;
929 stream.expect_string(".rs")?;
930 let rs = ();
931 stream.expect_complete()?;
932 let saved_pos = stream.position();
933 let relu = stream.expect_string(".relu").is_ok();
934 if !relu {
935 stream.set_position(saved_pos);
936 }
937 stream.expect_complete()?;
938 let saved_pos = stream.position();
939 let satfinite = stream.expect_string(".satfinite").is_ok();
940 if !satfinite {
941 stream.set_position(saved_pos);
942 }
943 stream.expect_complete()?;
944 stream.expect_string(".bf16x2")?;
945 let bf16x2 = ();
946 stream.expect_complete()?;
947 stream.expect_string(".f32")?;
948 let f32 = ();
949 stream.expect_complete()?;
950 let d = GeneralOperand::parse(stream)?;
951 stream.expect_complete()?;
952 stream.expect(&PtxToken::Comma)?;
953 let a = GeneralOperand::parse(stream)?;
954 stream.expect_complete()?;
955 stream.expect(&PtxToken::Comma)?;
956 let b = GeneralOperand::parse(stream)?;
957 stream.expect_complete()?;
958 stream.expect(&PtxToken::Comma)?;
959 let rbits = GeneralOperand::parse(stream)?;
960 stream.expect_complete()?;
961 stream.expect_complete()?;
962 stream.expect(&PtxToken::Semicolon)?;
963 Ok(CvtRsReluSatfiniteBf16x2F32 {
964 rs,
965 relu,
966 satfinite,
967 bf16x2,
968 f32,
969 d,
970 a,
971 b,
972 rbits,
973 })
974 }
975 }
976
977
978 impl PtxParser for CvtRnaSatfiniteTf32F32 {
979 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
980 stream.expect_string("cvt")?;
981 stream.expect_string(".rna")?;
982 let rna = ();
983 stream.expect_complete()?;
984 let saved_pos = stream.position();
985 let satfinite = stream.expect_string(".satfinite").is_ok();
986 if !satfinite {
987 stream.set_position(saved_pos);
988 }
989 stream.expect_complete()?;
990 stream.expect_string(".tf32")?;
991 let tf32 = ();
992 stream.expect_complete()?;
993 stream.expect_string(".f32")?;
994 let f32 = ();
995 stream.expect_complete()?;
996 let d = GeneralOperand::parse(stream)?;
997 stream.expect_complete()?;
998 stream.expect(&PtxToken::Comma)?;
999 let a = GeneralOperand::parse(stream)?;
1000 stream.expect_complete()?;
1001 stream.expect_complete()?;
1002 stream.expect(&PtxToken::Semicolon)?;
1003 Ok(CvtRnaSatfiniteTf32F32 {
1004 rna,
1005 satfinite,
1006 tf32,
1007 f32,
1008 d,
1009 a,
1010 })
1011 }
1012 }
1013
1014
1015 impl PtxParser for CvtFrnd2SatfiniteReluTf32F32 {
1016 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1017 stream.expect_string("cvt")?;
1018 let frnd2 = Frnd2::parse(stream)?;
1019 stream.expect_complete()?;
1020 let saved_pos = stream.position();
1021 let satfinite = stream.expect_string(".satfinite").is_ok();
1022 if !satfinite {
1023 stream.set_position(saved_pos);
1024 }
1025 stream.expect_complete()?;
1026 let saved_pos = stream.position();
1027 let relu = stream.expect_string(".relu").is_ok();
1028 if !relu {
1029 stream.set_position(saved_pos);
1030 }
1031 stream.expect_complete()?;
1032 stream.expect_string(".tf32")?;
1033 let tf32 = ();
1034 stream.expect_complete()?;
1035 stream.expect_string(".f32")?;
1036 let f32 = ();
1037 stream.expect_complete()?;
1038 let d = GeneralOperand::parse(stream)?;
1039 stream.expect_complete()?;
1040 stream.expect(&PtxToken::Comma)?;
1041 let a = GeneralOperand::parse(stream)?;
1042 stream.expect_complete()?;
1043 stream.expect_complete()?;
1044 stream.expect(&PtxToken::Semicolon)?;
1045 Ok(CvtFrnd2SatfiniteReluTf32F32 {
1046 frnd2,
1047 satfinite,
1048 relu,
1049 tf32,
1050 f32,
1051 d,
1052 a,
1053 })
1054 }
1055 }
1056
1057
1058 impl PtxParser for CvtRnSatfiniteReluF8x2typeF32 {
1059 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1060 stream.expect_string("cvt")?;
1061 stream.expect_string(".rn")?;
1062 let rn = ();
1063 stream.expect_complete()?;
1064 stream.expect_string(".satfinite")?;
1065 let satfinite = ();
1066 stream.expect_complete()?;
1067 let saved_pos = stream.position();
1068 let relu = stream.expect_string(".relu").is_ok();
1069 if !relu {
1070 stream.set_position(saved_pos);
1071 }
1072 stream.expect_complete()?;
1073 let f8x2type = F8x2type::parse(stream)?;
1074 stream.expect_complete()?;
1075 stream.expect_string(".f32")?;
1076 let f32 = ();
1077 stream.expect_complete()?;
1078 let d = GeneralOperand::parse(stream)?;
1079 stream.expect_complete()?;
1080 stream.expect(&PtxToken::Comma)?;
1081 let a = GeneralOperand::parse(stream)?;
1082 stream.expect_complete()?;
1083 stream.expect(&PtxToken::Comma)?;
1084 let b = GeneralOperand::parse(stream)?;
1085 stream.expect_complete()?;
1086 stream.expect_complete()?;
1087 stream.expect(&PtxToken::Semicolon)?;
1088 Ok(CvtRnSatfiniteReluF8x2typeF32 {
1089 rn,
1090 satfinite,
1091 relu,
1092 f8x2type,
1093 f32,
1094 d,
1095 a,
1096 b,
1097 })
1098 }
1099 }
1100
1101
1102 impl PtxParser for CvtRnSatfiniteReluF8x2typeF16x2 {
1103 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1104 stream.expect_string("cvt")?;
1105 stream.expect_string(".rn")?;
1106 let rn = ();
1107 stream.expect_complete()?;
1108 stream.expect_string(".satfinite")?;
1109 let satfinite = ();
1110 stream.expect_complete()?;
1111 let saved_pos = stream.position();
1112 let relu = stream.expect_string(".relu").is_ok();
1113 if !relu {
1114 stream.set_position(saved_pos);
1115 }
1116 stream.expect_complete()?;
1117 let f8x2type = F8x2type::parse(stream)?;
1118 stream.expect_complete()?;
1119 stream.expect_string(".f16x2")?;
1120 let f16x2 = ();
1121 stream.expect_complete()?;
1122 let d = GeneralOperand::parse(stream)?;
1123 stream.expect_complete()?;
1124 stream.expect(&PtxToken::Comma)?;
1125 let a = GeneralOperand::parse(stream)?;
1126 stream.expect_complete()?;
1127 stream.expect_complete()?;
1128 stream.expect(&PtxToken::Semicolon)?;
1129 Ok(CvtRnSatfiniteReluF8x2typeF16x2 {
1130 rn,
1131 satfinite,
1132 relu,
1133 f8x2type,
1134 f16x2,
1135 d,
1136 a,
1137 })
1138 }
1139 }
1140
1141
1142 impl PtxParser for CvtRnReluF16x2F8x2type {
1143 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1144 stream.expect_string("cvt")?;
1145 stream.expect_string(".rn")?;
1146 let rn = ();
1147 stream.expect_complete()?;
1148 let saved_pos = stream.position();
1149 let relu = stream.expect_string(".relu").is_ok();
1150 if !relu {
1151 stream.set_position(saved_pos);
1152 }
1153 stream.expect_complete()?;
1154 stream.expect_string(".f16x2")?;
1155 let f16x2 = ();
1156 stream.expect_complete()?;
1157 let f8x2type = F8x2type::parse(stream)?;
1158 stream.expect_complete()?;
1159 let d = GeneralOperand::parse(stream)?;
1160 stream.expect_complete()?;
1161 stream.expect(&PtxToken::Comma)?;
1162 let a = GeneralOperand::parse(stream)?;
1163 stream.expect_complete()?;
1164 stream.expect_complete()?;
1165 stream.expect(&PtxToken::Semicolon)?;
1166 Ok(CvtRnReluF16x2F8x2type {
1167 rn,
1168 relu,
1169 f16x2,
1170 f8x2type,
1171 d,
1172 a,
1173 })
1174 }
1175 }
1176
1177
1178 impl PtxParser for CvtRsReluSatfiniteF8x4typeF32 {
1179 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1180 stream.expect_string("cvt")?;
1181 stream.expect_string(".rs")?;
1182 let rs = ();
1183 stream.expect_complete()?;
1184 let saved_pos = stream.position();
1185 let relu = stream.expect_string(".relu").is_ok();
1186 if !relu {
1187 stream.set_position(saved_pos);
1188 }
1189 stream.expect_complete()?;
1190 stream.expect_string(".satfinite")?;
1191 let satfinite = ();
1192 stream.expect_complete()?;
1193 let f8x4type = F8x4type::parse(stream)?;
1194 stream.expect_complete()?;
1195 stream.expect_string(".f32")?;
1196 let f32 = ();
1197 stream.expect_complete()?;
1198 let d = GeneralOperand::parse(stream)?;
1199 stream.expect_complete()?;
1200 stream.expect(&PtxToken::Comma)?;
1201 let a = VectorOperand::parse(stream)?;
1202 stream.expect_complete()?;
1203 stream.expect(&PtxToken::Comma)?;
1204 let rbits = GeneralOperand::parse(stream)?;
1205 stream.expect_complete()?;
1206 stream.expect_complete()?;
1207 stream.expect(&PtxToken::Semicolon)?;
1208 Ok(CvtRsReluSatfiniteF8x4typeF32 {
1209 rs,
1210 relu,
1211 satfinite,
1212 f8x4type,
1213 f32,
1214 d,
1215 a,
1216 rbits,
1217 })
1218 }
1219 }
1220
1221
1222 impl PtxParser for CvtRnSatfiniteReluF4x2typeF32 {
1223 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1224 stream.expect_string("cvt")?;
1225 stream.expect_string(".rn")?;
1226 let rn = ();
1227 stream.expect_complete()?;
1228 stream.expect_string(".satfinite")?;
1229 let satfinite = ();
1230 stream.expect_complete()?;
1231 let saved_pos = stream.position();
1232 let relu = stream.expect_string(".relu").is_ok();
1233 if !relu {
1234 stream.set_position(saved_pos);
1235 }
1236 stream.expect_complete()?;
1237 let f4x2type = F4x2type::parse(stream)?;
1238 stream.expect_complete()?;
1239 stream.expect_string(".f32")?;
1240 let f32 = ();
1241 stream.expect_complete()?;
1242 let d = GeneralOperand::parse(stream)?;
1243 stream.expect_complete()?;
1244 stream.expect(&PtxToken::Comma)?;
1245 let a = GeneralOperand::parse(stream)?;
1246 stream.expect_complete()?;
1247 stream.expect(&PtxToken::Comma)?;
1248 let b = GeneralOperand::parse(stream)?;
1249 stream.expect_complete()?;
1250 stream.expect_complete()?;
1251 stream.expect(&PtxToken::Semicolon)?;
1252 Ok(CvtRnSatfiniteReluF4x2typeF32 {
1253 rn,
1254 satfinite,
1255 relu,
1256 f4x2type,
1257 f32,
1258 d,
1259 a,
1260 b,
1261 })
1262 }
1263 }
1264
1265
1266 impl PtxParser for CvtRnReluF16x2F4x2type {
1267 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1268 stream.expect_string("cvt")?;
1269 stream.expect_string(".rn")?;
1270 let rn = ();
1271 stream.expect_complete()?;
1272 let saved_pos = stream.position();
1273 let relu = stream.expect_string(".relu").is_ok();
1274 if !relu {
1275 stream.set_position(saved_pos);
1276 }
1277 stream.expect_complete()?;
1278 stream.expect_string(".f16x2")?;
1279 let f16x2 = ();
1280 stream.expect_complete()?;
1281 let f4x2type = F4x2type::parse(stream)?;
1282 stream.expect_complete()?;
1283 let d = GeneralOperand::parse(stream)?;
1284 stream.expect_complete()?;
1285 stream.expect(&PtxToken::Comma)?;
1286 let a = GeneralOperand::parse(stream)?;
1287 stream.expect_complete()?;
1288 stream.expect_complete()?;
1289 stream.expect(&PtxToken::Semicolon)?;
1290 Ok(CvtRnReluF16x2F4x2type {
1291 rn,
1292 relu,
1293 f16x2,
1294 f4x2type,
1295 d,
1296 a,
1297 })
1298 }
1299 }
1300
1301
1302 impl PtxParser for CvtRsReluSatfiniteF4x4typeF32 {
1303 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1304 stream.expect_string("cvt")?;
1305 stream.expect_string(".rs")?;
1306 let rs = ();
1307 stream.expect_complete()?;
1308 let saved_pos = stream.position();
1309 let relu = stream.expect_string(".relu").is_ok();
1310 if !relu {
1311 stream.set_position(saved_pos);
1312 }
1313 stream.expect_complete()?;
1314 stream.expect_string(".satfinite")?;
1315 let satfinite = ();
1316 stream.expect_complete()?;
1317 let f4x4type = F4x4type::parse(stream)?;
1318 stream.expect_complete()?;
1319 stream.expect_string(".f32")?;
1320 let f32 = ();
1321 stream.expect_complete()?;
1322 let d = GeneralOperand::parse(stream)?;
1323 stream.expect_complete()?;
1324 stream.expect(&PtxToken::Comma)?;
1325 let a = VectorOperand::parse(stream)?;
1326 stream.expect_complete()?;
1327 stream.expect(&PtxToken::Comma)?;
1328 let rbits = GeneralOperand::parse(stream)?;
1329 stream.expect_complete()?;
1330 stream.expect_complete()?;
1331 stream.expect(&PtxToken::Semicolon)?;
1332 Ok(CvtRsReluSatfiniteF4x4typeF32 {
1333 rs,
1334 relu,
1335 satfinite,
1336 f4x4type,
1337 f32,
1338 d,
1339 a,
1340 rbits,
1341 })
1342 }
1343 }
1344
1345
1346 impl PtxParser for CvtRnSatfiniteReluF6x2typeF32 {
1347 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1348 stream.expect_string("cvt")?;
1349 stream.expect_string(".rn")?;
1350 let rn = ();
1351 stream.expect_complete()?;
1352 stream.expect_string(".satfinite")?;
1353 let satfinite = ();
1354 stream.expect_complete()?;
1355 let saved_pos = stream.position();
1356 let relu = stream.expect_string(".relu").is_ok();
1357 if !relu {
1358 stream.set_position(saved_pos);
1359 }
1360 stream.expect_complete()?;
1361 let f6x2type = F6x2type::parse(stream)?;
1362 stream.expect_complete()?;
1363 stream.expect_string(".f32")?;
1364 let f32 = ();
1365 stream.expect_complete()?;
1366 let d = GeneralOperand::parse(stream)?;
1367 stream.expect_complete()?;
1368 stream.expect(&PtxToken::Comma)?;
1369 let a = GeneralOperand::parse(stream)?;
1370 stream.expect_complete()?;
1371 stream.expect(&PtxToken::Comma)?;
1372 let b = GeneralOperand::parse(stream)?;
1373 stream.expect_complete()?;
1374 stream.expect_complete()?;
1375 stream.expect(&PtxToken::Semicolon)?;
1376 Ok(CvtRnSatfiniteReluF6x2typeF32 {
1377 rn,
1378 satfinite,
1379 relu,
1380 f6x2type,
1381 f32,
1382 d,
1383 a,
1384 b,
1385 })
1386 }
1387 }
1388
1389
1390 impl PtxParser for CvtRnReluF16x2F6x2type {
1391 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1392 stream.expect_string("cvt")?;
1393 stream.expect_string(".rn")?;
1394 let rn = ();
1395 stream.expect_complete()?;
1396 let saved_pos = stream.position();
1397 let relu = stream.expect_string(".relu").is_ok();
1398 if !relu {
1399 stream.set_position(saved_pos);
1400 }
1401 stream.expect_complete()?;
1402 stream.expect_string(".f16x2")?;
1403 let f16x2 = ();
1404 stream.expect_complete()?;
1405 let f6x2type = F6x2type::parse(stream)?;
1406 stream.expect_complete()?;
1407 let d = GeneralOperand::parse(stream)?;
1408 stream.expect_complete()?;
1409 stream.expect(&PtxToken::Comma)?;
1410 let a = GeneralOperand::parse(stream)?;
1411 stream.expect_complete()?;
1412 stream.expect_complete()?;
1413 stream.expect(&PtxToken::Semicolon)?;
1414 Ok(CvtRnReluF16x2F6x2type {
1415 rn,
1416 relu,
1417 f16x2,
1418 f6x2type,
1419 d,
1420 a,
1421 })
1422 }
1423 }
1424
1425
1426 impl PtxParser for CvtRsReluSatfiniteF6x4typeF32 {
1427 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1428 stream.expect_string("cvt")?;
1429 stream.expect_string(".rs")?;
1430 let rs = ();
1431 stream.expect_complete()?;
1432 let saved_pos = stream.position();
1433 let relu = stream.expect_string(".relu").is_ok();
1434 if !relu {
1435 stream.set_position(saved_pos);
1436 }
1437 stream.expect_complete()?;
1438 stream.expect_string(".satfinite")?;
1439 let satfinite = ();
1440 stream.expect_complete()?;
1441 let f6x4type = F6x4type::parse(stream)?;
1442 stream.expect_complete()?;
1443 stream.expect_string(".f32")?;
1444 let f32 = ();
1445 stream.expect_complete()?;
1446 let d = GeneralOperand::parse(stream)?;
1447 stream.expect_complete()?;
1448 stream.expect(&PtxToken::Comma)?;
1449 let a = VectorOperand::parse(stream)?;
1450 stream.expect_complete()?;
1451 stream.expect(&PtxToken::Comma)?;
1452 let rbits = GeneralOperand::parse(stream)?;
1453 stream.expect_complete()?;
1454 stream.expect_complete()?;
1455 stream.expect(&PtxToken::Semicolon)?;
1456 Ok(CvtRsReluSatfiniteF6x4typeF32 {
1457 rs,
1458 relu,
1459 satfinite,
1460 f6x4type,
1461 f32,
1462 d,
1463 a,
1464 rbits,
1465 })
1466 }
1467 }
1468
1469
1470 impl PtxParser for CvtFrnd3SatfiniteUe8m0x2F32 {
1471 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1472 stream.expect_string("cvt")?;
1473 let frnd3 = Frnd3::parse(stream)?;
1474 stream.expect_complete()?;
1475 let saved_pos = stream.position();
1476 let satfinite = stream.expect_string(".satfinite").is_ok();
1477 if !satfinite {
1478 stream.set_position(saved_pos);
1479 }
1480 stream.expect_complete()?;
1481 stream.expect_string(".ue8m0x2")?;
1482 let ue8m0x2 = ();
1483 stream.expect_complete()?;
1484 stream.expect_string(".f32")?;
1485 let f32 = ();
1486 stream.expect_complete()?;
1487 let d = GeneralOperand::parse(stream)?;
1488 stream.expect_complete()?;
1489 stream.expect(&PtxToken::Comma)?;
1490 let a = GeneralOperand::parse(stream)?;
1491 stream.expect_complete()?;
1492 stream.expect(&PtxToken::Comma)?;
1493 let b = GeneralOperand::parse(stream)?;
1494 stream.expect_complete()?;
1495 stream.expect_complete()?;
1496 stream.expect(&PtxToken::Semicolon)?;
1497 Ok(CvtFrnd3SatfiniteUe8m0x2F32 {
1498 frnd3,
1499 satfinite,
1500 ue8m0x2,
1501 f32,
1502 d,
1503 a,
1504 b,
1505 })
1506 }
1507 }
1508
1509
1510 impl PtxParser for CvtFrnd3SatfiniteUe8m0x2Bf16x2 {
1511 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1512 stream.expect_string("cvt")?;
1513 let frnd3 = Frnd3::parse(stream)?;
1514 stream.expect_complete()?;
1515 let saved_pos = stream.position();
1516 let satfinite = stream.expect_string(".satfinite").is_ok();
1517 if !satfinite {
1518 stream.set_position(saved_pos);
1519 }
1520 stream.expect_complete()?;
1521 stream.expect_string(".ue8m0x2")?;
1522 let ue8m0x2 = ();
1523 stream.expect_complete()?;
1524 stream.expect_string(".bf16x2")?;
1525 let bf16x2 = ();
1526 stream.expect_complete()?;
1527 let d = GeneralOperand::parse(stream)?;
1528 stream.expect_complete()?;
1529 stream.expect(&PtxToken::Comma)?;
1530 let a = GeneralOperand::parse(stream)?;
1531 stream.expect_complete()?;
1532 stream.expect_complete()?;
1533 stream.expect(&PtxToken::Semicolon)?;
1534 Ok(CvtFrnd3SatfiniteUe8m0x2Bf16x2 {
1535 frnd3,
1536 satfinite,
1537 ue8m0x2,
1538 bf16x2,
1539 d,
1540 a,
1541 })
1542 }
1543 }
1544
1545
1546 impl PtxParser for CvtRnBf16x2Ue8m0x2 {
1547 fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
1548 stream.expect_string("cvt")?;
1549 stream.expect_string(".rn")?;
1550 let rn = ();
1551 stream.expect_complete()?;
1552 stream.expect_string(".bf16x2")?;
1553 let bf16x2 = ();
1554 stream.expect_complete()?;
1555 stream.expect_string(".ue8m0x2")?;
1556 let ue8m0x2 = ();
1557 stream.expect_complete()?;
1558 let d = GeneralOperand::parse(stream)?;
1559 stream.expect_complete()?;
1560 stream.expect(&PtxToken::Comma)?;
1561 let a = GeneralOperand::parse(stream)?;
1562 stream.expect_complete()?;
1563 stream.expect_complete()?;
1564 stream.expect(&PtxToken::Semicolon)?;
1565 Ok(CvtRnBf16x2Ue8m0x2 {
1566 rn,
1567 bf16x2,
1568 ue8m0x2,
1569 d,
1570 a,
1571 })
1572 }
1573 }
1574
1575
1576}
1577