@@ -681,158 +681,184 @@ def ROCDL_CvtPkRtz:
681
681
}];
682
682
}
683
683
684
- def ROCDL_CvtScaleF32PkFp8F16 :
684
+ def ROCDL_CvtScaleF32PkFp8F16Op :
685
685
ROCDL_IntrOp<"cvt.scalef32.pk.fp8.f16", [], [], [Pure], 1>,
686
686
Arguments<(ins ROCDL_V2I16Type: $old, ROCDL_V2F16Type: $src, F32: $scale, I1:$wordSel)> {
687
687
let summary = "Scale and convert f16 to packed fp8";
688
688
let description = [{
689
- Scale `src` by the exponent in `scale` then convert to packed fp8.
690
- Store the result in low/high word based on $wordSel, preserving the other word.
689
+ Scale `src` by the exponent in `scale`, then convert to packed fp8.
690
+ Store the result in low/high word of `old` based on $wordSel, preserving the other word.
691
691
}];
692
692
let assemblyFormat = [{
693
693
attr-dict $src `,` $scale `->` $old `[` $wordSel `]` `:` type($res)
694
694
}];
695
695
}
696
696
697
- def ROCDL_CvtScaleF32PkFp8Bf16 :
697
+ def ROCDL_CvtScaleF32PkFp8Bf16Op :
698
698
ROCDL_IntrOp<"cvt.scalef32.pk.fp8.bf16", [], [], [Pure], 1>,
699
699
Arguments<(ins ROCDL_V2I16Type: $old, ROCDL_V2BF16Type: $src, F32: $scale, I1:$wordSel)> {
700
700
let summary = "Scale and convert packed bf16 to packed fp8";
701
701
let description = [{
702
- Scale `src` by the exponent in `scale` then convert to packed fp8.
703
- Store the result in low/high word based on $wordSel, preserving the other word.
702
+ Scale `src` by the exponent in `scale`, then convert to packed fp8.
703
+ Store the result in low/high word of `old` based on $wordSel, preserving the other word.
704
704
}];
705
705
let assemblyFormat = [{
706
706
attr-dict $src `,` $scale `->` $old `[` $wordSel `]` `:` type($res)
707
707
}];
708
708
}
709
709
710
710
711
- def ROCDL_CvtScaleF32PkBf8F16 :
711
+ def ROCDL_CvtScaleF32PkBf8F16Op :
712
712
ROCDL_IntrOp<"cvt.scalef32.pk.bf8.f16", [], [], [Pure], 1>,
713
713
Arguments<(ins ROCDL_V2I16Type: $old, ROCDL_V2F16Type: $src, F32: $scale, I1:$wordSel)> {
714
714
let summary = "Scale and convert f16 to packed bf8";
715
715
let description = [{
716
- Scale `src` by the exponent in `scale` then convert to packed bf8.
717
- Store the result in low/high word based on $wordSel, preserving the other word.
716
+ Scale `src` by the exponent in `scale`, then convert to packed bf8.
717
+ Store the result in low/high word of `old` based on $wordSel, preserving the other word.
718
718
}];
719
719
let assemblyFormat = [{
720
720
attr-dict $src `,` $scale `->` $old `[` $wordSel `]` `:` type($res)
721
721
}];
722
722
}
723
723
724
724
725
- def ROCDL_CvtScaleF32PkBf8Bf16 :
725
+ def ROCDL_CvtScaleF32PkBf8Bf16Op :
726
726
ROCDL_IntrOp<"cvt.scalef32.pk.bf8.bf16", [], [], [Pure], 1>,
727
727
Arguments<(ins ROCDL_V2I16Type: $old, ROCDL_V2BF16Type: $src, F32: $scale, I1:$wordSel)> {
728
728
let summary = "Scale and convert bf16 to packed bf8";
729
729
let description = [{
730
- Scale `src` by the exponent in `scale` then convert to packed bf8.
731
- Store the result in low/high word based on $wordSel, preserving the other word.
730
+ Scale `src` by the exponent in `scale`, then convert to packed bf8.
731
+ Store the result in low/high word of `old` based on $wordSel, preserving the other word.
732
732
}];
733
733
let assemblyFormat = [{
734
734
attr-dict $src `,` $scale `->` $old `[` $wordSel `]` `:` type($res)
735
735
}];
736
736
}
737
737
738
- def ROCDL_CvtScaleF32SrFp8F16 :
738
+ def ROCDL_CvtScaleF32SrFp8F16Op :
739
739
ROCDL_IntrOp<"cvt.scalef32.sr.fp8.f16", [], [], [Pure], 1>,
740
740
Arguments<(ins I32:$old, F16:$src, I32:$seed, F32: $scale, I32:$byteSel)> {
741
741
let summary = "Scale and convert f16 to packed fp8 using stochastic rounding";
742
742
let description = [{
743
- Scale `src` by the exponent in `scale` then convert to packed p8 with stochastic rounding
744
- using seed data in `seed`. store into the `byteSel`th byte of `old`, preserving the others.
743
+ Scale `src` by the exponent in `scale`, then convert to packed p8 with stochastic rounding
744
+ using seed data in `seed`. Store into the `byteSel`th byte of `old`, preserving the others.
745
745
746
746
}];
747
747
let assemblyFormat = [{
748
748
attr-dict $src `,` $seed `,` $scale `->` $old `[` $byteSel `]` `:` type($res)
749
749
}];
750
750
}
751
751
752
- def ROCDL_CvtScaleF32SrBf8F16 :
752
+ def ROCDL_CvtScaleF32SrBf8F16Op :
753
753
ROCDL_IntrOp<"cvt.scalef32.sr.bf8.f16", [], [], [Pure], 1>,
754
754
Arguments<(ins I32:$old, F16:$src, I32:$seed, F32: $scale, I32:$byteSel)> {
755
755
let summary = "Scale and convert f16 to packed bf8 using stochastic rounding";
756
756
let description = [{
757
- Scale `src` by the exponent in `scale` then convert to packed bf8 with stochastic rounding
758
- using seed data in `seed`. store into the `byteSel`th byte of `old`, preserving the others.
757
+ Scale `src` by the exponent in `scale`, then convert to packed bf8 with stochastic rounding
758
+ using seed data in `seed`. Store into the `byteSel`th byte of `old`, preserving the others.
759
759
760
760
}];
761
761
let assemblyFormat = [{
762
762
attr-dict $src `,` $seed `,` $scale `->` $old `[` $byteSel `]` `:` type($res)
763
763
}];
764
764
}
765
765
766
- def ROCDL_CvtScaleF32SrFp8Bf16 :
766
+ def ROCDL_CvtScaleF32SrFp8Bf16Op :
767
767
ROCDL_IntrOp<"cvt.scalef32.sr.fp8.bf16", [], [], [Pure], 1>,
768
768
Arguments<(ins I32:$old, BF16:$src, I32:$seed, F32: $scale, I32:$byteSel)> {
769
769
let summary = "Scale and convert packed bf16 to packed fp8 using stochastic rounding";
770
770
let description = [{
771
- Scale `src` by the exponent in `scale` then convert to packed fp8 with stochastic rounding
772
- using seed data in `seed`. store into the `byteSel`th byte of `old`, preserving the others.
771
+ Scale `src` by the exponent in `scale`, then convert to packed fp8 with stochastic rounding
772
+ using seed data in `seed`. Store into the `byteSel`th byte of `old`, preserving the others.
773
773
774
774
}];
775
775
let assemblyFormat = [{
776
776
attr-dict $src `,` $seed `,` $scale `->` $old `[` $byteSel `]` `:` type($res)
777
777
}];
778
778
}
779
779
780
- def ROCDL_CvtScaleF32SrBf8Bf16 :
780
+ def ROCDL_CvtScaleF32SrBf8Bf16Op :
781
781
ROCDL_IntrOp<"cvt.scalef32.sr.bf8.bf16", [], [], [Pure], 1>,
782
782
Arguments<(ins I32:$old, BF16:$src, I32:$seed, F32: $scale, I32:$byteSel)> {
783
783
let summary = "Scale and convert bf16 to packed fp8 using stochastic rounding";
784
784
let description = [{
785
- Scale `src` by the exponent in `scale` then convert to packed p8 with stochastic rounding
786
- using seed data in `seed`. store into the `byteSel`th byte of `old`, preserving the others.
785
+ Scale `src` by the exponent in `scale`, then convert to packed p8 with stochastic rounding
786
+ using seed data in `seed`. Store into the `byteSel`th byte of `old`, preserving the others.
787
787
788
788
}];
789
789
let assemblyFormat = [{
790
790
attr-dict $src `,` $seed `,` $scale `->` $old `[` $byteSel `]` `:` type($res)
791
791
}];
792
792
}
793
793
794
- def ROCDL_CvtScaleF32PkF16Fp8 :
794
+ def ROCDL_CvtScaleF32PkF16Fp8Op :
795
795
ROCDL_IntrOp<"cvt.scalef32.pk.f16.fp8", [], [], [Pure], 1>,
796
796
Arguments<(ins I32:$src, F32: $scale, I1:$wordSel)> {
797
- let summary = "Scale and convert fp8 to packed f16";
798
- let description = [{ Scale `src` based on $wordSel by the exponent in ` scale`
799
- then convert to packed f16 .
797
+ let summary = "Convert fp8 to packed f16 and scale ";
798
+ let description = [{ Convert `src` based on $wordSel to packed f16, then scale
799
+ the packed values by the exponent in `scale` .
800
800
}];
801
801
let assemblyFormat = [{
802
802
attr-dict $src `[` $wordSel `]` `,` $scale `:` type($res)
803
803
}];
804
804
}
805
805
806
- def ROCDL_CvtScaleF32PkF16Bf8 :
806
+ def ROCDL_CvtScaleF32PkF16Bf8Op :
807
807
ROCDL_IntrOp<"cvt.scalef32.pk.f16.bf8", [], [], [Pure], 1>,
808
808
Arguments<(ins I32:$src, F32: $scale, I1:$wordSel)> {
809
- let summary = "Scale and convert bf8 to packed f16";
810
- let description = [{ Scale `src` based on $wordSel by the exponent in ` scale`
811
- then convert to packed f16 .
809
+ let summary = "convert bf8 to packed f16 and scale ";
810
+ let description = [{ Convert `src` based on $wordSel to packed f16, then scale
811
+ the packed values by exponent in `scale` .
812
812
}];
813
813
let assemblyFormat = [{
814
814
attr-dict $src `[` $wordSel `]` `,` $scale `:` type($res)
815
815
}];
816
816
}
817
817
818
- def ROCDL_CvtScaleF16Fp8 :
818
+ def ROCDL_CvtScaleF32PkBf16Fp8Op :
819
+ ROCDL_IntrOp<"cvt.scalef32.pk.bf16.fp8", [], [], [Pure], 1>,
820
+ Arguments<(ins I32:$src, F32: $scale, I1:$wordSel)> {
821
+ let summary = "Convert fp8 to packed bf16 and scale";
822
+ let description = [{ Convert `src` based on $wordSel to packed bf16, then scale
823
+ the packed values by the exponent in `scale`.
824
+ }];
825
+ let assemblyFormat = [{
826
+ attr-dict $src `[` $wordSel `]` `,` $scale `:` type($res)
827
+ }];
828
+ }
829
+
830
+ def ROCDL_CvtScaleF32PkBf16Bf8Op :
831
+ ROCDL_IntrOp<"cvt.scalef32.pk.bf16.bf8", [], [], [Pure], 1>,
832
+ Arguments<(ins I32:$src, F32: $scale, I1:$wordSel)> {
833
+ let summary = "Convert bf8 to packed bf16 and scale";
834
+ let description = [{ Convert `src` based on $wordSel to packed bf16, then scale
835
+ the packed values by the exponent in `scale`.
836
+ }];
837
+ let assemblyFormat = [{
838
+ attr-dict $src `[` $wordSel `]` `,` $scale `:` type($res)
839
+ }];
840
+ }
841
+
842
+ def ROCDL_CvtScaleF16Fp8Op :
819
843
ROCDL_IntrOp<"cvt.scalef32.f16.fp8", [], [], [Pure], 1>,
820
844
Arguments<(ins ROCDL_V2F16Type:$old, I32:$src, F32: $scale, I32:$byteSel, I1:$wordSel)> {
821
845
let summary = "Scale and convert fp8 to f16";
822
- let description = [{ Scale `src` based on $wordSel by the exponent in `scale`
823
- then convert to f16 store into the `byteSel`th byte of `old`, preserving the others.
846
+ let description = [{ Convert `src` based on $wordSel to f16, then scale the value
847
+ by the exponent in `scale`. Store the result into the `byteSel`th byte of `old`,
848
+ preserving the others.
824
849
}];
825
850
let assemblyFormat = [{
826
851
attr-dict $src `[` $wordSel `]` `,` $scale `->` $old `[` $byteSel `]` `:` type($res)
827
852
}];
828
853
}
829
854
830
- def ROCDL_CvtScaleF16Bf8 :
855
+ def ROCDL_CvtScaleF16Bf8Op :
831
856
ROCDL_IntrOp<"cvt.scalef32.f16.bf8", [], [], [Pure], 1>,
832
857
Arguments<(ins ROCDL_V2F16Type:$old, I32:$src, F32: $scale, I32:$byteSel, I1:$wordSel)> {
833
858
let summary = "Scale and convert fp8 to f16";
834
- let description = [{ Scale `src` based on $wordSel by the exponent in `scale`
835
- then convert to f16 store into the `byteSel`th byte of `old`, preserving the others.
859
+ let description = [{ Convert `src` based on $wordSel to f16, then scale the value
860
+ by the exponent in `scale`. Store the result into the `byteSel`th byte of `old`,
861
+ preserving the others.
836
862
}];
837
863
let assemblyFormat = [{
838
864
attr-dict $src `[` $wordSel `]` `,` $scale `->` $old `[` $byteSel `]` `:` type($res)
@@ -842,25 +868,25 @@ def ROCDL_CvtScaleF16Bf8 :
842
868
//===---------------------------------------------------------------------===//
843
869
// 32-bit float intrinsics
844
870
//===---------------------------------------------------------------------===//
845
- def ROCDL_CvtScale32PkF32Fp8 :
871
+ def ROCDL_CvtScaleF32PkF32Fp8Op :
846
872
ROCDL_IntrOp<"cvt.scalef32.pk.f32.fp8", [], [], [Pure], 1>,
847
873
Arguments<(ins I32:$src, F32: $scale, I1:$wordSel)> {
848
874
let summary = "Scale and convert packed fp8 to packed f32";
849
875
let description = [{
850
- Scale `src` by the exponent in `scale` then convert to packed fp32.
851
- Store the result in low/high word based on $wordSel, preserving the other word .
876
+ Convert `src` based on $wordSel to packed fp32, then scale the packed values by
877
+ the exponent in `scale`. Store the result in a vector .
852
878
}];
853
879
let assemblyFormat = [{
854
880
attr-dict $src `[` $wordSel `]` `,` $scale `:` type($res)
855
881
}];
856
882
}
857
- def ROCDL_CvtScale32PkF32Bf8 :
883
+ def ROCDL_CvtScaleF32PkF32Bf8Op :
858
884
ROCDL_IntrOp<"cvt.scalef32.pk.f32.bf8", [], [], [Pure], 1>,
859
885
Arguments<(ins I32:$src, F32: $scale, I1:$wordSel)> {
860
886
let summary = "Scale and convert packed bf8 to packed f32";
861
887
let description = [{
862
- Scale `src` by the exponent in `scale` then convert to packed fp32.
863
- Store the result in low/high word based on $wordSel, preserving the other word .
888
+ Convert `src` based on $wordSel to packed fp32, then scale the packed values by
889
+ the exponent in `scale`. Store the result in a vector .
864
890
}];
865
891
let assemblyFormat = [{
866
892
attr-dict $src `[` $wordSel `]` `,` $scale `:` type($res)
@@ -869,7 +895,7 @@ def ROCDL_CvtScale32PkF32Bf8 :
869
895
//===---------------------------------------------------------------------===//
870
896
// 8-bit float scale intrinsics
871
897
//===---------------------------------------------------------------------===//
872
- def ROCDL_CvtScaleF32PkFp8F32 :
898
+ def ROCDL_CvtScaleF32PkFp8F32Op :
873
899
ROCDL_IntrOp<"cvt.scalef32.pk.fp8.f32", [], [], [Pure], 1>,
874
900
Arguments<(ins ROCDL_V2I16Type:$old, F32:$srcA, F32:$srcB, F32:$scale, I1:$wordSel)> {
875
901
let summary = "Scale and convert two f32's to packed fp8";
@@ -882,7 +908,7 @@ def ROCDL_CvtScaleF32PkFp8F32:
882
908
}];
883
909
}
884
910
885
- def ROCDL_CvtScaleF32PkBf8F32 :
911
+ def ROCDL_CvtScaleF32PkBf8F32Op :
886
912
ROCDL_IntrOp<"cvt.scalef32.pk.bf8.f32", [], [], [Pure], 1>,
887
913
Arguments<(ins ROCDL_V2I16Type:$old, F32:$srcA, F32:$srcB, F32: $scale, I1:$wordSel)> {
888
914
let summary = "Scale and convert two f32's to packed bf8";
@@ -895,7 +921,7 @@ def ROCDL_CvtScaleF32PkBf8F32:
895
921
}];
896
922
}
897
923
898
- def ROCDL_CvtScaleF32SrFp8F32 :
924
+ def ROCDL_CvtScaleF32SrFp8F32Op :
899
925
ROCDL_IntrOp<"cvt.scalef32.sr.fp8.f32", [], [], [Pure], 1>,
900
926
Arguments<(ins I32:$old, F32:$src, I32:$seed, F32: $scale, I32:$byteSel)> {
901
927
let summary = "Scale and convert f32 to fp8 using stochastic rounding";
@@ -909,7 +935,7 @@ def ROCDL_CvtScaleF32SrFp8F32:
909
935
}
910
936
911
937
912
- def ROCDL_CvtScaleF32SrBf8F32 :
938
+ def ROCDL_CvtScaleF32SrBf8F32Op :
913
939
ROCDL_IntrOp<"cvt.scalef32.sr.bf8.f32", [], [], [Pure], 1>,
914
940
Arguments<(ins I32:$old, F32:$src, I32:$seed, F32: $scale, I32:$byteSel)> {
915
941
let summary = "Scale and convert f32 to bf8 using stochastic rounding";
@@ -978,6 +1004,29 @@ def ROCDL_CvtScaleF32Fp8Op :
978
1004
}];
979
1005
}
980
1006
1007
+ def ROCDL_CvtPkF32Fp8Op :
1008
+ ROCDL_IntrOp<"cvt.pk.f32.fp8", [], [], [Pure], 1>,
1009
+ Arguments<(ins I32:$src, I1:$wordSel)> {
1010
+ let summary = "Convert packed fp8 to packed f32";
1011
+ let description = [{
1012
+ Convert `src` based on $wordSel to packed fp32.
1013
+ }];
1014
+ let assemblyFormat = [{
1015
+ attr-dict $src `[` $wordSel `]` `:` type($res)
1016
+ }];
1017
+ }
1018
+
1019
+ def ROCDL_CvtPkF32Bf8Op :
1020
+ ROCDL_IntrOp<"cvt.pk.f32.bf8", [], [], [Pure], 1>,
1021
+ Arguments<(ins I32:$src, I1:$wordSel)> {
1022
+ let summary = "Convert packed bf8 to packed f32";
1023
+ let description = [{
1024
+ Convert `src` based on $wordSel to packed fp32,
1025
+ }];
1026
+ let assemblyFormat = [{
1027
+ attr-dict $src `[` $wordSel `]` `:` type($res)
1028
+ }];
1029
+ }
981
1030
982
1031
def ROCDL_CvtPkBf8F32Op :
983
1032
ROCDL_IntrOp<"cvt.pk.bf8.f32", [], [], [Pure], 1>,
0 commit comments