已合并
add tensor detail info for tools #219
好好说话95号创建于 1月31日
add tensor detail info for tools #219
已合并
共 19 个文件变更+4844-1
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -40,6 +41,9 @@ template <typename T> | |||
| 40 | __aicore__ inline void __inout_pipe__(MTE2) DataCopy(const LocalTensor<T>& dst, const GlobalTensor<T>& src, | 41 | __aicore__ inline void __inout_pipe__(MTE2) DataCopy(const LocalTensor<T>& dst, const GlobalTensor<T>& src, |
| 41 | const DataCopyParams& repeatParams) | 42 | const DataCopyParams& repeatParams) |
| 42 | { | 43 | { |
| 44 | + | ||
| 45 | + MstxTensor::GetMstxDataCopyInfo(dst, src, repeatParams, "DataCopy"); | ||
| 46 | + | ||
| 43 | using PrimType = PrimT<T>; | 47 | using PrimType = PrimT<T>; |
| 44 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 48 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| 45 | 49 | ||
| @@ -240,6 +244,9 @@ template <typename T> | |||
| 240 | __aicore__ inline __inout_pipe__(MTE3) void DataCopy(const GlobalTensor<T>& dst, const LocalTensor<T>& src, | 244 | __aicore__ inline __inout_pipe__(MTE3) void DataCopy(const GlobalTensor<T>& dst, const LocalTensor<T>& src, |
| 241 | const DataCopyParams& repeatParams) | 245 | const DataCopyParams& repeatParams) |
| 242 | { | 246 | { |
| 247 | + | ||
| 248 | + MstxTensor::GetMstxDataCopyInfo(dst, src, repeatParams, "DataCopy"); | ||
| 249 | + | ||
| 243 | using PrimType = PrimT<T>; | 250 | using PrimType = PrimT<T>; |
| 244 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); | 251 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); |
| 245 | 252 | ||
| @@ -308,6 +315,9 @@ template <typename T> | |||
| 308 | __aicore__ inline void DataCopy(const LocalTensor<T> &dst, const LocalTensor<T> &src, | 315 | __aicore__ inline void DataCopy(const LocalTensor<T> &dst, const LocalTensor<T> &src, |
| 309 | const DataCopyParams &repeatParams) | 316 | const DataCopyParams &repeatParams) |
| 310 | { | 317 | { |
| 318 | + | ||
| 319 | + MstxTensor::GetMstxDataCopyInfo(dst, src, repeatParams, "DataCopy"); | ||
| 320 | + | ||
| 311 | using PrimType = PrimT<T>; | 321 | using PrimType = PrimT<T>; |
| 312 | 322 | ||
| 313 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 323 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| @@ -380,6 +390,9 @@ template <typename T, typename U> | |||
| 380 | __aicore__ inline void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, | 390 | __aicore__ inline void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, |
| 381 | const DataCopyParams &repeatParams) | 391 | const DataCopyParams &repeatParams) |
| 382 | { | 392 | { |
| 393 | + | ||
| 394 | + MstxTensor::GetMstxDataCopyInfo(dst, src, repeatParams, "DataCopy"); | ||
| 395 | + | ||
| 383 | using PrimDstType = PrimT<T>; | 396 | using PrimDstType = PrimT<T>; |
| 384 | using PrimSrcType = PrimT<U>; | 397 | using PrimSrcType = PrimT<U>; |
| 385 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 398 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| @@ -449,6 +462,9 @@ template <typename T, bool IsSetMask> | |||
| 449 | __aicore__ inline __inout_pipe__(V) void Copy(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 462 | __aicore__ inline __inout_pipe__(V) void Copy(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 450 | const uint64_t mask[], const uint8_t repeatTime, const CopyRepeatParams& repeatParams) | 463 | const uint64_t mask[], const uint8_t repeatTime, const CopyRepeatParams& repeatParams) |
| 451 | { | 464 | { |
| 465 | + | ||
| 466 | + MstxTensor::GetMstxVecCopyInfo(dst, src, mask[0], mask[1], repeatTime, repeatParams, IsSetMask, "Copy"); | ||
| 467 | + | ||
| 452 | using PrimType = PrimT<T>; | 468 | using PrimType = PrimT<T>; |
| 453 | 469 | ||
| 454 | MaskSetter::Instance().SetMask(IsSetMask); | 470 | MaskSetter::Instance().SetMask(IsSetMask); |
| @@ -465,6 +481,9 @@ template <typename T, bool IsSetMask> | |||
| 465 | __aicore__ inline __inout_pipe__(V) void Copy(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 481 | __aicore__ inline __inout_pipe__(V) void Copy(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 466 | const uint64_t mask, const uint8_t repeatTime, const CopyRepeatParams& repeatParams) | 482 | const uint64_t mask, const uint8_t repeatTime, const CopyRepeatParams& repeatParams) |
| 467 | { | 483 | { |
| 484 | + | ||
| 485 | + MstxTensor::GetMstxVecCopyInfo(dst, src, mask, repeatTime, repeatParams, IsSetMask, "Copy"); | ||
| 486 | + | ||
| 468 | using PrimType = PrimT<T>; | 487 | using PrimType = PrimT<T>; |
| 469 | 488 | ||
| 470 | MaskSetter::Instance().SetMask(IsSetMask); | 489 | MaskSetter::Instance().SetMask(IsSetMask); |
| @@ -871,6 +890,9 @@ template <typename T> | |||
| 871 | __aicore__ inline __inout_pipe__(MTE2) void DataCopy(const LocalTensor<T>& dst, const GlobalTensor<T>& src, | 890 | __aicore__ inline __inout_pipe__(MTE2) void DataCopy(const LocalTensor<T>& dst, const GlobalTensor<T>& src, |
| 872 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) | 891 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) |
| 873 | { | 892 | { |
| 893 | + | ||
| 894 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 895 | + | ||
| 874 | using PrimType = PrimT<T>; | 896 | using PrimType = PrimT<T>; |
| 875 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 897 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| 876 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 898 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| @@ -906,6 +928,9 @@ template <typename T> | |||
| 906 | __aicore__ inline __inout_pipe__(MTE3) void DataCopy(const GlobalTensor<T>& dst, const LocalTensor<T>& src, | 928 | __aicore__ inline __inout_pipe__(MTE3) void DataCopy(const GlobalTensor<T>& dst, const LocalTensor<T>& src, |
| 907 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) | 929 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) |
| 908 | { | 930 | { |
| 931 | + | ||
| 932 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 933 | + | ||
| 909 | using PrimType = PrimT<T>; | 934 | using PrimType = PrimT<T>; |
| 910 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); | 935 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); |
| 911 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 936 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| @@ -943,6 +968,9 @@ template <typename T> | |||
| 943 | __aicore__ inline void DataCopy(const LocalTensor<T> &dst, const LocalTensor<T> &src, | 968 | __aicore__ inline void DataCopy(const LocalTensor<T> &dst, const LocalTensor<T> &src, |
| 944 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) | 969 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) |
| 945 | { | 970 | { |
| 971 | + | ||
| 972 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 973 | + | ||
| 946 | using PrimType = PrimT<T>; | 974 | using PrimType = PrimT<T>; |
| 947 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 975 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| 948 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); | 976 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); |
| @@ -1031,6 +1059,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1031 | __aicore__ inline void DataCopy(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 1059 | __aicore__ inline void DataCopy(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 1032 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) | 1060 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) |
| 1033 | { | 1061 | { |
| 1062 | + | ||
| 1063 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1064 | + | ||
| 1034 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 1065 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| 1035 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); | 1066 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); |
| 1036 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 1067 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| @@ -1058,6 +1089,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1058 | __aicore__ inline void DataCopy(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 1089 | __aicore__ inline void DataCopy(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 1059 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) | 1090 | const DataCopyParams& intriParams, const DataCopyEnhancedParams& enhancedParams) |
| 1060 | { | 1091 | { |
| 1092 | + | ||
| 1093 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1094 | + | ||
| 1061 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | 1095 | const Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); |
| 1062 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); | 1096 | const Hardware srcHWPos = GetPhyType((TPosition)src.GetPosition()); |
| 1063 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 1097 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| @@ -1103,6 +1137,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1103 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, | 1137 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, |
| 1104 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) | 1138 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) |
| 1105 | { | 1139 | { |
| 1140 | + | ||
| 1141 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1142 | + | ||
| 1106 | CheckTensorL0C2UB(dst, src); | 1143 | CheckTensorL0C2UB(dst, src); |
| 1107 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 1144 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| 1108 | DataCopyL0C2UBImpl((__ubuf__ half*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, | 1145 | DataCopyL0C2UBImpl((__ubuf__ half*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, |
| @@ -1115,6 +1152,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1115 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, | 1152 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, |
| 1116 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) | 1153 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) |
| 1117 | { | 1154 | { |
| 1155 | + | ||
| 1156 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1157 | + | ||
| 1118 | CheckTensorL0C2UB(dst, src); | 1158 | CheckTensorL0C2UB(dst, src); |
| 1119 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 1159 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| 1120 | DataCopyL0C2UBImpl((__ubuf__ int16_t*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, | 1160 | DataCopyL0C2UBImpl((__ubuf__ int16_t*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, |
| @@ -1127,6 +1167,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1127 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, | 1167 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, |
| 1128 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) | 1168 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) |
| 1129 | { | 1169 | { |
| 1170 | + | ||
| 1171 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1172 | + | ||
| 1130 | CheckTensorL0C2UB(dst, src); | 1173 | CheckTensorL0C2UB(dst, src); |
| 1131 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 1174 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| 1132 | DataCopyL0C2UBImpl((__ubuf__ int8_t*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, | 1175 | DataCopyL0C2UBImpl((__ubuf__ int8_t*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, |
| @@ -1139,6 +1182,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1139 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, | 1182 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, |
| 1140 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) | 1183 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) |
| 1141 | { | 1184 | { |
| 1185 | + | ||
| 1186 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1187 | + | ||
| 1142 | CheckTensorL0C2UB(dst, src); | 1188 | CheckTensorL0C2UB(dst, src); |
| 1143 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); | 1189 | ASCENDC_REPORT_OVERFLOW_MEM((CheckDataCopyTensorSizeOverflow(dst, src, intriParams, enhancedParams))); |
| 1144 | DataCopyL0C2UBImpl((__ubuf__ uint8_t*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, | 1190 | DataCopyL0C2UBImpl((__ubuf__ uint8_t*)dst.GetPhyAddr(), (__cc__ int32_t*)src.GetPhyAddr(), intriParams, |
| @@ -1151,6 +1197,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1151 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, | 1197 | __aicore__ inline __inout_pipe__(V) void DataCopy(const LocalTensor<T> &dst, const LocalTensor<U> &src, |
| 1152 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) | 1198 | const DataCopyParams &intriParams, const DataCopyEnhancedParams &enhancedParams) |
| 1153 | { | 1199 | { |
| 1200 | + | ||
| 1201 | + MstxTensor::GetMstxDataCopyInfo(dst, src, intriParams, "DataCopy"); | ||
| 1202 | + | ||
| 1154 | CheckTensorPos<U>(src, Hardware::UB, "src", "CO2", | 1203 | CheckTensorPos<U>(src, Hardware::UB, "src", "CO2", |
| 1155 | "DataCopy from LocalTensor(CO2) to LocalTensor(CO1) with DataCopyEnhancedParams"); | 1204 | "DataCopy from LocalTensor(CO2) to LocalTensor(CO1) with DataCopyEnhancedParams"); |
| 1156 | CheckTensorPos<T>(dst, Hardware::L0C, "dst", "CO1", | 1205 | CheckTensorPos<T>(dst, Hardware::L0C, "dst", "CO1", |
| @@ -1165,6 +1214,9 @@ template <typename T, PaddingMode mode> | |||
| 1165 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, | 1214 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, |
| 1166 | const GlobalTensor<T> &src, const DataCopyParams &dataCopyParams, const DataCopyPadParams &padParams) | 1215 | const GlobalTensor<T> &src, const DataCopyParams &dataCopyParams, const DataCopyPadParams &padParams) |
| 1167 | { | 1216 | { |
| 1217 | + | ||
| 1218 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, padParams, "DataCopyPad"); | ||
| 1219 | + | ||
| 1168 | using PrimType = PrimT<T>; | 1220 | using PrimType = PrimT<T>; |
| 1169 | 1221 | ||
| 1170 | if (!CheckFuncDataCopyPad(dst, src, dataCopyParams, padParams, "DataCopyPad from GM to VECIN/VECOUT")) { | 1222 | if (!CheckFuncDataCopyPad(dst, src, dataCopyParams, padParams, "DataCopyPad from GM to VECIN/VECOUT")) { |
| @@ -1193,6 +1245,9 @@ template <typename T, PaddingMode mode> | |||
| 1193 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, | 1245 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, |
| 1194 | const LocalTensor<T> &src, const DataCopyParams &dataCopyParams) | 1246 | const LocalTensor<T> &src, const DataCopyParams &dataCopyParams) |
| 1195 | { | 1247 | { |
| 1248 | + | ||
| 1249 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, "DataCopyPad"); | ||
| 1250 | + | ||
| 1196 | using PrimType = PrimT<T>; | 1251 | using PrimType = PrimT<T>; |
| 1197 | 1252 | ||
| 1198 | if ASCEND_IS_AIC { | 1253 | if ASCEND_IS_AIC { |
| @@ -1216,6 +1271,9 @@ template <typename T> | |||
| 1216 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, | 1271 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, |
| 1217 | const GlobalTensor<T> &src, const DataCopyParams &dataCopyParams, const DataCopyPadParams &padParams) | 1272 | const GlobalTensor<T> &src, const DataCopyParams &dataCopyParams, const DataCopyPadParams &padParams) |
| 1218 | { | 1273 | { |
| 1274 | + | ||
| 1275 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, padParams, "DataCopyPad"); | ||
| 1276 | + | ||
| 1219 | using PrimType = PrimT<T>; | 1277 | using PrimType = PrimT<T>; |
| 1220 | if ASCEND_IS_AIC { | 1278 | if ASCEND_IS_AIC { |
| 1221 | return; | 1279 | return; |
| @@ -1257,6 +1315,9 @@ template <typename T> | |||
| 1257 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, | 1315 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, |
| 1258 | const LocalTensor<T> &src, const DataCopyParams &dataCopyParams) | 1316 | const LocalTensor<T> &src, const DataCopyParams &dataCopyParams) |
| 1259 | { | 1317 | { |
| 1318 | + | ||
| 1319 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, "DataCopyPad"); | ||
| 1320 | + | ||
| 1260 | using PrimType = PrimT<T>; | 1321 | using PrimType = PrimT<T>; |
| 1261 | if ASCEND_IS_AIC { | 1322 | if ASCEND_IS_AIC { |
| 1262 | return; | 1323 | return; |
| @@ -1308,6 +1369,9 @@ template <typename T, PaddingMode mode> | |||
| 1308 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, | 1369 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, |
| 1309 | const GlobalTensor<T> &src, const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<T> &padParams) | 1370 | const GlobalTensor<T> &src, const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<T> &padParams) |
| 1310 | { | 1371 | { |
| 1372 | + | ||
| 1373 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, padParams, "DataCopyPad"); | ||
| 1374 | + | ||
| 1311 | 1375 | ||
| 1312 | if (!CheckFuncDataCopyPad(dst, src, dataCopyParams, padParams, "DataCopyPad from GM to VECIN/VECOUT")) { | 1376 | if (!CheckFuncDataCopyPad(dst, src, dataCopyParams, padParams, "DataCopyPad from GM to VECIN/VECOUT")) { |
| 1313 | ASCENDC_REPORT_CHECK_ERROR("DataCopyPad from GM to VECIN / VECOUT", KernelFuncType::NONE_MODE); | 1377 | ASCENDC_REPORT_CHECK_ERROR("DataCopyPad from GM to VECIN / VECOUT", KernelFuncType::NONE_MODE); |
| @@ -1333,6 +1397,9 @@ template <typename T> | |||
| 1333 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, | 1397 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, |
| 1334 | const GlobalTensor<T> &src, const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<T> &padParams) | 1398 | const GlobalTensor<T> &src, const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<T> &padParams) |
| 1335 | { | 1399 | { |
| 1400 | + | ||
| 1401 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, padParams, "DataCopyPad"); | ||
| 1402 | + | ||
| 1336 | if ASCEND_IS_AIC { | 1403 | if ASCEND_IS_AIC { |
| 1337 | return; | 1404 | return; |
| 1338 | } | 1405 | } |
| @@ -1377,6 +1444,9 @@ template <typename T, typename U, typename Std::enable_if<Std::is_same<PrimT<T>, | |||
| 1377 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, | 1444 | __aicore__ inline __inout_pipe__(MTE2) void DataCopyPad(const LocalTensor<T> &dst, |
| 1378 | const GlobalTensor<T> &src, const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<U> &padParams) | 1445 | const GlobalTensor<T> &src, const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<U> &padParams) |
| 1379 | { | 1446 | { |
| 1447 | + | ||
| 1448 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, padParams, "DataCopyPad"); | ||
| 1449 | + | ||
| 1380 | using PrimType = PrimT<T>; | 1450 | using PrimType = PrimT<T>; |
| 1381 | if ASCEND_IS_AIC { | 1451 | if ASCEND_IS_AIC { |
| 1382 | return; | 1452 | return; |
| @@ -1397,6 +1467,9 @@ template <typename T, PaddingMode mode> | |||
| 1397 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, | 1467 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, |
| 1398 | const LocalTensor<T> &src, const DataCopyExtParams &dataCopyParams) | 1468 | const LocalTensor<T> &src, const DataCopyExtParams &dataCopyParams) |
| 1399 | { | 1469 | { |
| 1470 | + | ||
| 1471 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, "DataCopyPad"); | ||
| 1472 | + | ||
| 1400 | using PrimType = PrimT<T>; | 1473 | using PrimType = PrimT<T>; |
| 1401 | 1474 | ||
| 1402 | if ASCEND_IS_AIC { | 1475 | if ASCEND_IS_AIC { |
| @@ -1420,6 +1493,9 @@ template <typename T> | |||
| 1420 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, | 1493 | __aicore__ inline __inout_pipe__(MTE3) void DataCopyPad(const GlobalTensor<T> &dst, |
| 1421 | const LocalTensor<T> &src, const DataCopyExtParams &dataCopyParams) | 1494 | const LocalTensor<T> &src, const DataCopyExtParams &dataCopyParams) |
| 1422 | { | 1495 | { |
| 1496 | + | ||
| 1497 | + MstxTensor::GetMstxDataCopyPadInfo(dst, src, dataCopyParams, "DataCopyPad"); | ||
| 1498 | + | ||
| 1423 | using PrimType = PrimT<T>; | 1499 | using PrimType = PrimT<T>; |
| 1424 | if ASCEND_IS_AIC { | 1500 | if ASCEND_IS_AIC { |
| 1425 | return; | 1501 | return; |
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -70,6 +71,10 @@ __aicore__ inline void BilinearInterpolation(const LocalTensor<T> &dst, const Lo | |||
| 70 | bool repeatMode, uint16_t dstBlkStride, uint16_t vROffset, uint8_t vRepeat, | 71 | bool repeatMode, uint16_t dstBlkStride, uint16_t vROffset, uint8_t vRepeat, |
| 71 | const LocalTensor<uint8_t> &sharedTmpBuffer) | 72 | const LocalTensor<uint8_t> &sharedTmpBuffer) |
| 72 | { | 73 | { |
| 74 | + | ||
| 75 | + MstxTensor::GetMstxVecBilinearInterpolationInfo(dst, src0, src0Offset, src1, mask, hRepeat, | ||
| 76 | + repeatMode, dstBlkStride, vROffset, vRepeat, sharedTmpBuffer, "BilinearInterpolation"); | ||
| 77 | + | ||
| 73 | 78 | ||
| 74 | if (!CheckFuncBilinearInterpolation(dst, src0, src0Offset, src1, mask, hRepeat, repeatMode, | 79 | if (!CheckFuncBilinearInterpolation(dst, src0, src0Offset, src1, mask, hRepeat, repeatMode, |
| 75 | dstBlkStride, vROffset, vRepeat, "BilinearInterpolation")) { | 80 | dstBlkStride, vROffset, vRepeat, "BilinearInterpolation")) { |
| @@ -87,6 +92,10 @@ __aicore__ inline void BilinearInterpolation(const LocalTensor<T> &dst, const Lo | |||
| 87 | bool repeatMode, uint16_t dstBlkStride, uint16_t vROffset, uint8_t vRepeat, | 92 | bool repeatMode, uint16_t dstBlkStride, uint16_t vROffset, uint8_t vRepeat, |
| 88 | const LocalTensor<uint8_t> &sharedTmpBuffer) | 93 | const LocalTensor<uint8_t> &sharedTmpBuffer) |
| 89 | { | 94 | { |
| 95 | + | ||
| 96 | + MstxTensor::GetMstxVecBilinearInterpolationInfo(dst, src0, src0Offset, src1, mask[0], mask[1], hRepeat, | ||
| 97 | + repeatMode, dstBlkStride, vROffset, vRepeat, sharedTmpBuffer, "BilinearInterpolation"); | ||
| 98 | + | ||
| 90 | 99 | ||
| 91 | if (!CheckFuncBilinearInterpolation(dst, src0, src0Offset, src1, mask, hRepeat, repeatMode, | 100 | if (!CheckFuncBilinearInterpolation(dst, src0, src0Offset, src1, mask, hRepeat, repeatMode, |
| 92 | dstBlkStride, vROffset, vRepeat, "BilinearInterpolation")) { | 101 | dstBlkStride, vROffset, vRepeat, "BilinearInterpolation")) { |
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | + | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | 23 | ||
| @@ -68,6 +69,9 @@ __aicore__ inline void Add(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 68 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Add")) { | 69 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Add")) { |
| 69 | ASCENDC_REPORT_CHECK_ERROR("Add", KernelFuncType::MASK_BIT_MODE); | 70 | ASCENDC_REPORT_CHECK_ERROR("Add", KernelFuncType::MASK_BIT_MODE); |
| 70 | } | 71 | } |
| 72 | + | ||
| 73 | + | ||
| 74 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Add"); | ||
| 71 | 75 | ||
| 72 | AddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 76 | AddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 73 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 77 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -83,6 +87,9 @@ __aicore__ inline void Add(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 83 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Add")) { | 87 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Add")) { |
| 84 | ASCENDC_REPORT_CHECK_ERROR("Add", KernelFuncType::MASK_COUNT_MODE); | 88 | ASCENDC_REPORT_CHECK_ERROR("Add", KernelFuncType::MASK_COUNT_MODE); |
| 85 | } | 89 | } |
| 90 | + | ||
| 91 | + | ||
| 92 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Add"); | ||
| 86 | 93 | ||
| 87 | AddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 94 | AddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 88 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 95 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -105,6 +112,9 @@ __aicore__ inline void Add(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 105 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Add")) { | 112 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Add")) { |
| 106 | ASCENDC_REPORT_CHECK_ERROR("Add", KernelFuncType::CALCOUNT_MODE); | 113 | ASCENDC_REPORT_CHECK_ERROR("Add", KernelFuncType::CALCOUNT_MODE); |
| 107 | } | 114 | } |
| 115 | + | ||
| 116 | + | ||
| 117 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Add", count); | ||
C | |||
| 108 | 118 | ||
| 109 | AddImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 119 | AddImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 110 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 120 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -139,6 +149,9 @@ __aicore__ inline void Sub(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 139 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Sub")) { | 149 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Sub")) { |
| 140 | ASCENDC_REPORT_CHECK_ERROR("Sub", KernelFuncType::MASK_BIT_MODE); | 150 | ASCENDC_REPORT_CHECK_ERROR("Sub", KernelFuncType::MASK_BIT_MODE); |
| 141 | } | 151 | } |
| 152 | + | ||
| 153 | + | ||
| 154 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Sub"); | ||
| 142 | 155 | ||
| 143 | SubImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 156 | SubImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 144 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 157 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -154,6 +167,9 @@ __aicore__ inline void Sub(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 154 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Sub")) { | 167 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Sub")) { |
| 155 | ASCENDC_REPORT_CHECK_ERROR("Sub", KernelFuncType::MASK_COUNT_MODE); | 168 | ASCENDC_REPORT_CHECK_ERROR("Sub", KernelFuncType::MASK_COUNT_MODE); |
| 156 | } | 169 | } |
| 170 | + | ||
| 171 | + | ||
| 172 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Sub"); | ||
| 157 | 173 | ||
| 158 | SubImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 174 | SubImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 159 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 175 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -176,6 +192,9 @@ __aicore__ inline void Sub(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 176 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Sub")) { | 192 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Sub")) { |
| 177 | ASCENDC_REPORT_CHECK_ERROR("Sub", KernelFuncType::CALCOUNT_MODE); | 193 | ASCENDC_REPORT_CHECK_ERROR("Sub", KernelFuncType::CALCOUNT_MODE); |
| 178 | } | 194 | } |
| 195 | + | ||
| 196 | + | ||
| 197 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Sub", count); | ||
| 179 | 198 | ||
| 180 | SubImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 199 | SubImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 181 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 200 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -210,6 +229,9 @@ __aicore__ inline void Mul(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 210 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Mul")) { | 229 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Mul")) { |
| 211 | ASCENDC_REPORT_CHECK_ERROR("Mul", KernelFuncType::MASK_BIT_MODE); | 230 | ASCENDC_REPORT_CHECK_ERROR("Mul", KernelFuncType::MASK_BIT_MODE); |
| 212 | } | 231 | } |
| 232 | + | ||
| 233 | + | ||
| 234 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Mul"); | ||
| 213 | 235 | ||
| 214 | MulImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 236 | MulImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 215 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 237 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -225,6 +247,9 @@ __aicore__ inline void Mul(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 225 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Mul")) { | 247 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Mul")) { |
| 226 | ASCENDC_REPORT_CHECK_ERROR("Mul", KernelFuncType::MASK_COUNT_MODE); | 248 | ASCENDC_REPORT_CHECK_ERROR("Mul", KernelFuncType::MASK_COUNT_MODE); |
| 227 | } | 249 | } |
| 250 | + | ||
| 251 | + | ||
| 252 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Mul"); | ||
| 228 | 253 | ||
| 229 | MulImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 254 | MulImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 230 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 255 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -247,6 +272,9 @@ __aicore__ inline void Mul(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 247 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Mul")) { | 272 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Mul")) { |
| 248 | ASCENDC_REPORT_CHECK_ERROR("Mul", KernelFuncType::CALCOUNT_MODE); | 273 | ASCENDC_REPORT_CHECK_ERROR("Mul", KernelFuncType::CALCOUNT_MODE); |
| 249 | } | 274 | } |
| 275 | + | ||
| 276 | + | ||
| 277 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Mul", count); | ||
| 250 | 278 | ||
| 251 | MulImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 279 | MulImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 252 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 280 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -282,6 +310,9 @@ __aicore__ inline void Div(const LocalTensor<T> &dst, const LocalTensor<T> &src0 | |||
| 282 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { | 310 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { |
| 283 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_BIT_MODE); | 311 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_BIT_MODE); |
| 284 | } | 312 | } |
| 313 | + | ||
| 314 | + | ||
| 315 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Div"); | ||
| 285 | 316 | ||
| 286 | DivImpl<PrimType, isSetMask, config>((__ubuf__ PrimType *)dst.GetPhyAddr(), | 317 | DivImpl<PrimType, isSetMask, config>((__ubuf__ PrimType *)dst.GetPhyAddr(), |
| 287 | (__ubuf__ PrimType *)src0.GetPhyAddr(), | 318 | (__ubuf__ PrimType *)src0.GetPhyAddr(), |
| @@ -299,6 +330,9 @@ __aicore__ inline void Div(const LocalTensor<T> &dst, const LocalTensor<T> &src0 | |||
| 299 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { | 330 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { |
| 300 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_COUNT_MODE); | 331 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_COUNT_MODE); |
| 301 | } | 332 | } |
| 333 | + | ||
| 334 | + | ||
| 335 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Div"); | ||
| 302 | 336 | ||
| 303 | DivImpl<PrimType, isSetMask, config>((__ubuf__ PrimType *)dst.GetPhyAddr(), | 337 | DivImpl<PrimType, isSetMask, config>((__ubuf__ PrimType *)dst.GetPhyAddr(), |
| 304 | (__ubuf__ PrimType *)src0.GetPhyAddr(), | 338 | (__ubuf__ PrimType *)src0.GetPhyAddr(), |
| @@ -316,6 +350,9 @@ __aicore__ inline void Div(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 316 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { | 350 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { |
| 317 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_BIT_MODE); | 351 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_BIT_MODE); |
| 318 | } | 352 | } |
| 353 | + | ||
| 354 | + | ||
| 355 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Div"); | ||
| 319 | 356 | ||
| 320 | DivImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 357 | DivImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 321 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 358 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -331,6 +368,9 @@ __aicore__ inline void Div(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 331 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { | 368 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Div")) { |
| 332 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_COUNT_MODE); | 369 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::MASK_COUNT_MODE); |
| 333 | } | 370 | } |
| 371 | + | ||
| 372 | + | ||
| 373 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Div"); | ||
| 334 | 374 | ||
| 335 | DivImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 375 | DivImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 336 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 376 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -355,6 +395,9 @@ __aicore__ inline void Div(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 355 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Div")) { | 395 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Div")) { |
| 356 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::CALCOUNT_MODE); | 396 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::CALCOUNT_MODE); |
| 357 | } | 397 | } |
| 398 | + | ||
| 399 | + | ||
| 400 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Div", count); | ||
| 358 | 401 | ||
| 359 | DivImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 402 | DivImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 360 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 403 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -369,6 +412,9 @@ __aicore__ inline void Div(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 369 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Div")) { | 412 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Div")) { |
| 370 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::CALCOUNT_MODE); | 413 | ASCENDC_REPORT_CHECK_ERROR("Div", KernelFuncType::CALCOUNT_MODE); |
| 371 | } | 414 | } |
| 415 | + | ||
| 416 | + | ||
| 417 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Div", count); | ||
| 372 | 418 | ||
| 373 | DivImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 419 | DivImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 374 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 420 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -405,6 +451,9 @@ __aicore__ inline void MulAddDst(const LocalTensor<T>& dst, const LocalTensor<U> | |||
| 405 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulAddDst")) { | 451 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulAddDst")) { |
| 406 | ASCENDC_REPORT_CHECK_ERROR("MulAddDst", KernelFuncType::MASK_BIT_MODE); | 452 | ASCENDC_REPORT_CHECK_ERROR("MulAddDst", KernelFuncType::MASK_BIT_MODE); |
| 407 | } | 453 | } |
| 454 | + | ||
| 455 | + | ||
| 456 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "MulAddDst"); | ||
| 408 | 457 | ||
| 409 | MulAddDstImpl<PrimDstType, PrimSrcType, isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), | 458 | MulAddDstImpl<PrimDstType, PrimSrcType, isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), |
| 410 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, | 459 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -423,6 +472,9 @@ __aicore__ inline void MulAddDst(const LocalTensor<T>& dst, const LocalTensor<U> | |||
| 423 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulAddDst")) { | 472 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulAddDst")) { |
| 424 | ASCENDC_REPORT_CHECK_ERROR("MulAddDst", KernelFuncType::MASK_COUNT_MODE); | 473 | ASCENDC_REPORT_CHECK_ERROR("MulAddDst", KernelFuncType::MASK_COUNT_MODE); |
| 425 | } | 474 | } |
| 475 | + | ||
| 476 | + | ||
| 477 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "MulAddDst"); | ||
| 426 | 478 | ||
| 427 | MulAddDstImpl<PrimDstType, PrimSrcType, isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), | 479 | MulAddDstImpl<PrimDstType, PrimSrcType, isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), |
| 428 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, | 480 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -447,6 +499,9 @@ __aicore__ inline void MulAddDst(const LocalTensor<T>& dst, const LocalTensor<U> | |||
| 447 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "MulAddDst")) { | 499 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "MulAddDst")) { |
| 448 | ASCENDC_REPORT_CHECK_ERROR("MulAddDst", KernelFuncType::CALCOUNT_MODE); | 500 | ASCENDC_REPORT_CHECK_ERROR("MulAddDst", KernelFuncType::CALCOUNT_MODE); |
| 449 | } | 501 | } |
| 502 | + | ||
| 503 | + | ||
| 504 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "MulAddDst", count); | ||
| 450 | 505 | ||
| 451 | MulAddDstImpl((__ubuf__ PrimDstType*)dst.GetPhyAddr(), (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), | 506 | MulAddDstImpl((__ubuf__ PrimDstType*)dst.GetPhyAddr(), (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), |
| 452 | (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), count); | 507 | (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), count); |
| @@ -481,6 +536,9 @@ __aicore__ inline void Max(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 481 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Max")) { | 536 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Max")) { |
| 482 | ASCENDC_REPORT_CHECK_ERROR("Max", KernelFuncType::MASK_BIT_MODE); | 537 | ASCENDC_REPORT_CHECK_ERROR("Max", KernelFuncType::MASK_BIT_MODE); |
| 483 | } | 538 | } |
| 539 | + | ||
| 540 | + | ||
| 541 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Max"); | ||
| 484 | 542 | ||
| 485 | MaxImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 543 | MaxImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 486 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 544 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -496,6 +554,9 @@ __aicore__ inline void Max(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 496 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Max")) { | 554 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Max")) { |
| 497 | ASCENDC_REPORT_CHECK_ERROR("Max", KernelFuncType::MASK_COUNT_MODE); | 555 | ASCENDC_REPORT_CHECK_ERROR("Max", KernelFuncType::MASK_COUNT_MODE); |
| 498 | } | 556 | } |
| 557 | + | ||
| 558 | + | ||
| 559 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Max"); | ||
| 499 | 560 | ||
| 500 | MaxImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 561 | MaxImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 501 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 562 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -518,6 +579,9 @@ __aicore__ inline void Max(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 518 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Max")) { | 579 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Max")) { |
| 519 | ASCENDC_REPORT_CHECK_ERROR("Max", KernelFuncType::CALCOUNT_MODE); | 580 | ASCENDC_REPORT_CHECK_ERROR("Max", KernelFuncType::CALCOUNT_MODE); |
| 520 | } | 581 | } |
| 582 | + | ||
| 583 | + | ||
| 584 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Max", count); | ||
| 521 | 585 | ||
| 522 | MaxImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 586 | MaxImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 523 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 587 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -552,6 +616,9 @@ __aicore__ inline void Min(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 552 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Min")) { | 616 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Min")) { |
| 553 | ASCENDC_REPORT_CHECK_ERROR("Min", KernelFuncType::MASK_BIT_MODE); | 617 | ASCENDC_REPORT_CHECK_ERROR("Min", KernelFuncType::MASK_BIT_MODE); |
| 554 | } | 618 | } |
| 619 | + | ||
| 620 | + | ||
| 621 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Min"); | ||
| 555 | 622 | ||
| 556 | MinImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 623 | MinImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 557 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 624 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -567,6 +634,9 @@ __aicore__ inline void Min(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 567 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Min")) { | 634 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Min")) { |
| 568 | ASCENDC_REPORT_CHECK_ERROR("Min", KernelFuncType::MASK_COUNT_MODE); | 635 | ASCENDC_REPORT_CHECK_ERROR("Min", KernelFuncType::MASK_COUNT_MODE); |
| 569 | } | 636 | } |
| 637 | + | ||
| 638 | + | ||
| 639 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Min"); | ||
| 570 | 640 | ||
| 571 | MinImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 641 | MinImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 572 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 642 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -589,6 +659,9 @@ __aicore__ inline void Min(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 589 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Min")) { | 659 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Min")) { |
| 590 | ASCENDC_REPORT_CHECK_ERROR("Min", KernelFuncType::CALCOUNT_MODE); | 660 | ASCENDC_REPORT_CHECK_ERROR("Min", KernelFuncType::CALCOUNT_MODE); |
| 591 | } | 661 | } |
| 662 | + | ||
| 663 | + | ||
| 664 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Min", count); | ||
| 592 | 665 | ||
| 593 | MinImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 666 | MinImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 594 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 667 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -623,6 +696,9 @@ __aicore__ inline void And(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 623 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "And")) { | 696 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "And")) { |
| 624 | ASCENDC_REPORT_CHECK_ERROR("And", KernelFuncType::MASK_BIT_MODE); | 697 | ASCENDC_REPORT_CHECK_ERROR("And", KernelFuncType::MASK_BIT_MODE); |
| 625 | } | 698 | } |
| 699 | + | ||
| 700 | + | ||
| 701 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "And"); | ||
| 626 | 702 | ||
| 627 | AndImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 703 | AndImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 628 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 704 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -638,6 +714,9 @@ __aicore__ inline void And(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 638 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "And")) { | 714 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "And")) { |
| 639 | ASCENDC_REPORT_CHECK_ERROR("And", KernelFuncType::MASK_COUNT_MODE); | 715 | ASCENDC_REPORT_CHECK_ERROR("And", KernelFuncType::MASK_COUNT_MODE); |
| 640 | } | 716 | } |
| 717 | + | ||
| 718 | + | ||
| 719 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "And"); | ||
| 641 | 720 | ||
| 642 | AndImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 721 | AndImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 643 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 722 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -660,6 +739,9 @@ __aicore__ inline void And(const LocalTensor<T>& dst, const LocalTensor<T>& src0 | |||
| 660 | if (!CheckFuncVecBinary(dst, src0, src1, count, "And")) { | 739 | if (!CheckFuncVecBinary(dst, src0, src1, count, "And")) { |
| 661 | ASCENDC_REPORT_CHECK_ERROR("And", KernelFuncType::CALCOUNT_MODE); | 740 | ASCENDC_REPORT_CHECK_ERROR("And", KernelFuncType::CALCOUNT_MODE); |
| 662 | } | 741 | } |
| 742 | + | ||
| 743 | + | ||
| 744 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "And", count); | ||
| 663 | 745 | ||
| 664 | AndImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 746 | AndImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 665 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 747 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -694,6 +776,9 @@ __aicore__ inline void Or(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | |||
| 694 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Or")) { | 776 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Or")) { |
| 695 | ASCENDC_REPORT_CHECK_ERROR("Or", KernelFuncType::MASK_BIT_MODE); | 777 | ASCENDC_REPORT_CHECK_ERROR("Or", KernelFuncType::MASK_BIT_MODE); |
| 696 | } | 778 | } |
| 779 | + | ||
| 780 | + | ||
| 781 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Or"); | ||
| 697 | 782 | ||
| 698 | OrImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 783 | OrImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 699 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 784 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -709,6 +794,9 @@ __aicore__ inline void Or(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | |||
| 709 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Or")) { | 794 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "Or")) { |
| 710 | ASCENDC_REPORT_CHECK_ERROR("Or", KernelFuncType::MASK_COUNT_MODE); | 795 | ASCENDC_REPORT_CHECK_ERROR("Or", KernelFuncType::MASK_COUNT_MODE); |
| 711 | } | 796 | } |
| 797 | + | ||
| 798 | + | ||
| 799 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Or"); | ||
| 712 | 800 | ||
| 713 | OrImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 801 | OrImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 714 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 802 | (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -731,6 +819,9 @@ __aicore__ inline void Or(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | |||
| 731 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Or")) { | 819 | if (!CheckFuncVecBinary(dst, src0, src1, count, "Or")) { |
| 732 | ASCENDC_REPORT_CHECK_ERROR("Or", KernelFuncType::CALCOUNT_MODE); | 820 | ASCENDC_REPORT_CHECK_ERROR("Or", KernelFuncType::CALCOUNT_MODE); |
| 733 | } | 821 | } |
| 822 | + | ||
| 823 | + | ||
| 824 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "Or", count); | ||
| 734 | 825 | ||
| 735 | OrImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 826 | OrImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 736 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 827 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -828,6 +919,9 @@ __aicore__ inline void AddRelu(const LocalTensor<T>& dst, const LocalTensor<T>& | |||
| 828 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "AddRelu")) { | 919 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "AddRelu")) { |
| 829 | ASCENDC_REPORT_CHECK_ERROR("AddRelu", KernelFuncType::MASK_BIT_MODE); | 920 | ASCENDC_REPORT_CHECK_ERROR("AddRelu", KernelFuncType::MASK_BIT_MODE); |
| 830 | } | 921 | } |
| 922 | + | ||
| 923 | + | ||
| 924 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "AddRelu"); | ||
| 831 | 925 | ||
| 832 | AddReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 926 | AddReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 833 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, | 927 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -849,6 +943,9 @@ __aicore__ inline void AddRelu(const LocalTensor<T>& dst, const LocalTensor<T>& | |||
| 849 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "AddRelu")) { | 943 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "AddRelu")) { |
| 850 | ASCENDC_REPORT_CHECK_ERROR("AddRelu", KernelFuncType::MASK_COUNT_MODE); | 944 | ASCENDC_REPORT_CHECK_ERROR("AddRelu", KernelFuncType::MASK_COUNT_MODE); |
| 851 | } | 945 | } |
| 946 | + | ||
| 947 | + | ||
| 948 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "AddRelu"); | ||
| 852 | 949 | ||
| 853 | AddReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 950 | AddReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 854 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, | 951 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -869,6 +966,9 @@ __aicore__ inline void AddRelu(const LocalTensor<T>& dst, const LocalTensor<T>& | |||
| 869 | if (!CheckFuncVecBinary(dst, src0, src1, count, "AddRelu")) { | 966 | if (!CheckFuncVecBinary(dst, src0, src1, count, "AddRelu")) { |
| 870 | ASCENDC_REPORT_CHECK_ERROR("AddRelu", KernelFuncType::CALCOUNT_MODE); | 967 | ASCENDC_REPORT_CHECK_ERROR("AddRelu", KernelFuncType::CALCOUNT_MODE); |
| 871 | } | 968 | } |
| 969 | + | ||
| 970 | + | ||
| 971 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "AddRelu", count); | ||
| 872 | 972 | ||
| 873 | AddReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 973 | AddReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 874 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 974 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -902,6 +1002,9 @@ __aicore__ inline void AddDeqRelu(const LocalTensor<half>& dst, const LocalTenso | |||
| 902 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { | 1002 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { |
| 903 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_BIT_MODE); | 1003 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_BIT_MODE); |
| 904 | } | 1004 | } |
| 1005 | + | ||
| 1006 | + | ||
| 1007 | + MstxTensor::GetMstxVecBinaryAddReqReluInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "AddDeqRelu"); | ||
| 905 | 1008 | ||
| 906 | AddDeqReluImpl<isSetMask>((__ubuf__ half*)dst.GetPhyAddr(), (__ubuf__ int32_t*)src0.GetPhyAddr(), | 1009 | AddDeqReluImpl<isSetMask>((__ubuf__ half*)dst.GetPhyAddr(), (__ubuf__ int32_t*)src0.GetPhyAddr(), |
| 907 | (__ubuf__ int32_t*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 1010 | (__ubuf__ int32_t*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -921,6 +1024,9 @@ __aicore__ inline void AddDeqRelu(const LocalTensor<T>& dst, const LocalTensor<U | |||
| 921 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { | 1024 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { |
| 922 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_BIT_MODE); | 1025 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_BIT_MODE); |
| 923 | } | 1026 | } |
| 1027 | + | ||
| 1028 | + | ||
| 1029 | + MstxTensor::GetMstxVecBinaryAddReqReluInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "AddDeqRelu"); | ||
| 924 | 1030 | ||
| 925 | AddDeqReluImpl<isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), | 1031 | AddDeqReluImpl<isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), |
| 926 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, | 1032 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -937,6 +1043,9 @@ __aicore__ inline void AddDeqRelu(const LocalTensor<half> &dst, const LocalTenso | |||
| 937 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { | 1043 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { |
| 938 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_COUNT_MODE); | 1044 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_COUNT_MODE); |
| 939 | } | 1045 | } |
| 1046 | + | ||
| 1047 | + | ||
| 1048 | + MstxTensor::GetMstxVecBinaryAddReqReluInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "AddDeqRelu"); | ||
| 940 | 1049 | ||
| 941 | AddDeqReluImpl<isSetMask>((__ubuf__ half*)dst.GetPhyAddr(), (__ubuf__ int32_t*)src0.GetPhyAddr(), | 1050 | AddDeqReluImpl<isSetMask>((__ubuf__ half*)dst.GetPhyAddr(), (__ubuf__ int32_t*)src0.GetPhyAddr(), |
| 942 | (__ubuf__ int32_t*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 1051 | (__ubuf__ int32_t*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -956,6 +1065,9 @@ __aicore__ inline void AddDeqRelu(const LocalTensor<T> &dst, const LocalTensor<U | |||
| 956 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { | 1065 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "AddDeqRelu")) { |
| 957 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_COUNT_MODE); | 1066 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::MASK_COUNT_MODE); |
| 958 | } | 1067 | } |
| 1068 | + | ||
| 1069 | + | ||
| 1070 | + MstxTensor::GetMstxVecBinaryAddReqReluInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "AddDeqRelu"); | ||
| 959 | 1071 | ||
| 960 | AddDeqReluImpl<isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), | 1072 | AddDeqReluImpl<isSetMask>((__ubuf__ PrimDstType*)dst.GetPhyAddr(), |
| 961 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, | 1073 | (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -977,6 +1089,9 @@ __aicore__ inline void AddDeqRelu(const LocalTensor<half>& dst, const LocalTenso | |||
| 977 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "AddDeqRelu")) { | 1089 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "AddDeqRelu")) { |
| 978 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::CALCOUNT_MODE); | 1090 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::CALCOUNT_MODE); |
| 979 | } | 1091 | } |
| 1092 | + | ||
| 1093 | + | ||
| 1094 | + MstxTensor::GetMstxVecBinaryAddReqReluInfo(dst, src0, src1, "AddDeqRelu", count); | ||
| 980 | 1095 | ||
| 981 | AddDeqReluImpl((__ubuf__ half *)dst.GetPhyAddr(), (__ubuf__ int32_t *)src0.GetPhyAddr(), | 1096 | AddDeqReluImpl((__ubuf__ half *)dst.GetPhyAddr(), (__ubuf__ int32_t *)src0.GetPhyAddr(), |
| 982 | (__ubuf__ int32_t *)src1.GetPhyAddr(), count); | 1097 | (__ubuf__ int32_t *)src1.GetPhyAddr(), count); |
| @@ -994,6 +1109,9 @@ __aicore__ inline void AddDeqRelu(const LocalTensor<T>& dst, const LocalTensor<U | |||
| 994 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "AddDeqRelu")) { | 1109 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "AddDeqRelu")) { |
| 995 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::CALCOUNT_MODE); | 1110 | ASCENDC_REPORT_CHECK_ERROR("AddDeqRelu", KernelFuncType::CALCOUNT_MODE); |
| 996 | } | 1111 | } |
| 1112 | + | ||
| 1113 | + | ||
| 1114 | + MstxTensor::GetMstxVecBinaryAddReqReluInfo(dst, src0, src1, "AddDeqRelu", count); | ||
| 997 | 1115 | ||
| 998 | AddDeqReluImpl((__ubuf__ PrimDstType*)dst.GetPhyAddr(), (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), | 1116 | AddDeqReluImpl((__ubuf__ PrimDstType*)dst.GetPhyAddr(), (__ubuf__ PrimSrcType*)src0.GetPhyAddr(), |
| 999 | (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), count); | 1117 | (__ubuf__ PrimSrcType*)src1.GetPhyAddr(), count); |
| @@ -1033,6 +1151,9 @@ __aicore__ inline void FusedMulAdd(const LocalTensor<T>& dst, const LocalTensor< | |||
| 1033 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "FusedMulAdd")) { | 1151 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "FusedMulAdd")) { |
| 1034 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAdd", KernelFuncType::MASK_BIT_MODE); | 1152 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAdd", KernelFuncType::MASK_BIT_MODE); |
| 1035 | } | 1153 | } |
| 1154 | + | ||
| 1155 | + | ||
| 1156 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "FusedMulAdd"); | ||
| 1036 | 1157 | ||
| 1037 | FusedMulAddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 1158 | FusedMulAddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 1038 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, | 1159 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -1054,6 +1175,9 @@ __aicore__ inline void FusedMulAdd(const LocalTensor<T>& dst, const LocalTensor< | |||
| 1054 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "FusedMulAdd")) { | 1175 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "FusedMulAdd")) { |
| 1055 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAdd", KernelFuncType::MASK_COUNT_MODE); | 1176 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAdd", KernelFuncType::MASK_COUNT_MODE); |
| 1056 | } | 1177 | } |
| 1178 | + | ||
| 1179 | + | ||
| 1180 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "FusedMulAdd"); | ||
| 1057 | 1181 | ||
| 1058 | FusedMulAddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 1182 | FusedMulAddImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 1059 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, | 1183 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -1082,6 +1206,9 @@ __aicore__ inline void FusedMulAdd(const LocalTensor<T>& dst, const LocalTensor< | |||
| 1082 | if (!CheckFuncVecBinary(dst, src0, src1, count, "FusedMulAdd")) { | 1206 | if (!CheckFuncVecBinary(dst, src0, src1, count, "FusedMulAdd")) { |
| 1083 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAdd", KernelFuncType::CALCOUNT_MODE); | 1207 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAdd", KernelFuncType::CALCOUNT_MODE); |
| 1084 | } | 1208 | } |
| 1209 | + | ||
| 1210 | + | ||
| 1211 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "FusedMulAdd", count); | ||
| 1085 | 1212 | ||
| 1086 | FusedMulAddImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 1213 | FusedMulAddImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 1087 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 1214 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -1234,6 +1361,9 @@ __aicore__ inline void FusedMulAddRelu(const LocalTensor<T>& dst, const LocalTen | |||
| 1234 | if (!CheckFuncVecBinary(dst, src0, src1, count, "FusedMulAddRelu")) { | 1361 | if (!CheckFuncVecBinary(dst, src0, src1, count, "FusedMulAddRelu")) { |
| 1235 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAddRelu", KernelFuncType::CALCOUNT_MODE); | 1362 | ASCENDC_REPORT_CHECK_ERROR("FusedMulAddRelu", KernelFuncType::CALCOUNT_MODE); |
| 1236 | } | 1363 | } |
| 1364 | + | ||
| 1365 | + | ||
| 1366 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "FusedMulAddRelu", count); | ||
| 1237 | 1367 | ||
| 1238 | FusedMulAddReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 1368 | FusedMulAddReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 1239 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 1369 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -1273,6 +1403,9 @@ __aicore__ inline void SubRelu(const LocalTensor<T>& dst, const LocalTensor<T>& | |||
| 1273 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "SubRelu")) { | 1403 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "SubRelu")) { |
| 1274 | ASCENDC_REPORT_CHECK_ERROR("SubRelu", KernelFuncType::MASK_BIT_MODE); | 1404 | ASCENDC_REPORT_CHECK_ERROR("SubRelu", KernelFuncType::MASK_BIT_MODE); |
| 1275 | } | 1405 | } |
| 1406 | + | ||
| 1407 | + | ||
| 1408 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "SubRelu"); | ||
| 1276 | 1409 | ||
| 1277 | SubReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 1410 | SubReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 1278 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, | 1411 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -1294,6 +1427,9 @@ __aicore__ inline void SubRelu(const LocalTensor<T>& dst, const LocalTensor<T>& | |||
| 1294 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "SubRelu")) { | 1427 | if (!CheckFuncVecBinary(dst, src0, src1, mask, repeatTime, repeatParams, "SubRelu")) { |
| 1295 | ASCENDC_REPORT_CHECK_ERROR("SubRelu", KernelFuncType::MASK_COUNT_MODE); | 1428 | ASCENDC_REPORT_CHECK_ERROR("SubRelu", KernelFuncType::MASK_COUNT_MODE); |
| 1296 | } | 1429 | } |
| 1430 | + | ||
| 1431 | + | ||
| 1432 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "SubRelu"); | ||
| 1297 | 1433 | ||
| 1298 | SubReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 1434 | SubReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 1299 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, | 1435 | (__ubuf__ PrimType*)src0.GetPhyAddr(), (__ubuf__ PrimType*)src1.GetPhyAddr(), mask, repeatTime, |
| @@ -1314,6 +1450,9 @@ __aicore__ inline void SubRelu(const LocalTensor<T>& dst, const LocalTensor<T>& | |||
| 1314 | if (!CheckFuncVecBinary(dst, src0, src1, count, "SubRelu")) { | 1450 | if (!CheckFuncVecBinary(dst, src0, src1, count, "SubRelu")) { |
| 1315 | ASCENDC_REPORT_CHECK_ERROR("SubRelu", KernelFuncType::CALCOUNT_MODE); | 1451 | ASCENDC_REPORT_CHECK_ERROR("SubRelu", KernelFuncType::CALCOUNT_MODE); |
| 1316 | } | 1452 | } |
| 1453 | + | ||
| 1454 | + | ||
| 1455 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "SubRelu", count); | ||
| 1317 | 1456 | ||
| 1318 | SubReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 1457 | SubReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 1319 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); | 1458 | (__ubuf__ PrimType*)src1.GetPhyAddr(), count); |
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | + | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | 23 | ||
| @@ -64,6 +65,9 @@ __aicore__ inline void Adds(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 64 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { | 65 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { |
| 65 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_BIT_MODE); | 66 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_BIT_MODE); |
| 66 | } | 67 | } |
| 68 | + | ||
| 69 | + | ||
| 70 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Adds"); | ||
| 67 | 71 | ||
| 68 | AddsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 72 | AddsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 69 | repeatTime, repeatParams); | 73 | repeatTime, repeatParams); |
| @@ -79,6 +83,9 @@ __aicore__ inline void Adds(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 79 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { | 83 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { |
| 80 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_BIT_MODE); | 84 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_BIT_MODE); |
| 81 | } | 85 | } |
| 86 | + | ||
| 87 | + | ||
| 88 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Adds"); | ||
| 82 | 89 | ||
| 83 | AddsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 90 | AddsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 84 | scalarValue, mask, repeatTime, repeatParams); | 91 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -93,6 +100,9 @@ __aicore__ inline void Adds(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 93 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { | 100 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { |
| 94 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_COUNT_MODE); | 101 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_COUNT_MODE); |
| 95 | } | 102 | } |
| 103 | + | ||
| 104 | + | ||
| 105 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Adds"); | ||
| 96 | 106 | ||
| 97 | AddsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 107 | AddsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 98 | repeatTime, repeatParams); | 108 | repeatTime, repeatParams); |
| @@ -108,6 +118,9 @@ __aicore__ inline void Adds(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 108 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { | 118 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Adds")) { |
| 109 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_COUNT_MODE); | 119 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::MASK_COUNT_MODE); |
| 110 | } | 120 | } |
| 121 | + | ||
| 122 | + | ||
| 123 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Adds"); | ||
| 111 | 124 | ||
| 112 | AddsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 125 | AddsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 113 | scalarValue, mask, repeatTime, repeatParams); | 126 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -130,6 +143,9 @@ __aicore__ inline void Adds(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 130 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Adds")) { | 143 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Adds")) { |
| 131 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::CALCOUNT_MODE); | 144 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::CALCOUNT_MODE); |
| 132 | } | 145 | } |
| 146 | + | ||
| 147 | + | ||
| 148 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Adds", count); | ||
| 133 | 149 | ||
| 134 | AddsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 150 | AddsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 135 | count); | 151 | count); |
| @@ -145,6 +161,9 @@ __aicore__ inline void Adds(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 145 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Adds")) { | 161 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Adds")) { |
| 146 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::CALCOUNT_MODE); | 162 | ASCENDC_REPORT_CHECK_ERROR("Adds", KernelFuncType::CALCOUNT_MODE); |
| 147 | } | 163 | } |
| 164 | + | ||
| 165 | + | ||
| 166 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Adds", count); | ||
| 148 | 167 | ||
| 149 | AddsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 168 | AddsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 150 | scalarValue, count); | 169 | scalarValue, count); |
| @@ -175,6 +194,9 @@ __aicore__ inline void Muls(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 175 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { | 194 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { |
| 176 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_BIT_MODE); | 195 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_BIT_MODE); |
| 177 | } | 196 | } |
| 197 | + | ||
| 198 | + | ||
| 199 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Muls"); | ||
| 178 | 200 | ||
| 179 | MulsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 201 | MulsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 180 | repeatTime, repeatParams); | 202 | repeatTime, repeatParams); |
| @@ -190,6 +212,9 @@ __aicore__ inline void Muls(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 190 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { | 212 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { |
| 191 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_BIT_MODE); | 213 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_BIT_MODE); |
| 192 | } | 214 | } |
| 215 | + | ||
| 216 | + | ||
| 217 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Muls"); | ||
| 193 | 218 | ||
| 194 | MulsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 219 | MulsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 195 | scalarValue, mask, repeatTime, repeatParams); | 220 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -204,6 +229,9 @@ __aicore__ inline void Muls(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 204 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { | 229 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { |
| 205 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_COUNT_MODE); | 230 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_COUNT_MODE); |
| 206 | } | 231 | } |
| 232 | + | ||
| 233 | + | ||
| 234 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Muls"); | ||
| 207 | 235 | ||
| 208 | MulsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 236 | MulsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 209 | repeatTime, repeatParams); | 237 | repeatTime, repeatParams); |
| @@ -219,6 +247,9 @@ __aicore__ inline void Muls(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 219 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { | 247 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Muls")) { |
| 220 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_COUNT_MODE); | 248 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::MASK_COUNT_MODE); |
| 221 | } | 249 | } |
| 250 | + | ||
| 251 | + | ||
| 252 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Muls"); | ||
| 222 | 253 | ||
| 223 | MulsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, | 254 | MulsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, |
| 224 | repeatTime, repeatParams); | 255 | repeatTime, repeatParams); |
| @@ -241,6 +272,9 @@ __aicore__ inline void Muls(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 241 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Muls")) { | 272 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Muls")) { |
| 242 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::CALCOUNT_MODE); | 273 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::CALCOUNT_MODE); |
| 243 | } | 274 | } |
| 275 | + | ||
| 276 | + | ||
| 277 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Muls", count); | ||
| 244 | 278 | ||
| 245 | MulsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 279 | MulsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 246 | count); | 280 | count); |
| @@ -256,6 +290,9 @@ __aicore__ inline void Muls(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 256 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Muls")) { | 290 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Muls")) { |
| 257 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::CALCOUNT_MODE); | 291 | ASCENDC_REPORT_CHECK_ERROR("Muls", KernelFuncType::CALCOUNT_MODE); |
| 258 | } | 292 | } |
| 293 | + | ||
| 294 | + | ||
| 295 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Muls", count); | ||
| 259 | 296 | ||
| 260 | MulsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 297 | MulsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 261 | scalarValue, count); | 298 | scalarValue, count); |
| @@ -286,6 +323,9 @@ __aicore__ inline void Maxs(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 286 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { | 323 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { |
| 287 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_BIT_MODE); | 324 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_BIT_MODE); |
| 288 | } | 325 | } |
| 326 | + | ||
| 327 | + | ||
| 328 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Maxs"); | ||
| 289 | 329 | ||
| 290 | MaxsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 330 | MaxsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 291 | repeatTime, repeatParams); | 331 | repeatTime, repeatParams); |
| @@ -301,6 +341,9 @@ __aicore__ inline void Maxs(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 301 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { | 341 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { |
| 302 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_BIT_MODE); | 342 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_BIT_MODE); |
| 303 | } | 343 | } |
| 344 | + | ||
| 345 | + | ||
| 346 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Maxs"); | ||
| 304 | 347 | ||
| 305 | MaxsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 348 | MaxsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 306 | scalarValue, mask, repeatTime, repeatParams); | 349 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -315,6 +358,9 @@ __aicore__ inline void Maxs(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 315 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { | 358 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { |
| 316 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_COUNT_MODE); | 359 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_COUNT_MODE); |
| 317 | } | 360 | } |
| 361 | + | ||
| 362 | + | ||
| 363 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Maxs"); | ||
| 318 | 364 | ||
| 319 | MaxsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 365 | MaxsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 320 | repeatTime, repeatParams); | 366 | repeatTime, repeatParams); |
| @@ -330,6 +376,9 @@ __aicore__ inline void Maxs(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 330 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { | 376 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Maxs")) { |
| 331 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_COUNT_MODE); | 377 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::MASK_COUNT_MODE); |
| 332 | } | 378 | } |
| 379 | + | ||
| 380 | + | ||
| 381 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Maxs"); | ||
| 333 | 382 | ||
| 334 | MaxsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 383 | MaxsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 335 | scalarValue, mask, repeatTime, repeatParams); | 384 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -352,6 +401,9 @@ __aicore__ inline void Maxs(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 352 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Maxs")) { | 401 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Maxs")) { |
| 353 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::CALCOUNT_MODE); | 402 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::CALCOUNT_MODE); |
| 354 | } | 403 | } |
| 404 | + | ||
| 405 | + | ||
| 406 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Maxs", count); | ||
| 355 | 407 | ||
| 356 | MaxsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 408 | MaxsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 357 | count); | 409 | count); |
| @@ -367,6 +419,9 @@ __aicore__ inline void Maxs(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 367 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Maxs")) { | 419 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Maxs")) { |
| 368 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::CALCOUNT_MODE); | 420 | ASCENDC_REPORT_CHECK_ERROR("Maxs", KernelFuncType::CALCOUNT_MODE); |
| 369 | } | 421 | } |
| 422 | + | ||
| 423 | + | ||
| 424 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Maxs", count); | ||
| 370 | 425 | ||
| 371 | MaxsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 426 | MaxsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 372 | scalarValue, count); | 427 | scalarValue, count); |
| @@ -397,6 +452,9 @@ __aicore__ inline void Mins(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 397 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { | 452 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { |
| 398 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_BIT_MODE); | 453 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_BIT_MODE); |
| 399 | } | 454 | } |
| 455 | + | ||
| 456 | + | ||
| 457 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Mins"); | ||
| 400 | 458 | ||
| 401 | MinsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 459 | MinsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 402 | repeatTime, repeatParams); | 460 | repeatTime, repeatParams); |
| @@ -412,6 +470,9 @@ __aicore__ inline void Mins(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 412 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { | 470 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { |
| 413 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_BIT_MODE); | 471 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_BIT_MODE); |
| 414 | } | 472 | } |
| 473 | + | ||
| 474 | + | ||
| 475 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Mins"); | ||
| 415 | 476 | ||
| 416 | MinsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 477 | MinsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 417 | scalarValue, mask, repeatTime, repeatParams); | 478 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -426,6 +487,9 @@ __aicore__ inline void Mins(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 426 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { | 487 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { |
| 427 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_COUNT_MODE); | 488 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_COUNT_MODE); |
| 428 | } | 489 | } |
| 490 | + | ||
| 491 | + | ||
| 492 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Mins"); | ||
| 429 | 493 | ||
| 430 | MinsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, | 494 | MinsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, mask, |
| 431 | repeatTime, repeatParams); | 495 | repeatTime, repeatParams); |
| @@ -441,6 +505,9 @@ __aicore__ inline void Mins(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 441 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { | 505 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "Mins")) { |
| 442 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_COUNT_MODE); | 506 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::MASK_COUNT_MODE); |
| 443 | } | 507 | } |
| 508 | + | ||
| 509 | + | ||
| 510 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Mins"); | ||
| 444 | 511 | ||
| 445 | MinsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 512 | MinsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 446 | scalarValue, mask, repeatTime, repeatParams); | 513 | scalarValue, mask, repeatTime, repeatParams); |
| @@ -463,6 +530,9 @@ __aicore__ inline void Mins(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 463 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Mins")) { | 530 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Mins")) { |
| 464 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::CALCOUNT_MODE); | 531 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::CALCOUNT_MODE); |
| 465 | } | 532 | } |
| 533 | + | ||
| 534 | + | ||
| 535 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Mins", count); | ||
| 466 | 536 | ||
| 467 | MinsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 537 | MinsImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 468 | count); | 538 | count); |
| @@ -478,6 +548,9 @@ __aicore__ inline void Mins(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 478 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Mins")) { | 548 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "Mins")) { |
| 479 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::CALCOUNT_MODE); | 549 | ASCENDC_REPORT_CHECK_ERROR("Mins", KernelFuncType::CALCOUNT_MODE); |
| 480 | } | 550 | } |
| 551 | + | ||
| 552 | + | ||
| 553 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "Mins", count); | ||
| 481 | 554 | ||
| 482 | MinsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 555 | MinsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 483 | scalarValue, count); | 556 | scalarValue, count); |
| @@ -508,6 +581,9 @@ __aicore__ inline void ShiftLeft(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 508 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { | 581 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { |
| 509 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_BIT_MODE); | 582 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_BIT_MODE); |
| 510 | } | 583 | } |
| 584 | + | ||
| 585 | + | ||
| 586 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "ShiftLeft"); | ||
| 511 | 587 | ||
| 512 | ShiftLeftImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 588 | ShiftLeftImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 513 | mask, repeatTime, repeatParams); | 589 | mask, repeatTime, repeatParams); |
| @@ -523,6 +599,9 @@ __aicore__ inline void ShiftLeft(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 523 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { | 599 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { |
| 524 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_BIT_MODE); | 600 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_BIT_MODE); |
| 525 | } | 601 | } |
| 602 | + | ||
| 603 | + | ||
| 604 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "ShiftLeft"); | ||
| 526 | 605 | ||
| 527 | ShiftLeftImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 606 | ShiftLeftImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 528 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); | 607 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); |
| @@ -537,6 +616,9 @@ __aicore__ inline void ShiftLeft(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 537 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { | 616 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { |
| 538 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_COUNT_MODE); | 617 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_COUNT_MODE); |
| 539 | } | 618 | } |
| 619 | + | ||
| 620 | + | ||
| 621 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "ShiftLeft"); | ||
| 540 | 622 | ||
| 541 | ShiftLeftImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 623 | ShiftLeftImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 542 | mask, repeatTime, repeatParams); | 624 | mask, repeatTime, repeatParams); |
| @@ -552,6 +634,9 @@ __aicore__ inline void ShiftLeft(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 552 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { | 634 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftLeft")) { |
| 553 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_COUNT_MODE); | 635 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::MASK_COUNT_MODE); |
| 554 | } | 636 | } |
| 637 | + | ||
| 638 | + | ||
| 639 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "ShiftLeft"); | ||
| 555 | 640 | ||
| 556 | ShiftLeftImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 641 | ShiftLeftImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 557 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); | 642 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); |
| @@ -574,6 +659,9 @@ __aicore__ inline void ShiftLeft(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 574 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftLeft")) { | 659 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftLeft")) { |
| 575 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::CALCOUNT_MODE); | 660 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::CALCOUNT_MODE); |
| 576 | } | 661 | } |
| 662 | + | ||
| 663 | + | ||
| 664 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "ShiftLeft", count); | ||
| 577 | 665 | ||
| 578 | ShiftLeftImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 666 | ShiftLeftImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 579 | count); | 667 | count); |
| @@ -589,6 +677,9 @@ __aicore__ inline void ShiftLeft(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 589 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftLeft")) { | 677 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftLeft")) { |
| 590 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::CALCOUNT_MODE); | 678 | ASCENDC_REPORT_CHECK_ERROR("ShiftLeft", KernelFuncType::CALCOUNT_MODE); |
| 591 | } | 679 | } |
| 680 | + | ||
| 681 | + | ||
| 682 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "ShiftLeft", count); | ||
| 592 | 683 | ||
| 593 | ShiftLeftImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 684 | ShiftLeftImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 594 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, count); | 685 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, count); |
| @@ -619,6 +710,9 @@ __aicore__ inline void ShiftRight(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 619 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { | 710 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { |
| 620 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_BIT_MODE); | 711 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_BIT_MODE); |
| 621 | } | 712 | } |
| 713 | + | ||
| 714 | + | ||
| 715 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "ShiftRight"); | ||
| 622 | 716 | ||
| 623 | ShiftRightImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 717 | ShiftRightImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 624 | mask, repeatTime, repeatParams, roundEn); | 718 | mask, repeatTime, repeatParams, roundEn); |
| @@ -634,6 +728,9 @@ __aicore__ inline void ShiftRight(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 634 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { | 728 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { |
| 635 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_BIT_MODE); | 729 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_BIT_MODE); |
| 636 | } | 730 | } |
| 731 | + | ||
| 732 | + | ||
| 733 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "ShiftRight"); | ||
| 637 | 734 | ||
| 638 | ShiftRightImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 735 | ShiftRightImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 639 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams, roundEn); | 736 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams, roundEn); |
| @@ -648,6 +745,9 @@ __aicore__ inline void ShiftRight(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 648 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { | 745 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { |
| 649 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_COUNT_MODE); | 746 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_COUNT_MODE); |
| 650 | } | 747 | } |
| 748 | + | ||
| 749 | + | ||
| 750 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "ShiftRight"); | ||
| 651 | 751 | ||
| 652 | ShiftRightImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 752 | ShiftRightImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 653 | mask, repeatTime, repeatParams, roundEn); | 753 | mask, repeatTime, repeatParams, roundEn); |
| @@ -663,6 +763,9 @@ __aicore__ inline void ShiftRight(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 663 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { | 763 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "ShiftRight")) { |
| 664 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_COUNT_MODE); | 764 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::MASK_COUNT_MODE); |
| 665 | } | 765 | } |
| 766 | + | ||
| 767 | + | ||
| 768 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "ShiftRight"); | ||
| 666 | 769 | ||
| 667 | ShiftRightImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 770 | ShiftRightImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 668 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams, roundEn); | 771 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams, roundEn); |
| @@ -685,6 +788,9 @@ __aicore__ inline void ShiftRight(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 685 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftRight")) { | 788 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftRight")) { |
| 686 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::CALCOUNT_MODE); | 789 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::CALCOUNT_MODE); |
| 687 | } | 790 | } |
| 791 | + | ||
| 792 | + | ||
| 793 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "ShiftRight", count); | ||
| 688 | 794 | ||
| 689 | ShiftRightImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 795 | ShiftRightImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 690 | count); | 796 | count); |
| @@ -700,6 +806,9 @@ __aicore__ inline void ShiftRight(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 700 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftRight")) { | 806 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "ShiftRight")) { |
| 701 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::CALCOUNT_MODE); | 807 | ASCENDC_REPORT_CHECK_ERROR("ShiftRight", KernelFuncType::CALCOUNT_MODE); |
| 702 | } | 808 | } |
| 809 | + | ||
| 810 | + | ||
| 811 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "ShiftRight", count); | ||
| 703 | 812 | ||
| 704 | ShiftRightImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 813 | ShiftRightImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 705 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, count); | 814 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, count); |
| @@ -730,6 +839,9 @@ __aicore__ inline void LeakyRelu(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 730 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { | 839 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { |
| 731 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_BIT_MODE); | 840 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_BIT_MODE); |
| 732 | } | 841 | } |
| 842 | + | ||
| 843 | + | ||
| 844 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "LeakyRelu"); | ||
| 733 | 845 | ||
| 734 | LeakyReluImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 846 | LeakyReluImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 735 | mask, repeatTime, repeatParams); | 847 | mask, repeatTime, repeatParams); |
| @@ -745,6 +857,9 @@ __aicore__ inline void LeakyRelu(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 745 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { | 857 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { |
| 746 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_BIT_MODE); | 858 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_BIT_MODE); |
| 747 | } | 859 | } |
| 860 | + | ||
| 861 | + | ||
| 862 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "LeakyRelu"); | ||
| 748 | 863 | ||
| 749 | LeakyReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 864 | LeakyReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 750 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); | 865 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); |
| @@ -759,6 +874,9 @@ __aicore__ inline void LeakyRelu(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 759 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { | 874 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { |
| 760 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_COUNT_MODE); | 875 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_COUNT_MODE); |
| 761 | } | 876 | } |
| 877 | + | ||
| 878 | + | ||
| 879 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "LeakyRelu"); | ||
| 762 | 880 | ||
| 763 | LeakyReluImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 881 | LeakyReluImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 764 | mask, repeatTime, repeatParams); | 882 | mask, repeatTime, repeatParams); |
| @@ -774,6 +892,9 @@ __aicore__ inline void LeakyRelu(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 774 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { | 892 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, mask, repeatTime, repeatParams, "LeakyRelu")) { |
| 775 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_COUNT_MODE); | 893 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::MASK_COUNT_MODE); |
| 776 | } | 894 | } |
| 895 | + | ||
| 896 | + | ||
| 897 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "LeakyRelu"); | ||
| 777 | 898 | ||
| 778 | LeakyReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 899 | LeakyReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 779 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); | 900 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, mask, repeatTime, repeatParams); |
| @@ -796,6 +917,9 @@ __aicore__ inline void LeakyRelu(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 796 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "LeakyRelu")) { | 917 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "LeakyRelu")) { |
| 797 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::CALCOUNT_MODE); | 918 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::CALCOUNT_MODE); |
| 798 | } | 919 | } |
| 920 | + | ||
| 921 | + | ||
| 922 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "LeakyRelu", count); | ||
| 799 | 923 | ||
| 800 | LeakyReluImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, | 924 | LeakyReluImpl<T, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ T*)src.GetPhyAddr(), scalarValue, |
| 801 | count); | 925 | count); |
| @@ -811,6 +935,9 @@ __aicore__ inline void LeakyRelu(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 811 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "LeakyRelu")) { | 935 | if (!CheckFunVecBinaryScalar(dst, src, scalarValue, count, "LeakyRelu")) { |
| 812 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::CALCOUNT_MODE); | 936 | ASCENDC_REPORT_CHECK_ERROR("LeakyRelu", KernelFuncType::CALCOUNT_MODE); |
| 813 | } | 937 | } |
| 938 | + | ||
| 939 | + | ||
| 940 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, "LeakyRelu", count); | ||
| 814 | 941 | ||
| 815 | LeakyReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 942 | LeakyReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 816 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, count); | 943 | (__ubuf__ PrimType*)src.GetPhyAddr(), scalarValue, count); |
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | + | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | 23 | ||
| @@ -52,6 +53,9 @@ template <typename T> | |||
| 52 | __aicore__ inline void Brcb(const LocalTensor<T>& dst, const LocalTensor<T>& src0, const uint8_t repeatTime, | 53 | __aicore__ inline void Brcb(const LocalTensor<T>& dst, const LocalTensor<T>& src0, const uint8_t repeatTime, |
| 53 | const BrcbRepeatParams& repeatParams) | 54 | const BrcbRepeatParams& repeatParams) |
| 54 | { | 55 | { |
| 56 | + | ||
C 这个文件没包对应头文件 ![]() ![]() | |||
| 57 | + MstxTensor::GetMstxVecBrcbInfo(dst, src0, repeatTime, repeatParams, "Brcb"); | ||
| 58 | + | ||
| 55 | using PrimType = PrimT<T>; | 59 | using PrimType = PrimT<T>; |
| 56 | 60 | ||
| 57 | if (!CheckFunBcB(dst, src0, repeatTime, repeatParams, "Brcb")) { | 61 | if (!CheckFunBcB(dst, src0, repeatTime, repeatParams, "Brcb")) { |
| @@ -18,6 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | + | ||
| 21 | 22 | ||
| 22 | 23 | ||
| 23 | 24 | ||
| @@ -66,6 +67,9 @@ __aicore__ inline void Compare(const LocalTensor<U>& dst, const LocalTensor<T>& | |||
| 66 | const LocalTensor<T>& src1, CMPMODE cmpMode, const uint64_t mask[], uint8_t repeatTime, | 67 | const LocalTensor<T>& src1, CMPMODE cmpMode, const uint64_t mask[], uint8_t repeatTime, |
| 67 | const BinaryRepeatParams& repeatParams) | 68 | const BinaryRepeatParams& repeatParams) |
| 68 | { | 69 | { |
| 70 | + | ||
| 71 | + MstxTensor::GetMstxVecBinaryCmpInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "Compare"); | ||
| 72 | + | ||
| 69 | using SrcPrimType = PrimT<T>; | 73 | using SrcPrimType = PrimT<T>; |
| 70 | using DstPrimType = PrimT<U>; | 74 | using DstPrimType = PrimT<U>; |
| 71 | 75 | ||
| @@ -92,6 +96,9 @@ __aicore__ inline void Compare(const LocalTensor<U>& dst, const LocalTensor<T>& | |||
| 92 | const LocalTensor<T>& src1, CMPMODE cmpMode, const uint64_t mask, uint8_t repeatTime, | 96 | const LocalTensor<T>& src1, CMPMODE cmpMode, const uint64_t mask, uint8_t repeatTime, |
| 93 | const BinaryRepeatParams& repeatParams) | 97 | const BinaryRepeatParams& repeatParams) |
| 94 | { | 98 | { |
| 99 | + | ||
| 100 | + MstxTensor::GetMstxVecBinaryCmpInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "Compare"); | ||
| 101 | + | ||
| 95 | using SrcPrimType = PrimT<T>; | 102 | using SrcPrimType = PrimT<T>; |
| 96 | using DstPrimType = PrimT<U>; | 103 | using DstPrimType = PrimT<U>; |
| 97 | 104 | ||
| @@ -164,6 +171,9 @@ template <typename T, typename U> | |||
| 164 | __aicore__ inline void Compare(const LocalTensor<U>& dst, const LocalTensor<T>& src0, | 171 | __aicore__ inline void Compare(const LocalTensor<U>& dst, const LocalTensor<T>& src0, |
| 165 | const LocalTensor<T>& src1, CMPMODE cmpMode, uint32_t count) | 172 | const LocalTensor<T>& src1, CMPMODE cmpMode, uint32_t count) |
| 166 | { | 173 | { |
| 174 | + | ||
| 175 | + MstxTensor::GetMstxVecBinaryCmpInfo(dst, src0, src1, "Compare", count); | ||
| 176 | + | ||
| 167 | using SrcPrimType = PrimT<T>; | 177 | using SrcPrimType = PrimT<T>; |
| 168 | using DstPrimType = PrimT<U>; | 178 | using DstPrimType = PrimT<U>; |
| 169 | 179 | ||
| @@ -275,6 +285,9 @@ __aicore__ inline void Compares(const LocalTensor<U>& dst, const LocalTensor<T>& | |||
| 275 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask[], uint8_t repeatTime, | 285 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask[], uint8_t repeatTime, |
| 276 | const UnaryRepeatParams& repeatParams) | 286 | const UnaryRepeatParams& repeatParams) |
| 277 | { | 287 | { |
| 288 | + | ||
| 289 | + MstxTensor::GetMstxVecUnaryCmpsInfo<U, T, isSetMask>(dst, src0, mask[0], mask[1], repeatTime, repeatParams, "Compares"); | ||
| 290 | + | ||
| 278 | 291 | ||
| 279 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), | 292 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), |
| 280 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Compares, current api support dtype combination is " | 293 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Compares, current api support dtype combination is " |
| @@ -299,6 +312,9 @@ __aicore__ inline void Compares(const LocalTensor<U>& dst, const LocalTensor<T>& | |||
| 299 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask, uint8_t repeatTime, | 312 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask, uint8_t repeatTime, |
| 300 | const UnaryRepeatParams& repeatParams) | 313 | const UnaryRepeatParams& repeatParams) |
| 301 | { | 314 | { |
| 315 | + | ||
| 316 | + MstxTensor::GetMstxVecUnaryCmpsInfo<U, T, isSetMask>(dst, src0, mask, repeatTime, repeatParams, "Compares"); | ||
| 317 | + | ||
| 302 | 318 | ||
| 303 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), | 319 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), |
| 304 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Compares, current api support dtype combination is " | 320 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Compares, current api support dtype combination is " |
| @@ -324,6 +340,9 @@ __aicore__ inline void CompareScalar(const LocalTensor<U>& dst, const LocalTenso | |||
| 324 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask[], uint8_t repeatTime, | 340 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask[], uint8_t repeatTime, |
| 325 | const UnaryRepeatParams& repeatParams) | 341 | const UnaryRepeatParams& repeatParams) |
| 326 | { | 342 | { |
| 343 | + | ||
| 344 | + MstxTensor::GetMstxVecUnaryCmpsInfo<U, T, isSetMask>(dst, src0, mask[0], mask[1], repeatTime, repeatParams, "CompareScalar"); | ||
| 345 | + | ||
| 327 | 346 | ||
| 328 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), | 347 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), |
| 329 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in CompareScalar, current api support dtype combination is " | 348 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in CompareScalar, current api support dtype combination is " |
| @@ -349,6 +368,9 @@ __aicore__ inline void CompareScalar(const LocalTensor<U>& dst, const LocalTenso | |||
| 349 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask, uint8_t repeatTime, | 368 | const T src1Scalar, CMPMODE cmpMode, const uint64_t mask, uint8_t repeatTime, |
| 350 | const UnaryRepeatParams& repeatParams) | 369 | const UnaryRepeatParams& repeatParams) |
| 351 | { | 370 | { |
| 371 | + | ||
| 372 | + MstxTensor::GetMstxVecUnaryCmpsInfo<U, T, isSetMask>(dst, src0, mask, repeatTime, repeatParams, "CompareScalar"); | ||
| 373 | + | ||
| 352 | 374 | ||
| 353 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), | 375 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), |
| 354 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in CompareScalar, current api support dtype combination is " | 376 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in CompareScalar, current api support dtype combination is " |
| @@ -381,6 +403,9 @@ template <typename T, typename U> | |||
| 381 | __aicore__ inline void Compares(const LocalTensor<U>& dst, const LocalTensor<T>& src0, | 403 | __aicore__ inline void Compares(const LocalTensor<U>& dst, const LocalTensor<T>& src0, |
| 382 | const T src1Scalar, CMPMODE cmpMode, uint32_t count) | 404 | const T src1Scalar, CMPMODE cmpMode, uint32_t count) |
| 383 | { | 405 | { |
| 406 | + | ||
| 407 | + MstxTensor::GetMstxVecUnaryCmpsInfo<U, T, true>(dst, src0, "Compares", count); | ||
| 408 | + | ||
| 384 | 409 | ||
| 385 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), | 410 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), |
| 386 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Compares, current api support dtype combination is " | 411 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Compares, current api support dtype combination is " |
| @@ -406,6 +431,9 @@ template <typename T, typename U> | |||
| 406 | __aicore__ inline void CompareScalar(const LocalTensor<U>& dst, const LocalTensor<T>& src0, | 431 | __aicore__ inline void CompareScalar(const LocalTensor<U>& dst, const LocalTensor<T>& src0, |
| 407 | const T src1Scalar, CMPMODE cmpMode, uint32_t count) | 432 | const T src1Scalar, CMPMODE cmpMode, uint32_t count) |
| 408 | { | 433 | { |
| 434 | + | ||
| 435 | + MstxTensor::GetMstxVecUnaryCmpsInfo<U, T, true>(dst, src0, "CompareScalar", count); | ||
| 436 | + | ||
| 409 | 437 | ||
| 410 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), | 438 | ASCENDC_ASSERT((SupportType<T, half, float>() && SupportType<U, uint8_t>()), |
| 411 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in CompareScalar, current api support dtype combination is " | 439 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in CompareScalar, current api support dtype combination is " |
| @@ -456,6 +484,9 @@ __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& s | |||
| 456 | const LocalTensor<T>& src0, const LocalTensor<T>& src1, SELMODE selMode, uint64_t mask[], | 484 | const LocalTensor<T>& src0, const LocalTensor<T>& src1, SELMODE selMode, uint64_t mask[], |
| 457 | uint8_t repeatTime, const BinaryRepeatParams& repeatParams) | 485 | uint8_t repeatTime, const BinaryRepeatParams& repeatParams) |
| 458 | { | 486 | { |
| 487 | + | ||
| 488 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, selMode, "Select"); | ||
| 489 | + | ||
| 459 | using DataPrimType = PrimT<T>; | 490 | using DataPrimType = PrimT<T>; |
| 460 | using MaskPrimType = PrimT<U>; | 491 | using MaskPrimType = PrimT<U>; |
| 461 | 492 | ||
| @@ -475,6 +506,9 @@ __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& s | |||
| 475 | const LocalTensor<T>& src0, const LocalTensor<T>& src1, SELMODE selMode, uint64_t mask, | 506 | const LocalTensor<T>& src0, const LocalTensor<T>& src1, SELMODE selMode, uint64_t mask, |
| 476 | uint8_t repeatTime, const BinaryRepeatParams& repeatParams) | 507 | uint8_t repeatTime, const BinaryRepeatParams& repeatParams) |
| 477 | { | 508 | { |
| 509 | + | ||
| 510 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, src1, mask, repeatTime, repeatParams, isSetMask, selMode, "Select"); | ||
| 511 | + | ||
| 478 | using DataPrimType = PrimT<T>; | 512 | using DataPrimType = PrimT<T>; |
| 479 | using MaskPrimType = PrimT<U>; | 513 | using MaskPrimType = PrimT<U>; |
| 480 | 514 | ||
| @@ -492,6 +526,9 @@ template <typename T, SELMODE selMode> | |||
| 492 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | 526 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<T>& src0, |
| 493 | const LocalTensor<T>& src1, uint8_t repeatTime, const BinaryRepeatParams& repeatParams) | 527 | const LocalTensor<T>& src1, uint8_t repeatTime, const BinaryRepeatParams& repeatParams) |
| 494 | { | 528 | { |
| 529 | + | ||
| 530 | + MstxTensor::GetMstxVecBinarySelInfo(dst, src0, src1, repeatTime, repeatParams, selMode, "Select"); | ||
| 531 | + | ||
| 495 | using PrimType = PrimT<T>; | 532 | using PrimType = PrimT<T>; |
| 496 | SelectCal<PrimType, selMode>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), | 533 | SelectCal<PrimType, selMode>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src0.GetPhyAddr(), |
| 497 | (__ubuf__ PrimType*)src1.GetPhyAddr(), repeatTime, repeatParams); | 534 | (__ubuf__ PrimType*)src1.GetPhyAddr(), repeatTime, repeatParams); |
| @@ -501,6 +538,9 @@ template <typename T, typename U> | |||
| 501 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | 538 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, |
| 502 | const LocalTensor<T>& src0, uint8_t repeatTime, const BinaryRepeatParams& repeatParams) | 539 | const LocalTensor<T>& src0, uint8_t repeatTime, const BinaryRepeatParams& repeatParams) |
| 503 | { | 540 | { |
| 541 | + | ||
| 542 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, repeatTime, repeatParams, SELMODE::VSEL_TENSOR_SCALAR_MODE, "Select"); | ||
| 543 | + | ||
| 504 | using DataPrimType = PrimT<T>; | 544 | using DataPrimType = PrimT<T>; |
| 505 | using MaskPrimType = PrimT<U>; | 545 | using MaskPrimType = PrimT<U>; |
| 506 | SelectCal<DataPrimType, MaskPrimType>((__ubuf__ DataPrimType*)dst.GetPhyAddr(), | 546 | SelectCal<DataPrimType, MaskPrimType>((__ubuf__ DataPrimType*)dst.GetPhyAddr(), |
| @@ -523,6 +563,9 @@ template <typename T, typename U> | |||
| 523 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | 563 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, |
| 524 | const LocalTensor<T>& src0, const LocalTensor<T>& src1, SELMODE selMode, uint32_t count) | 564 | const LocalTensor<T>& src0, const LocalTensor<T>& src1, SELMODE selMode, uint32_t count) |
| 525 | { | 565 | { |
| 566 | + | ||
| 567 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, src1, count, true, selMode, "Select"); | ||
| 568 | + | ||
| 526 | using DataPrimType = PrimT<T>; | 569 | using DataPrimType = PrimT<T>; |
| 527 | using MaskPrimType = PrimT<U>; | 570 | using MaskPrimType = PrimT<U>; |
| 528 | 571 | ||
| @@ -558,6 +601,10 @@ __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& s | |||
| 558 | const LocalTensor<T>& src0, T src1, SELMODE selMode, uint64_t mask[], uint8_t repeatTime, | 601 | const LocalTensor<T>& src0, T src1, SELMODE selMode, uint64_t mask[], uint8_t repeatTime, |
| 559 | const BinaryRepeatParams& repeatParams) | 602 | const BinaryRepeatParams& repeatParams) |
| 560 | { | 603 | { |
| 604 | + | ||
| 605 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, mask[0], mask[1], repeatTime, | ||
| 606 | + repeatParams, isSetMask, selMode, "Select"); | ||
| 607 | + | ||
| 561 | 608 | ||
| 562 | MaskSetter::Instance().SetMask(isSetMask); | 609 | MaskSetter::Instance().SetMask(isSetMask); |
| 563 | if (!CheckFunVecBinaryScalar(dst, src0, src1, mask, repeatTime, repeatParams, "Select")) { | 610 | if (!CheckFunVecBinaryScalar(dst, src0, src1, mask, repeatTime, repeatParams, "Select")) { |
| @@ -575,6 +622,10 @@ __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& s | |||
| 575 | const LocalTensor<T>& src0, T src1, SELMODE selMode, uint64_t mask, uint8_t repeatTime, | 622 | const LocalTensor<T>& src0, T src1, SELMODE selMode, uint64_t mask, uint8_t repeatTime, |
| 576 | const BinaryRepeatParams& repeatParams) | 623 | const BinaryRepeatParams& repeatParams) |
| 577 | { | 624 | { |
| 625 | + | ||
| 626 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, mask, repeatTime, | ||
| 627 | + repeatParams, isSetMask, selMode, "Select"); | ||
| 628 | + | ||
| 578 | 629 | ||
| 579 | MaskSetter::Instance().SetMask(isSetMask); | 630 | MaskSetter::Instance().SetMask(isSetMask); |
| 580 | if (!CheckFunVecBinaryScalar(dst, src0, src1, mask, repeatTime, repeatParams, "Select")) { | 631 | if (!CheckFunVecBinaryScalar(dst, src0, src1, mask, repeatTime, repeatParams, "Select")) { |
| @@ -601,6 +652,9 @@ template <typename T, typename U> | |||
| 601 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | 652 | __aicore__ inline void Select(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, |
| 602 | const LocalTensor<T>& src0, T src1, SELMODE selMode, uint32_t count) | 653 | const LocalTensor<T>& src0, T src1, SELMODE selMode, uint32_t count) |
| 603 | { | 654 | { |
| 655 | + | ||
| 656 | + MstxTensor::GetMstxVecBinarySelInfo(dst, selMask, src0, count, true, selMode, "Select"); | ||
| 657 | + | ||
| 604 | using DataPrimType = PrimT<T>; | 658 | using DataPrimType = PrimT<T>; |
| 605 | using MaskPrimType = PrimT<U>; | 659 | using MaskPrimType = PrimT<U>; |
| 606 | 660 | ||
| @@ -912,4 +966,4 @@ __aicore__ inline void Select(const T2& dst, const LocalTensor<T1>& selMask, | |||
| 912 | 966 | ||
| 913 | } // namespace AscendC | 967 | } // namespace AscendC |
| 914 | 968 | ||
| 915 | -#endif // ASCENDC_MODULE_OPERATOR_VEC_CMPSEL_INTERFACE_IMPL_H | 969 | +#endif // ASCENDC_MODULE_OPERATOR_VEC_CMPSEL_INTERFACE_IMPL_H |
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -43,6 +44,9 @@ template <typename T> | |||
| 43 | __aicore__ inline __in_pipe__(S) __out_pipe__(V) void CreateVecIndex(LocalTensor<T> &dst, const T &firstValue, | 44 | __aicore__ inline __in_pipe__(S) __out_pipe__(V) void CreateVecIndex(LocalTensor<T> &dst, const T &firstValue, |
| 44 | uint64_t mask, uint8_t repeatTime, uint16_t dstBlkStride, uint8_t dstRepStride) | 45 | uint64_t mask, uint8_t repeatTime, uint16_t dstBlkStride, uint8_t dstRepStride) |
| 45 | { | 46 | { |
| 47 | + | ||
| 48 | + MstxTensor::GetMstxVecIndexInfo(dst, mask, repeatTime, dstBlkStride, dstRepStride, "CreateVecIndex"); | ||
| 49 | + | ||
| 46 | ASCENDC_ASSERT((SupportType<T, half, int16_t, float, int32_t>()), {KERNEL_LOG(KERNEL_ERROR, "Failed to check " | 50 | ASCENDC_ASSERT((SupportType<T, half, int16_t, float, int32_t>()), {KERNEL_LOG(KERNEL_ERROR, "Failed to check " |
| 47 | "dtype in CreateVecIndex, current api support dtype combination is dst: half / int16_t / float / int32_t");}); | 51 | "dtype in CreateVecIndex, current api support dtype combination is dst: half / int16_t / float / int32_t");}); |
| 48 | 52 | ||
| @@ -57,6 +61,9 @@ template <typename T> | |||
| 57 | __aicore__ inline __in_pipe__(S) __out_pipe__(V) void CreateVecIndex(LocalTensor<T> &dst, const T &firstValue, | 61 | __aicore__ inline __in_pipe__(S) __out_pipe__(V) void CreateVecIndex(LocalTensor<T> &dst, const T &firstValue, |
| 58 | uint64_t mask[], uint8_t repeatTime, uint16_t dstBlkStride, uint8_t dstRepStride) | 62 | uint64_t mask[], uint8_t repeatTime, uint16_t dstBlkStride, uint8_t dstRepStride) |
| 59 | { | 63 | { |
| 64 | + | ||
| 65 | + MstxTensor::GetMstxVecIndexInfo(dst, mask[0], mask[1], repeatTime, dstBlkStride, dstRepStride, "CreateVecIndex"); | ||
| 66 | + | ||
| 60 | ASCENDC_ASSERT((SupportType<T, half, int16_t, float, int32_t>()), {KERNEL_LOG(KERNEL_ERROR, "Failed to check " | 67 | ASCENDC_ASSERT((SupportType<T, half, int16_t, float, int32_t>()), {KERNEL_LOG(KERNEL_ERROR, "Failed to check " |
| 61 | "dtype in CreateVecIndex, current api support dtype combination is dst: half / int16_t / float / int32_t");}); | 68 | "dtype in CreateVecIndex, current api support dtype combination is dst: half / int16_t / float / int32_t");}); |
| 62 | 69 | ||
| @@ -71,6 +78,9 @@ template <typename T> | |||
| 71 | __aicore__ inline __in_pipe__(S) __out_pipe__(V) void CreateVecIndex(LocalTensor<T> dst, const T &firstValue, | 78 | __aicore__ inline __in_pipe__(S) __out_pipe__(V) void CreateVecIndex(LocalTensor<T> dst, const T &firstValue, |
| 72 | uint32_t count) | 79 | uint32_t count) |
| 73 | { | 80 | { |
| 81 | + | ||
| 82 | + MstxTensor::GetMstxVecIndexInfo(dst, count, "CreateVecIndex"); | ||
| 83 | + | ||
| 74 | 84 | ||
| 75 | if (!CheckFuncCreateVecIndex(dst, count, "CreateVecIndex")) { | 85 | if (!CheckFuncCreateVecIndex(dst, count, "CreateVecIndex")) { |
| 76 | ASCENDC_REPORT_CHECK_ERROR("CreateVecIndex", KernelFuncType::CALCOUNT_MODE); | 86 | ASCENDC_REPORT_CHECK_ERROR("CreateVecIndex", KernelFuncType::CALCOUNT_MODE); |
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -58,6 +59,9 @@ template <typename T, bool isSetMask> | |||
| 58 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue, uint64_t mask, | 59 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue, uint64_t mask, |
| 59 | const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride) | 60 | const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride) |
| 60 | { | 61 | { |
| 62 | + | ||
| 63 | + MstxTensor::GetMstxVecDupInfo(dst, mask, repeatTime, dstBlockStride, dstRepeatStride, isSetMask, "Duplicate"); | ||
| 64 | + | ||
| 61 | CheckDuplicateSupportedType<T>(); | 65 | CheckDuplicateSupportedType<T>(); |
| 62 | 66 | ||
| 63 | MaskSetter::Instance().SetMask(isSetMask); | 67 | MaskSetter::Instance().SetMask(isSetMask); |
| @@ -73,6 +77,9 @@ template <typename T, bool isSetMask> | |||
| 73 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue, uint64_t mask[], | 77 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue, uint64_t mask[], |
| 74 | const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride) | 78 | const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride) |
| 75 | { | 79 | { |
| 80 | + | ||
| 81 | + MstxTensor::GetMstxVecDupInfo(dst, mask[0], mask[1], repeatTime, dstBlockStride, dstRepeatStride, isSetMask, "Duplicate"); | ||
| 82 | + | ||
| 76 | CheckDuplicateSupportedType<T>(); | 83 | CheckDuplicateSupportedType<T>(); |
| 77 | 84 | ||
| 78 | MaskSetter::Instance().SetMask(isSetMask); | 85 | MaskSetter::Instance().SetMask(isSetMask); |
| @@ -94,6 +101,9 @@ __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue | |||
| 94 | template <typename T> | 101 | template <typename T> |
| 95 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue, const int32_t& count) | 102 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const T& scalarValue, const int32_t& count) |
| 96 | { | 103 | { |
| 104 | + | ||
| 105 | + MstxTensor::GetMstxVecDupInfo(dst, count, "Duplicate"); | ||
| 106 | + | ||
| 97 | CheckDuplicateSupportedType<T>(); | 107 | CheckDuplicateSupportedType<T>(); |
| 98 | 108 | ||
| 99 | if (!CheckFunDup(dst, count, "Duplicate")) { | 109 | if (!CheckFunDup(dst, count, "Duplicate")) { |
| @@ -115,6 +125,9 @@ template <typename T> | |||
| 115 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 125 | __aicore__ inline void Duplicate(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 116 | const int32_t& count) | 126 | const int32_t& count) |
| 117 | { | 127 | { |
| 128 | + | ||
| 129 | + MstxTensor::GetMstxVecDupInfo(dst, count, "Duplicate"); | ||
| 130 | + | ||
| 118 | using PrimType = PrimT<T>; | 131 | using PrimType = PrimT<T>; |
| 119 | CheckDuplicateSupportedType<PrimType>(); | 132 | CheckDuplicateSupportedType<PrimType>(); |
| 120 | 133 | ||
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -44,6 +45,9 @@ __aicore__ inline void GatherMask(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 44 | const LocalTensor<U>& src1Pattern, const bool reduceMode, const uint32_t mask, | 45 | const LocalTensor<U>& src1Pattern, const bool reduceMode, const uint32_t mask, |
| 45 | const GatherMaskParams& gatherMaskParams, uint64_t& rsvdCnt) | 46 | const GatherMaskParams& gatherMaskParams, uint64_t& rsvdCnt) |
| 46 | { | 47 | { |
| 48 | + | ||
| 49 | + MstxTensor::GetMstxVecGatherMaskInfo(dst, src0, mask, gatherMaskParams, mode, "GatherMask"); | ||
| 50 | + | ||
| 47 | using DstPrimType = PrimT<T>; | 51 | using DstPrimType = PrimT<T>; |
| 48 | using Src1PrimType = PrimT<U>; | 52 | using Src1PrimType = PrimT<U>; |
| 49 | 53 | ||
| @@ -69,6 +73,9 @@ __aicore__ inline void GatherMask(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 69 | const uint8_t src1Pattern, const bool reduceMode, const uint32_t mask, const GatherMaskParams& gatherMaskParams, | 73 | const uint8_t src1Pattern, const bool reduceMode, const uint32_t mask, const GatherMaskParams& gatherMaskParams, |
| 70 | uint64_t& rsvdCnt) | 74 | uint64_t& rsvdCnt) |
| 71 | { | 75 | { |
| 76 | + | ||
| 77 | + MstxTensor::GetMstxVecGatherMaskInfo(dst, src0, mask, gatherMaskParams, mode, "GatherMask"); | ||
| 78 | + | ||
| 72 | using PrimType = PrimT<T>; | 79 | using PrimType = PrimT<T>; |
| 73 | 80 | ||
| 74 | if (!CheckFuncVecGatherMask(dst, src0, src1Pattern, reduceMode, mask, gatherMaskParams, rsvdCnt, | 81 | if (!CheckFuncVecGatherMask(dst, src0, src1Pattern, reduceMode, mask, gatherMaskParams, rsvdCnt, |
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | + | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | 23 | ||
| @@ -53,6 +54,9 @@ __aicore__ inline void MulCast(const LocalTensor<T> &dst, const LocalTensor<U> & | |||
| 53 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulCast")) { | 54 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulCast")) { |
| 54 | ASCENDC_REPORT_CHECK_ERROR("MulCast", KernelFuncType::MASK_COUNT_MODE); | 55 | ASCENDC_REPORT_CHECK_ERROR("MulCast", KernelFuncType::MASK_COUNT_MODE); |
| 55 | } | 56 | } |
| 57 | + | ||
| 58 | + | ||
| 59 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "MulCast"); | ||
| 56 | 60 | ||
| 57 | MulCastCalc<DstPrimType, SrcPrimType, isSetMask>(dst, src0, src1, mask, repeatTime, repeatParams); | 61 | MulCastCalc<DstPrimType, SrcPrimType, isSetMask>(dst, src0, src1, mask, repeatTime, repeatParams); |
| 58 | } | 62 | } |
| @@ -71,6 +75,9 @@ __aicore__ inline void MulCast(const LocalTensor<T> &dst, const LocalTensor<U> & | |||
| 71 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulCast")) { | 75 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, mask, repeatTime, repeatParams, "MulCast")) { |
| 72 | ASCENDC_REPORT_CHECK_ERROR("MulCast", KernelFuncType::MASK_BIT_MODE); | 76 | ASCENDC_REPORT_CHECK_ERROR("MulCast", KernelFuncType::MASK_BIT_MODE); |
| 73 | } | 77 | } |
| 78 | + | ||
| 79 | + | ||
| 80 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "MulCast"); | ||
| 74 | 81 | ||
| 75 | MulCastCalc<DstPrimType, SrcPrimType, isSetMask>(dst, src0, src1, mask, repeatTime, repeatParams); | 82 | MulCastCalc<DstPrimType, SrcPrimType, isSetMask>(dst, src0, src1, mask, repeatTime, repeatParams); |
| 76 | } | 83 | } |
| @@ -83,6 +90,9 @@ __aicore__ inline void MulCast(const LocalTensor<T> &dst, const LocalTensor<U> & | |||
| 83 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "MulCast")) { | 90 | if (!CheckFuncVecBinaryDiffType(dst, src0, src1, count, "MulCast")) { |
| 84 | ASCENDC_REPORT_CHECK_ERROR("MulCast", KernelFuncType::CALCOUNT_MODE); | 91 | ASCENDC_REPORT_CHECK_ERROR("MulCast", KernelFuncType::CALCOUNT_MODE); |
| 85 | } | 92 | } |
| 93 | + | ||
| 94 | + | ||
| 95 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "MulCast", count); | ||
| 86 | 96 | ||
| 87 | MulCastCalc(dst, src0, src1, count); | 97 | MulCastCalc(dst, src0, src1, count); |
| 88 | } | 98 | } |
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | + | ||
| 18 | 19 | ||
| 19 | 20 | ||
| 20 | 21 | ||
| @@ -57,6 +58,9 @@ __aicore__ inline void BlockReduceSum(const LocalTensor<T>& dst, const LocalTens | |||
| 57 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, | 58 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 58 | const int32_t srcRepStride) | 59 | const int32_t srcRepStride) |
| 59 | { | 60 | { |
| 61 | + | ||
| 62 | + MstxTensor::GetMstxVecReduceBlkInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "BlockReduceSum"); | ||
| 63 | + | ||
| 60 | using PrimType = PrimT<T>; | 64 | using PrimType = PrimT<T>; |
| 61 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 65 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 62 | "BlockReduceSum, current api support dtype combination is src and dst both: half / float");}); | 66 | "BlockReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -88,6 +92,9 @@ __aicore__ inline void BlockReduceMax(const LocalTensor<T>& dst, const LocalTens | |||
| 88 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, | 92 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 89 | const int32_t srcRepStride) | 93 | const int32_t srcRepStride) |
| 90 | { | 94 | { |
| 95 | + | ||
| 96 | + MstxTensor::GetMstxVecReduceBlkInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "BlockReduceMax"); | ||
| 97 | + | ||
| 91 | using PrimType = PrimT<T>; | 98 | using PrimType = PrimT<T>; |
| 92 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 99 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 93 | "BlockReduceMax, current api support dtype combination is src and dst both: half / float");}); | 100 | "BlockReduceMax, current api support dtype combination is src and dst both: half / float");}); |
| @@ -119,6 +126,9 @@ __aicore__ inline void BlockReduceMin(const LocalTensor<T>& dst, const LocalTens | |||
| 119 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, | 126 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 120 | const int32_t srcRepStride) | 127 | const int32_t srcRepStride) |
| 121 | { | 128 | { |
| 129 | + | ||
| 130 | + MstxTensor::GetMstxVecReduceBlkInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "BlockReduceMin"); | ||
| 131 | + | ||
| 122 | using PrimType = PrimT<T>; | 132 | using PrimType = PrimT<T>; |
| 123 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 133 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 124 | "BlockReduceMin, current api support dtype combination is src and dst both: half / float");}); | 134 | "BlockReduceMin, current api support dtype combination is src and dst both: half / float");}); |
| @@ -150,6 +160,9 @@ __aicore__ inline void PairReduceSum(const LocalTensor<T>& dst, const LocalTenso | |||
| 150 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, | 160 | const int32_t repeatTime, const int32_t mask, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 151 | const int32_t srcRepStride) | 161 | const int32_t srcRepStride) |
| 152 | { | 162 | { |
| 163 | + | ||
| 164 | + MstxTensor::GetMstxVecReducePairInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "PairReduceSum"); | ||
| 165 | + | ||
| 153 | using PrimType = PrimT<T>; | 166 | using PrimType = PrimT<T>; |
| 154 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 167 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 155 | "PairReduceSum, current api support dtype combination is src and dst both: half / float");}); | 168 | "PairReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -170,6 +183,9 @@ __aicore__ inline void BlockReduceSum(const LocalTensor<T>& dst, const LocalTens | |||
| 170 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, | 183 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, |
| 171 | const int32_t srcRepStride) | 184 | const int32_t srcRepStride) |
| 172 | { | 185 | { |
| 186 | + | ||
| 187 | + MstxTensor::GetMstxVecReduceBlkInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "BlockReduceSum"); | ||
| 188 | + | ||
| 173 | using PrimType = PrimT<T>; | 189 | using PrimType = PrimT<T>; |
| 174 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 190 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 175 | "BlockReduceSum, current api support dtype combination is src and dst both: half / float");}); | 191 | "BlockReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -190,6 +206,9 @@ __aicore__ inline void BlockReduceMax(const LocalTensor<T>& dst, const LocalTens | |||
| 190 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, | 206 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, |
| 191 | const int32_t srcRepStride) | 207 | const int32_t srcRepStride) |
| 192 | { | 208 | { |
| 209 | + | ||
| 210 | + MstxTensor::GetMstxVecReduceBlkInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "BlockReduceMax"); | ||
| 211 | + | ||
| 193 | using PrimType = PrimT<T>; | 212 | using PrimType = PrimT<T>; |
| 194 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 213 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 195 | "BlockReduceMax, current api support dtype combination is src and dst both: half / float");}); | 214 | "BlockReduceMax, current api support dtype combination is src and dst both: half / float");}); |
| @@ -210,6 +229,9 @@ __aicore__ inline void BlockReduceMin(const LocalTensor<T>& dst, const LocalTens | |||
| 210 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, | 229 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, |
| 211 | const int32_t srcRepStride) | 230 | const int32_t srcRepStride) |
| 212 | { | 231 | { |
| 232 | + | ||
| 233 | + MstxTensor::GetMstxVecReduceBlkInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "BlockReduceMin"); | ||
| 234 | + | ||
| 213 | using PrimType = PrimT<T>; | 235 | using PrimType = PrimT<T>; |
| 214 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 236 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 215 | "BlockReduceMin, current api support dtype combination is src and dst both: half / float");}); | 237 | "BlockReduceMin, current api support dtype combination is src and dst both: half / float");}); |
| @@ -230,6 +252,9 @@ __aicore__ inline void PairReduceSum(const LocalTensor<T>& dst, const LocalTenso | |||
| 230 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, | 252 | const int32_t repeatTime, const uint64_t mask[], const int32_t dstRepStride, const int32_t srcBlkStride, |
| 231 | const int32_t srcRepStride) | 253 | const int32_t srcRepStride) |
| 232 | { | 254 | { |
| 255 | + | ||
| 256 | + MstxTensor::GetMstxVecReducePairInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "PairReduceSum"); | ||
| 257 | + | ||
| 233 | using PrimType = PrimT<T>; | 258 | using PrimType = PrimT<T>; |
| 234 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 259 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 235 | "PairReduceSum, current api support dtype combination is src and dst both: half / float");}); | 260 | "PairReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -251,6 +276,9 @@ __aicore__ inline void RepeatReduceSum(const LocalTensor<U>& dst, const LocalTen | |||
| 251 | const int32_t repeatTime, const int32_t mask, const int32_t dstBlkStride, const int32_t srcBlkStride, | 276 | const int32_t repeatTime, const int32_t mask, const int32_t dstBlkStride, const int32_t srcBlkStride, |
| 252 | const int32_t dstRepStride, const int32_t srcRepStride) | 277 | const int32_t dstRepStride, const int32_t srcRepStride) |
| 253 | { | 278 | { |
| 279 | + | ||
| 280 | + MstxTensor::GetMstxVecReduceRepeatInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "RepeatReduceSum"); | ||
| 281 | + | ||
| 254 | using DstPrimType = PrimT<U>; | 282 | using DstPrimType = PrimT<U>; |
| 255 | using SrcPrimType = PrimT<T>; | 283 | using SrcPrimType = PrimT<T>; |
| 256 | ASCENDC_CHECK_VALUE_RANGE(repeatTime, 0, 255, "repeatTime", "RepeatReduceSum"); | 284 | ASCENDC_CHECK_VALUE_RANGE(repeatTime, 0, 255, "repeatTime", "RepeatReduceSum"); |
| @@ -270,6 +298,9 @@ __aicore__ inline void RepeatReduceSum(const LocalTensor<T>& dst, const LocalTen | |||
| 270 | const int32_t repeatTime, const int32_t mask, const int32_t dstBlkStride, const int32_t srcBlkStride, | 298 | const int32_t repeatTime, const int32_t mask, const int32_t dstBlkStride, const int32_t srcBlkStride, |
| 271 | const int32_t dstRepStride, const int32_t srcRepStride) | 299 | const int32_t dstRepStride, const int32_t srcRepStride) |
| 272 | { | 300 | { |
| 301 | + | ||
| 302 | + MstxTensor::GetMstxVecReduceRepeatInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "RepeatReduceSum"); | ||
| 303 | + | ||
| 273 | using PrimType = PrimT<T>; | 304 | using PrimType = PrimT<T>; |
| 274 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 305 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 275 | "RepeatReduceSum, current api support dtype combination is src and dst both: half / float");}); | 306 | "RepeatReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -304,6 +335,9 @@ __aicore__ inline void WholeReduceSum(const LocalTensor<U>& dst, const LocalTens | |||
| 304 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 335 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 305 | const int32_t srcRepStride) | 336 | const int32_t srcRepStride) |
| 306 | { | 337 | { |
| 338 | + | ||
| 339 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceSum"); | ||
| 340 | + | ||
| 307 | using DstPrimType = PrimT<U>; | 341 | using DstPrimType = PrimT<U>; |
| 308 | using SrcPrmiType = PrimT<T>; | 342 | using SrcPrmiType = PrimT<T>; |
| 309 | ASCENDC_CHECK_VALUE_RANGE(repeatTime, 0, 255, "repeatTime", "WholeReduceSum"); | 343 | ASCENDC_CHECK_VALUE_RANGE(repeatTime, 0, 255, "repeatTime", "WholeReduceSum"); |
| @@ -323,6 +357,9 @@ __aicore__ inline void WholeReduceSum(const LocalTensor<T>& dst, const LocalTens | |||
| 323 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 357 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 324 | const int32_t srcRepStride) | 358 | const int32_t srcRepStride) |
| 325 | { | 359 | { |
| 360 | + | ||
| 361 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceSum"); | ||
| 362 | + | ||
| 326 | using PrimType = PrimT<T>; | 363 | using PrimType = PrimT<T>; |
| 327 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 364 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 328 | "WholeReduceSum, current api support dtype combination is src and dst both: half / float");}); | 365 | "WholeReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -355,6 +392,9 @@ __aicore__ inline void WholeReduceMax(const LocalTensor<T>& dst, const LocalTens | |||
| 355 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 392 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 356 | const int32_t srcRepStride, ReduceOrder order) | 393 | const int32_t srcRepStride, ReduceOrder order) |
| 357 | { | 394 | { |
| 395 | + | ||
| 396 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceMax"); | ||
| 397 | + | ||
| 358 | using PrimType = PrimT<T>; | 398 | using PrimType = PrimT<T>; |
| 359 | 399 | ||
| 360 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 400 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| @@ -405,6 +445,9 @@ __aicore__ inline void WholeReduceMin(const LocalTensor<T>& dst, const LocalTens | |||
| 405 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 445 | const uint64_t mask[], const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 406 | const int32_t srcRepStride, ReduceOrder order) | 446 | const int32_t srcRepStride, ReduceOrder order) |
| 407 | { | 447 | { |
| 448 | + | ||
| 449 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask[0], mask[1], repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceMin"); | ||
| 450 | + | ||
| 408 | using PrimType = PrimT<T>; | 451 | using PrimType = PrimT<T>; |
| 409 | 452 | ||
| 410 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 453 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| @@ -445,6 +488,9 @@ __aicore__ inline void WholeReduceSum(const LocalTensor<U>& dst, const LocalTens | |||
| 445 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 488 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 446 | const int32_t srcRepStride) | 489 | const int32_t srcRepStride) |
| 447 | { | 490 | { |
| 491 | + | ||
| 492 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceSum"); | ||
| 493 | + | ||
| 448 | using DstPrimType = PrimT<U>; | 494 | using DstPrimType = PrimT<U>; |
| 449 | using SrcPrimType = PrimT<T>; | 495 | using SrcPrimType = PrimT<T>; |
| 450 | ASCENDC_CHECK_VALUE_RANGE(repeatTime, 0, 255, "repeatTime", "WholeReduceSum"); | 496 | ASCENDC_CHECK_VALUE_RANGE(repeatTime, 0, 255, "repeatTime", "WholeReduceSum"); |
| @@ -464,6 +510,9 @@ __aicore__ inline void WholeReduceSum(const LocalTensor<T>& dst, const LocalTens | |||
| 464 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 510 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 465 | const int32_t srcRepStride) | 511 | const int32_t srcRepStride) |
| 466 | { | 512 | { |
| 513 | + | ||
| 514 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceSum"); | ||
| 515 | + | ||
| 467 | using PrimType = PrimT<T>; | 516 | using PrimType = PrimT<T>; |
| 468 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 517 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| 469 | "WholeReduceSum, current api support dtype combination is src and dst both: half / float");}); | 518 | "WholeReduceSum, current api support dtype combination is src and dst both: half / float");}); |
| @@ -485,6 +534,9 @@ __aicore__ inline void WholeReduceMax(const LocalTensor<T>& dst, const LocalTens | |||
| 485 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 534 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 486 | const int32_t srcRepStride, ReduceOrder order) | 535 | const int32_t srcRepStride, ReduceOrder order) |
| 487 | { | 536 | { |
| 537 | + | ||
| 538 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceMax"); | ||
| 539 | + | ||
| 488 | using PrimType = PrimT<T>; | 540 | using PrimType = PrimT<T>; |
| 489 | 541 | ||
| 490 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 542 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| @@ -518,6 +570,9 @@ __aicore__ inline void WholeReduceMin(const LocalTensor<T>& dst, const LocalTens | |||
| 518 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, | 570 | const int32_t mask, const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, |
| 519 | const int32_t srcRepStride, ReduceOrder order) | 571 | const int32_t srcRepStride, ReduceOrder order) |
| 520 | { | 572 | { |
| 573 | + | ||
| 574 | + MstxTensor::GetMstxVecReduceInfo(dst, src, mask, repeatTime, dstRepStride, srcBlkStride, srcRepStride, isSetMask, "WholeReduceMin"); | ||
| 575 | + | ||
| 521 | using PrimType = PrimT<T>; | 576 | using PrimType = PrimT<T>; |
| 522 | 577 | ||
| 523 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " | 578 | ASCENDC_ASSERT((SupportType<PrimType, half, float>()), { KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in " |
| @@ -569,6 +624,9 @@ __aicore__ inline void ReduceMax(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 569 | const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, const int32_t repeatTime, const int32_t srcRepStride, | 624 | const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, const int32_t repeatTime, const int32_t srcRepStride, |
| 570 | bool calIndex) | 625 | bool calIndex) |
| 571 | { | 626 | { |
| 627 | + | ||
| 628 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, mask, repeatTime, srcRepStride, "ReduceMax"); | ||
| 629 | + | ||
| 572 | using PrimType = PrimT<T>; | 630 | using PrimType = PrimT<T>; |
| 573 | 631 | ||
| 574 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMax")) { | 632 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMax")) { |
| @@ -607,6 +665,9 @@ __aicore__ inline void ReduceMin(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 607 | const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, const int32_t repeatTime, const int32_t srcRepStride, | 665 | const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, const int32_t repeatTime, const int32_t srcRepStride, |
| 608 | bool calIndex) | 666 | bool calIndex) |
| 609 | { | 667 | { |
| 668 | + | ||
| 669 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, mask, repeatTime, srcRepStride, "ReduceMin"); | ||
| 670 | + | ||
| 610 | using PrimType = PrimT<T>; | 671 | using PrimType = PrimT<T>; |
| 611 | 672 | ||
| 612 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMin")) { | 673 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMin")) { |
| @@ -643,6 +704,9 @@ template <typename T> | |||
| 643 | __aicore__ inline void ReduceSum(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 704 | __aicore__ inline void ReduceSum(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 644 | const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, const int32_t repeatTime, const int32_t srcRepStride) | 705 | const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, const int32_t repeatTime, const int32_t srcRepStride) |
| 645 | { | 706 | { |
| 707 | + | ||
| 708 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, mask, repeatTime, srcRepStride, "ReduceSum"); | ||
| 709 | + | ||
| 646 | using PrimType = PrimT<T>; | 710 | using PrimType = PrimT<T>; |
| 647 | 711 | ||
| 648 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, srcRepStride, "ReduceSum")) { | 712 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, srcRepStride, "ReduceSum")) { |
| @@ -670,6 +734,9 @@ __aicore__ inline void ReduceMax(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 670 | const LocalTensor<T>& sharedTmpBuffer, const uint64_t mask[], const int32_t repeatTime, const int32_t srcRepStride, | 734 | const LocalTensor<T>& sharedTmpBuffer, const uint64_t mask[], const int32_t repeatTime, const int32_t srcRepStride, |
| 671 | bool calIndex) | 735 | bool calIndex) |
| 672 | { | 736 | { |
| 737 | + | ||
| 738 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, mask[0], mask[1], repeatTime, srcRepStride, "ReduceMax"); | ||
| 739 | + | ||
| 673 | using PrimType = PrimT<T>; | 740 | using PrimType = PrimT<T>; |
| 674 | 741 | ||
| 675 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMax")) { | 742 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMax")) { |
| @@ -697,6 +764,9 @@ __aicore__ inline void ReduceMin(const LocalTensor<T>& dst, const LocalTensor<T> | |||
| 697 | const LocalTensor<T>& sharedTmpBuffer, const uint64_t mask[], const int32_t repeatTime, const int32_t srcRepStride, | 764 | const LocalTensor<T>& sharedTmpBuffer, const uint64_t mask[], const int32_t repeatTime, const int32_t srcRepStride, |
| 698 | bool calIndex) | 765 | bool calIndex) |
| 699 | { | 766 | { |
| 767 | + | ||
| 768 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, mask[0], mask[1], repeatTime, srcRepStride, "ReduceMin"); | ||
| 769 | + | ||
| 700 | using PrimType = PrimT<T>; | 770 | using PrimType = PrimT<T>; |
| 701 | 771 | ||
| 702 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMin")) { | 772 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, calIndex, srcRepStride, "ReduceMin")) { |
| @@ -723,6 +793,9 @@ template <typename T> | |||
| 723 | __aicore__ inline void ReduceSum(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 793 | __aicore__ inline void ReduceSum(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 724 | const LocalTensor<T>& sharedTmpBuffer, const uint64_t mask[], const int32_t repeatTime, const int32_t srcRepStride) | 794 | const LocalTensor<T>& sharedTmpBuffer, const uint64_t mask[], const int32_t repeatTime, const int32_t srcRepStride) |
| 725 | { | 795 | { |
| 796 | + | ||
| 797 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, mask[0], mask[1], repeatTime, srcRepStride, "ReduceSum"); | ||
| 798 | + | ||
| 726 | using PrimType = PrimT<T>; | 799 | using PrimType = PrimT<T>; |
| 727 | 800 | ||
| 728 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, srcRepStride, "ReduceSum")) { | 801 | if (!CheckFunVecReduce(dst, src, sharedTmpBuffer, repeatTime, mask, srcRepStride, "ReduceSum")) { |
| @@ -758,6 +831,9 @@ template <typename T> | |||
| 758 | __aicore__ inline void ReduceMin(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 831 | __aicore__ inline void ReduceMin(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 759 | const LocalTensor<T>& sharedTmpBuffer, const int32_t count, bool calIndex) | 832 | const LocalTensor<T>& sharedTmpBuffer, const int32_t count, bool calIndex) |
| 760 | { | 833 | { |
| 834 | + | ||
| 835 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, count, "ReduceMin"); | ||
| 836 | + | ||
| 761 | using PrimType = PrimT<T>; | 837 | using PrimType = PrimT<T>; |
| 762 | 838 | ||
| 763 | 839 | ||
| @@ -815,6 +891,9 @@ template <typename T> | |||
| 815 | __aicore__ inline void ReduceMax(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 891 | __aicore__ inline void ReduceMax(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 816 | const LocalTensor<T>& sharedTmpBuffer, const int32_t count, bool calIndex) | 892 | const LocalTensor<T>& sharedTmpBuffer, const int32_t count, bool calIndex) |
| 817 | { | 893 | { |
| 894 | + | ||
| 895 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, count, "ReduceMax"); | ||
| 896 | + | ||
| 818 | using PrimType = PrimT<T>; | 897 | using PrimType = PrimT<T>; |
| 819 | 898 | ||
| 820 | 899 | ||
| @@ -872,6 +951,9 @@ template <typename T, bool isSetMask> | |||
| 872 | __aicore__ inline void ReduceSum(const LocalTensor<T>& dst, const LocalTensor<T>& src, | 951 | __aicore__ inline void ReduceSum(const LocalTensor<T>& dst, const LocalTensor<T>& src, |
| 873 | const LocalTensor<T>& sharedTmpBuffer, const int32_t count) | 952 | const LocalTensor<T>& sharedTmpBuffer, const int32_t count) |
| 874 | { | 953 | { |
| 954 | + | ||
| 955 | + MstxTensor::GetMstxVecReduceComplexInfo(dst, src, sharedTmpBuffer, count, "ReduceSum"); | ||
| 956 | + | ||
| 875 | using PrimType = PrimT<T>; | 957 | using PrimType = PrimT<T>; |
| 876 | ASCENDC_CHECK_VALUE_RANGE(count, 1, TOTAL_UB_SIZE / sizeof(PrimType), "count", "ReduceSum"); | 958 | ASCENDC_CHECK_VALUE_RANGE(count, 1, TOTAL_UB_SIZE / sizeof(PrimType), "count", "ReduceSum"); |
| 877 | 959 | ||
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -62,6 +63,9 @@ __aicore__ inline void Axpy(const LocalTensor<T>& dst, const LocalTensor<U>& src | |||
| 62 | if (!CheckFunVecBinaryScalarDiffType(dst, src, scalarValue, mask, repeatTime, repeatParams, "Axpy")) { | 63 | if (!CheckFunVecBinaryScalarDiffType(dst, src, scalarValue, mask, repeatTime, repeatParams, "Axpy")) { |
| 63 | ASCENDC_REPORT_CHECK_ERROR("Axpy", KernelFuncType::MASK_COUNT_MODE); | 64 | ASCENDC_REPORT_CHECK_ERROR("Axpy", KernelFuncType::MASK_COUNT_MODE); |
| 64 | } | 65 | } |
| 66 | + | ||
| 67 | + | ||
| 68 | + MstxTensor::GetMstxVecUnaryTenaryInfo<T, U, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Axpy"); | ||
| 65 | 69 | ||
| 66 | AxpyImpl<T, U, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ U*)src.GetPhyAddr(), scalarValue, mask, | 70 | AxpyImpl<T, U, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ U*)src.GetPhyAddr(), scalarValue, mask, |
| 67 | repeatTime, repeatParams); | 71 | repeatTime, repeatParams); |
| @@ -76,6 +80,9 @@ __aicore__ inline void Axpy(const LocalTensor<T>& dst, const LocalTensor<U>& src | |||
| 76 | if (!CheckFunVecBinaryScalarDiffType(dst, src, scalarValue, mask, repeatTime, repeatParams, "Axpy")) { | 80 | if (!CheckFunVecBinaryScalarDiffType(dst, src, scalarValue, mask, repeatTime, repeatParams, "Axpy")) { |
| 77 | ASCENDC_REPORT_CHECK_ERROR("Axpy", KernelFuncType::MASK_BIT_MODE); | 81 | ASCENDC_REPORT_CHECK_ERROR("Axpy", KernelFuncType::MASK_BIT_MODE); |
| 78 | } | 82 | } |
| 83 | + | ||
| 84 | + | ||
| 85 | + MstxTensor::GetMstxVecUnaryTenaryInfo<T, U, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Axpy"); | ||
| 79 | 86 | ||
| 80 | AxpyImpl<T, U, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ U*)src.GetPhyAddr(), scalarValue, mask, | 87 | AxpyImpl<T, U, isSetMask>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ U*)src.GetPhyAddr(), scalarValue, mask, |
| 81 | repeatTime, repeatParams); | 88 | repeatTime, repeatParams); |
| @@ -97,6 +104,9 @@ __aicore__ inline void Axpy(const LocalTensor<T>& dst, const LocalTensor<U>& src | |||
| 97 | if (!CheckFunVecBinaryScalarDiffType(dst, src, scalarValue, count, "Axpy")) { | 104 | if (!CheckFunVecBinaryScalarDiffType(dst, src, scalarValue, count, "Axpy")) { |
| 98 | ASCENDC_REPORT_CHECK_ERROR("Axpy", KernelFuncType::CALCOUNT_MODE); | 105 | ASCENDC_REPORT_CHECK_ERROR("Axpy", KernelFuncType::CALCOUNT_MODE); |
| 99 | } | 106 | } |
| 107 | + | ||
| 108 | + | ||
| 109 | + MstxTensor::GetMstxVecUnaryTenaryInfo<T, U, true>(dst, src, "Axpy", count); | ||
| 100 | 110 | ||
| 101 | AxpyImpl<T, U>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ U*)src.GetPhyAddr(), scalarValue, count); | 111 | AxpyImpl<T, U>((__ubuf__ T*)dst.GetPhyAddr(), (__ubuf__ U*)src.GetPhyAddr(), scalarValue, count); |
| 102 | } | 112 | } |
| @@ -18,6 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | + | ||
| 21 | 22 | ||
| 22 | 23 | ||
| 23 | 24 | ||
| @@ -52,6 +53,9 @@ namespace AscendC { | |||
| 52 | */ | 53 | */ |
| 53 | template <typename T> __aicore__ inline void Transpose(const LocalTensor<T>& dst, const LocalTensor<T>& src) | 54 | template <typename T> __aicore__ inline void Transpose(const LocalTensor<T>& dst, const LocalTensor<T>& src) |
| 54 | { | 55 | { |
| 56 | + | ||
| 57 | + MstxTensor::GetMstxVecTransposeInfo(dst, src, "Transpose"); | ||
| 58 | + | ||
| 55 | ASCENDC_ASSERT((SupportType<PrimT<T>, int16_t, uint16_t, half>()), | 59 | ASCENDC_ASSERT((SupportType<PrimT<T>, int16_t, uint16_t, half>()), |
| 56 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Transpose, current api support dtype combination is " | 60 | {KERNEL_LOG(KERNEL_ERROR, "Failed to check dtype in Transpose, current api support dtype combination is " |
| 57 | "src and dst both: int16_t, uint16_t, half");}); | 61 | "src and dst both: int16_t, uint16_t, half");}); |
| @@ -122,6 +126,9 @@ template <typename T> | |||
| 122 | __aicore__ inline void Transpose(const LocalTensor<T> &dst, const LocalTensor<T> &src, | 126 | __aicore__ inline void Transpose(const LocalTensor<T> &dst, const LocalTensor<T> &src, |
| 123 | const LocalTensor<uint8_t> &sharedTmpBuffer, const TransposeParamsExt &transposeParams) | 127 | const LocalTensor<uint8_t> &sharedTmpBuffer, const TransposeParamsExt &transposeParams) |
| 124 | { | 128 | { |
| 129 | + | ||
| 130 | + MstxTensor::GetMstxVecTransposeTempInfo(dst, src, sharedTmpBuffer, "Transpose"); | ||
| 131 | + | ||
| 125 | 132 | ||
| 126 | if (!CheckFunTranspose(dst, src, sharedTmpBuffer, transposeParams, "Transpose")) { | 133 | if (!CheckFunTranspose(dst, src, sharedTmpBuffer, transposeParams, "Transpose")) { |
| 127 | ASCENDC_REPORT_CHECK_ERROR("Transpose", KernelFuncType::NONE_MODE); | 134 | ASCENDC_REPORT_CHECK_ERROR("Transpose", KernelFuncType::NONE_MODE); |
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | + | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | 23 | ||
| @@ -68,6 +69,9 @@ __aicore__ inline void Relu(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 68 | "Relu")) { | 69 | "Relu")) { |
| 69 | ASCENDC_REPORT_CHECK_ERROR("Relu", KernelFuncType::MASK_BIT_MODE); | 70 | ASCENDC_REPORT_CHECK_ERROR("Relu", KernelFuncType::MASK_BIT_MODE); |
| 70 | } | 71 | } |
| 72 | + | ||
| 73 | + | ||
| 74 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Relu"); | ||
| 71 | 75 | ||
| 72 | ReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 76 | ReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 73 | mask, repeatTime, repeatParams); | 77 | mask, repeatTime, repeatParams); |
| @@ -83,6 +87,9 @@ __aicore__ inline void Relu(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 83 | "Relu")) { | 87 | "Relu")) { |
| 84 | ASCENDC_REPORT_CHECK_ERROR("Relu", KernelFuncType::MASK_COUNT_MODE); | 88 | ASCENDC_REPORT_CHECK_ERROR("Relu", KernelFuncType::MASK_COUNT_MODE); |
| 85 | } | 89 | } |
| 90 | + | ||
| 91 | + | ||
| 92 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Relu"); | ||
| 86 | 93 | ||
| 87 | ReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 94 | ReluImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 88 | mask, repeatTime, repeatParams); | 95 | mask, repeatTime, repeatParams); |
| @@ -103,6 +110,9 @@ __aicore__ inline void Relu(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 103 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Relu")) { | 110 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Relu")) { |
| 104 | ASCENDC_REPORT_CHECK_ERROR("Relu", KernelFuncType::CALCOUNT_MODE); | 111 | ASCENDC_REPORT_CHECK_ERROR("Relu", KernelFuncType::CALCOUNT_MODE); |
| 105 | } | 112 | } |
| 113 | + | ||
| 114 | + | ||
| 115 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Relu", count); | ||
C 调整下api name顺序 ![]() ![]() | |||
| 106 | 116 | ||
| 107 | ReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 117 | ReluImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 108 | } | 118 | } |
| @@ -132,6 +142,9 @@ __aicore__ inline void Exp(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 132 | "Exp")) { | 142 | "Exp")) { |
| 133 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_BIT_MODE); | 143 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_BIT_MODE); |
| 134 | } | 144 | } |
| 145 | + | ||
| 146 | + | ||
| 147 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Exp"); | ||
| 135 | 148 | ||
| 136 | ExpImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 149 | ExpImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 137 | mask, repeatTime, repeatParams); | 150 | mask, repeatTime, repeatParams); |
| @@ -147,6 +160,9 @@ __aicore__ inline void Exp(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 147 | "Exp")) { | 160 | "Exp")) { |
| 148 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_COUNT_MODE); | 161 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_COUNT_MODE); |
| 149 | } | 162 | } |
| 163 | + | ||
| 164 | + | ||
| 165 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Exp"); | ||
| 150 | 166 | ||
| 151 | ExpImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 167 | ExpImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 152 | mask, repeatTime, repeatParams); | 168 | mask, repeatTime, repeatParams); |
| @@ -163,6 +179,9 @@ __aicore__ inline void Exp(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 163 | "Exp")) { | 179 | "Exp")) { |
| 164 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_BIT_MODE); | 180 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_BIT_MODE); |
| 165 | } | 181 | } |
| 182 | + | ||
| 183 | + | ||
| 184 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Exp"); | ||
| 166 | 185 | ||
| 167 | ExpImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 186 | ExpImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 168 | mask, repeatTime, repeatParams); | 187 | mask, repeatTime, repeatParams); |
| @@ -178,6 +197,9 @@ __aicore__ inline void Exp(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 178 | "Exp")) { | 197 | "Exp")) { |
| 179 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_COUNT_MODE); | 198 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::MASK_COUNT_MODE); |
| 180 | } | 199 | } |
| 200 | + | ||
| 201 | + | ||
| 202 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Exp"); | ||
| 181 | 203 | ||
| 182 | ExpImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 204 | ExpImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 183 | mask, repeatTime, repeatParams); | 205 | mask, repeatTime, repeatParams); |
| @@ -200,6 +222,9 @@ __aicore__ inline void Exp(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 200 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Exp")) { | 222 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Exp")) { |
| 201 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::CALCOUNT_MODE); | 223 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::CALCOUNT_MODE); |
| 202 | } | 224 | } |
| 225 | + | ||
| 226 | + | ||
| 227 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Exp", count); | ||
| 203 | 228 | ||
| 204 | ExpImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 229 | ExpImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 205 | } | 230 | } |
| @@ -212,6 +237,9 @@ __aicore__ inline void Exp(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 212 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Exp")) { | 237 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Exp")) { |
| 213 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::CALCOUNT_MODE); | 238 | ASCENDC_REPORT_CHECK_ERROR("Exp", KernelFuncType::CALCOUNT_MODE); |
| 214 | } | 239 | } |
| 240 | + | ||
| 241 | + | ||
| 242 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Exp", count); | ||
| 215 | 243 | ||
| 216 | ExpImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 244 | ExpImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 217 | } | 245 | } |
| @@ -241,6 +269,9 @@ __aicore__ inline void Ln(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 241 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { | 269 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { |
| 242 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_BIT_MODE); | 270 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_BIT_MODE); |
| 243 | } | 271 | } |
| 272 | + | ||
| 273 | + | ||
| 274 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Ln"); | ||
| 244 | 275 | ||
| 245 | LnImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 276 | LnImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 246 | mask, repeatTime, repeatParams); | 277 | mask, repeatTime, repeatParams); |
| @@ -255,6 +286,9 @@ __aicore__ inline void Ln(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 255 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { | 286 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { |
| 256 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_COUNT_MODE); | 287 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_COUNT_MODE); |
| 257 | } | 288 | } |
| 289 | + | ||
| 290 | + | ||
| 291 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Ln"); | ||
| 258 | 292 | ||
| 259 | LnImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 293 | LnImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 260 | mask, repeatTime, repeatParams); | 294 | mask, repeatTime, repeatParams); |
| @@ -270,6 +304,9 @@ __aicore__ inline void Ln(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 270 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { | 304 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { |
| 271 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_BIT_MODE); | 305 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_BIT_MODE); |
| 272 | } | 306 | } |
| 307 | + | ||
| 308 | + | ||
| 309 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Ln"); | ||
| 273 | 310 | ||
| 274 | LnImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 311 | LnImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 275 | mask, repeatTime, repeatParams); | 312 | mask, repeatTime, repeatParams); |
| @@ -284,6 +321,9 @@ __aicore__ inline void Ln(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 284 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { | 321 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), mask, repeatTime, repeatParams, "Ln")) { |
| 285 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_COUNT_MODE); | 322 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::MASK_COUNT_MODE); |
| 286 | } | 323 | } |
| 324 | + | ||
| 325 | + | ||
| 326 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Ln"); | ||
| 287 | 327 | ||
| 288 | LnImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 328 | LnImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 289 | mask, repeatTime, repeatParams); | 329 | mask, repeatTime, repeatParams); |
| @@ -306,6 +346,9 @@ __aicore__ inline void Ln(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 306 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Ln")) { | 346 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Ln")) { |
| 307 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::CALCOUNT_MODE); | 347 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::CALCOUNT_MODE); |
| 308 | } | 348 | } |
| 349 | + | ||
| 350 | + | ||
| 351 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Ln", count); | ||
| 309 | 352 | ||
| 310 | LnImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 353 | LnImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 311 | } | 354 | } |
| @@ -318,6 +361,9 @@ __aicore__ inline void Ln(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 318 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Ln")) { | 361 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Ln")) { |
| 319 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::CALCOUNT_MODE); | 362 | ASCENDC_REPORT_CHECK_ERROR("Ln", KernelFuncType::CALCOUNT_MODE); |
| 320 | } | 363 | } |
| 364 | + | ||
| 365 | + | ||
| 366 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Ln", count); | ||
| 321 | 367 | ||
| 322 | LnImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 368 | LnImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 323 | } | 369 | } |
| @@ -347,6 +393,9 @@ __aicore__ inline void Abs(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 347 | "Abs")) { | 393 | "Abs")) { |
| 348 | ASCENDC_REPORT_CHECK_ERROR("Abs", KernelFuncType::MASK_BIT_MODE); | 394 | ASCENDC_REPORT_CHECK_ERROR("Abs", KernelFuncType::MASK_BIT_MODE); |
| 349 | } | 395 | } |
| 396 | + | ||
| 397 | + | ||
| 398 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Abs"); | ||
| 350 | 399 | ||
| 351 | AbsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 400 | AbsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 352 | mask, repeatTime, repeatParams); | 401 | mask, repeatTime, repeatParams); |
| @@ -362,6 +411,9 @@ __aicore__ inline void Abs(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 362 | "Abs")) { | 411 | "Abs")) { |
| 363 | ASCENDC_REPORT_CHECK_ERROR("Abs", KernelFuncType::MASK_COUNT_MODE); | 412 | ASCENDC_REPORT_CHECK_ERROR("Abs", KernelFuncType::MASK_COUNT_MODE); |
| 364 | } | 413 | } |
| 414 | + | ||
| 415 | + | ||
| 416 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Abs"); | ||
| 365 | 417 | ||
| 366 | AbsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 418 | AbsImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 367 | mask, repeatTime, repeatParams); | 419 | mask, repeatTime, repeatParams); |
| @@ -382,6 +434,9 @@ __aicore__ inline void Abs(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 382 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Abs")) { | 434 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Abs")) { |
| 383 | ASCENDC_REPORT_CHECK_ERROR("Abs", KernelFuncType::CALCOUNT_MODE); | 435 | ASCENDC_REPORT_CHECK_ERROR("Abs", KernelFuncType::CALCOUNT_MODE); |
| 384 | } | 436 | } |
| 437 | + | ||
| 438 | + | ||
| 439 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Abs", count); | ||
| 385 | 440 | ||
| 386 | AbsImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 441 | AbsImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 387 | } | 442 | } |
| @@ -401,6 +456,9 @@ __aicore__ inline void Abs(const LocalTensor<T>& dst, const LocalTensor<U>& src, | |||
| 401 | if (!CheckFunVecBinaryScalarDiffType(dst, src, static_cast<PrimT<U>>(0), count, "vabs")) { | 456 | if (!CheckFunVecBinaryScalarDiffType(dst, src, static_cast<PrimT<U>>(0), count, "vabs")) { |
| 402 | ASSERT(false && "check vabs instr failed"); | 457 | ASSERT(false && "check vabs instr failed"); |
| 403 | } | 458 | } |
| 459 | + | ||
| 460 | + | ||
| 461 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Abs", count); | ||
| 404 | 462 | ||
| 405 | AbsImpl((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src.GetPhyAddr(), count); | 463 | AbsImpl((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src.GetPhyAddr(), count); |
| 406 | } | 464 | } |
| @@ -431,6 +489,9 @@ __aicore__ inline void Reciprocal(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 431 | "Reciprocal")) { | 489 | "Reciprocal")) { |
| 432 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_BIT_MODE); | 490 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_BIT_MODE); |
| 433 | } | 491 | } |
| 492 | + | ||
| 493 | + | ||
| 494 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Reciprocal"); | ||
| 434 | 495 | ||
| 435 | ReciprocalImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 496 | ReciprocalImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 436 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); | 497 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -446,6 +507,9 @@ __aicore__ inline void Reciprocal(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 446 | "Reciprocal")) { | 507 | "Reciprocal")) { |
| 447 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_COUNT_MODE); | 508 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_COUNT_MODE); |
| 448 | } | 509 | } |
| 510 | + | ||
| 511 | + | ||
| 512 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Reciprocal"); | ||
| 449 | 513 | ||
| 450 | ReciprocalImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 514 | ReciprocalImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 451 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); | 515 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -462,6 +526,9 @@ __aicore__ inline void Reciprocal(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 462 | "Reciprocal")) { | 526 | "Reciprocal")) { |
| 463 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_BIT_MODE); | 527 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_BIT_MODE); |
| 464 | } | 528 | } |
| 529 | + | ||
| 530 | + | ||
| 531 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Reciprocal"); | ||
| 465 | 532 | ||
| 466 | ReciprocalImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 533 | ReciprocalImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 467 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); | 534 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -477,6 +544,9 @@ __aicore__ inline void Reciprocal(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 477 | "Reciprocal")) { | 544 | "Reciprocal")) { |
| 478 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_COUNT_MODE); | 545 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::MASK_COUNT_MODE); |
| 479 | } | 546 | } |
| 547 | + | ||
| 548 | + | ||
| 549 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Reciprocal"); | ||
| 480 | 550 | ||
| 481 | ReciprocalImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), | 551 | ReciprocalImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), |
| 482 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); | 552 | (__ubuf__ PrimType*)src.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -500,6 +570,9 @@ __aicore__ inline void Reciprocal(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 500 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Reciprocal")) { | 570 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Reciprocal")) { |
| 501 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::CALCOUNT_MODE); | 571 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::CALCOUNT_MODE); |
| 502 | } | 572 | } |
| 573 | + | ||
| 574 | + | ||
| 575 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Reciprocal", count); | ||
| 503 | 576 | ||
| 504 | ReciprocalImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 577 | ReciprocalImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 505 | } | 578 | } |
| @@ -513,6 +586,9 @@ __aicore__ inline void Reciprocal(const LocalTensor<T>& dst, const LocalTensor<T | |||
| 513 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Reciprocal")) { | 586 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Reciprocal")) { |
| 514 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::CALCOUNT_MODE); | 587 | ASCENDC_REPORT_CHECK_ERROR("Reciprocal", KernelFuncType::CALCOUNT_MODE); |
| 515 | } | 588 | } |
| 589 | + | ||
| 590 | + | ||
| 591 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Reciprocal", count); | ||
| 516 | 592 | ||
| 517 | ReciprocalImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 593 | ReciprocalImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 518 | } | 594 | } |
| @@ -543,6 +619,9 @@ __aicore__ inline void Rsqrt(const LocalTensor<T>& dst, const LocalTensor<T>& sr | |||
| 543 | "Rsqrt")) { | 619 | "Rsqrt")) { |
| 544 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_BIT_MODE); | 620 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_BIT_MODE); |
| 545 | } | 621 | } |
| 622 | + | ||
| 623 | + | ||
| 624 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Rsqrt"); | ||
| 546 | 625 | ||
| 547 | RsqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 626 | RsqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 548 | mask, repeatTime, repeatParams); | 627 | mask, repeatTime, repeatParams); |
| @@ -558,6 +637,9 @@ __aicore__ inline void Rsqrt(const LocalTensor<T>& dst, const LocalTensor<T>& sr | |||
| 558 | "Rsqrt")) { | 637 | "Rsqrt")) { |
| 559 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_COUNT_MODE); | 638 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_COUNT_MODE); |
| 560 | } | 639 | } |
| 640 | + | ||
| 641 | + | ||
| 642 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Rsqrt"); | ||
| 561 | 643 | ||
| 562 | RsqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 644 | RsqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 563 | mask, repeatTime, repeatParams); | 645 | mask, repeatTime, repeatParams); |
| @@ -574,6 +656,9 @@ __aicore__ inline void Rsqrt(const LocalTensor<T>& dst, const LocalTensor<T>& sr | |||
| 574 | "Rsqrt")) { | 656 | "Rsqrt")) { |
| 575 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_BIT_MODE); | 657 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_BIT_MODE); |
| 576 | } | 658 | } |
| 659 | + | ||
| 660 | + | ||
| 661 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Rsqrt"); | ||
| 577 | 662 | ||
| 578 | RsqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 663 | RsqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 579 | mask, repeatTime, repeatParams); | 664 | mask, repeatTime, repeatParams); |
| @@ -589,6 +674,9 @@ __aicore__ inline void Rsqrt(const LocalTensor<T>& dst, const LocalTensor<T>& sr | |||
| 589 | "Rsqrt")) { | 674 | "Rsqrt")) { |
| 590 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_COUNT_MODE); | 675 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::MASK_COUNT_MODE); |
| 591 | } | 676 | } |
| 677 | + | ||
| 678 | + | ||
| 679 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Rsqrt"); | ||
| 592 | 680 | ||
| 593 | RsqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 681 | RsqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 594 | mask, repeatTime, repeatParams); | 682 | mask, repeatTime, repeatParams); |
| @@ -611,6 +699,9 @@ __aicore__ inline void Rsqrt(const LocalTensor<T>& dst, const LocalTensor<T>& sr | |||
| 611 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Rsqrt")) { | 699 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Rsqrt")) { |
| 612 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::CALCOUNT_MODE); | 700 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::CALCOUNT_MODE); |
| 613 | } | 701 | } |
| 702 | + | ||
| 703 | + | ||
| 704 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Rsqrt", count); | ||
| 614 | 705 | ||
| 615 | RsqrtImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 706 | RsqrtImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 616 | } | 707 | } |
| @@ -623,6 +714,9 @@ __aicore__ inline void Rsqrt(const LocalTensor<T>& dst, const LocalTensor<T>& sr | |||
| 623 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Rsqrt")) { | 714 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Rsqrt")) { |
| 624 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::CALCOUNT_MODE); | 715 | ASCENDC_REPORT_CHECK_ERROR("Rsqrt", KernelFuncType::CALCOUNT_MODE); |
| 625 | } | 716 | } |
| 717 | + | ||
| 718 | + | ||
| 719 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Rsqrt", count); | ||
| 626 | 720 | ||
| 627 | RsqrtImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 721 | RsqrtImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 628 | } | 722 | } |
| @@ -653,6 +747,9 @@ __aicore__ inline void Sqrt(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 653 | "Sqrt")) { | 747 | "Sqrt")) { |
| 654 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_BIT_MODE); | 748 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_BIT_MODE); |
| 655 | } | 749 | } |
| 750 | + | ||
| 751 | + | ||
| 752 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Sqrt"); | ||
| 656 | 753 | ||
| 657 | SqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 754 | SqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 658 | mask, repeatTime, repeatParams); | 755 | mask, repeatTime, repeatParams); |
| @@ -668,6 +765,9 @@ __aicore__ inline void Sqrt(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 668 | "Sqrt")) { | 765 | "Sqrt")) { |
| 669 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_COUNT_MODE); | 766 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_COUNT_MODE); |
| 670 | } | 767 | } |
| 768 | + | ||
| 769 | + | ||
| 770 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Sqrt"); | ||
| 671 | 771 | ||
| 672 | SqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 772 | SqrtImpl<PrimType, isSetMask, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 673 | mask, repeatTime, repeatParams); | 773 | mask, repeatTime, repeatParams); |
| @@ -684,6 +784,9 @@ __aicore__ inline void Sqrt(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 684 | "Sqrt")) { | 784 | "Sqrt")) { |
| 685 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_BIT_MODE); | 785 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_BIT_MODE); |
| 686 | } | 786 | } |
| 787 | + | ||
| 788 | + | ||
| 789 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Sqrt"); | ||
| 687 | 790 | ||
| 688 | SqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 791 | SqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 689 | mask, repeatTime, repeatParams); | 792 | mask, repeatTime, repeatParams); |
| @@ -699,6 +802,9 @@ __aicore__ inline void Sqrt(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 699 | "Sqrt")) { | 802 | "Sqrt")) { |
| 700 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_COUNT_MODE); | 803 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::MASK_COUNT_MODE); |
| 701 | } | 804 | } |
| 805 | + | ||
| 806 | + | ||
| 807 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Sqrt"); | ||
| 702 | 808 | ||
| 703 | SqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 809 | SqrtImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 704 | mask, repeatTime, repeatParams); | 810 | mask, repeatTime, repeatParams); |
| @@ -721,6 +827,9 @@ __aicore__ inline void Sqrt(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 721 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Sqrt")) { | 827 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Sqrt")) { |
| 722 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::CALCOUNT_MODE); | 828 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::CALCOUNT_MODE); |
| 723 | } | 829 | } |
| 830 | + | ||
| 831 | + | ||
| 832 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Sqrt", count); | ||
| 724 | 833 | ||
| 725 | SqrtImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 834 | SqrtImpl<PrimType, config>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 726 | } | 835 | } |
| @@ -733,6 +842,9 @@ __aicore__ inline void Sqrt(const LocalTensor<T>& dst, const LocalTensor<T>& src | |||
| 733 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Sqrt")) { | 842 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Sqrt")) { |
| 734 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::CALCOUNT_MODE); | 843 | ASCENDC_REPORT_CHECK_ERROR("Sqrt", KernelFuncType::CALCOUNT_MODE); |
| 735 | } | 844 | } |
| 845 | + | ||
| 846 | + | ||
| 847 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Sqrt", count); | ||
| 736 | 848 | ||
| 737 | SqrtImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 849 | SqrtImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 738 | } | 850 | } |
| @@ -762,6 +874,9 @@ __aicore__ inline void Not(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 762 | "Not")) { | 874 | "Not")) { |
| 763 | ASCENDC_REPORT_CHECK_ERROR("Not", KernelFuncType::MASK_BIT_MODE); | 875 | ASCENDC_REPORT_CHECK_ERROR("Not", KernelFuncType::MASK_BIT_MODE); |
| 764 | } | 876 | } |
| 877 | + | ||
| 878 | + | ||
| 879 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Not"); | ||
| 765 | 880 | ||
| 766 | NotImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 881 | NotImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 767 | mask, repeatTime, repeatParams); | 882 | mask, repeatTime, repeatParams); |
| @@ -777,6 +892,9 @@ __aicore__ inline void Not(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 777 | "Not")) { | 892 | "Not")) { |
| 778 | ASCENDC_REPORT_CHECK_ERROR("Not", KernelFuncType::MASK_COUNT_MODE); | 893 | ASCENDC_REPORT_CHECK_ERROR("Not", KernelFuncType::MASK_COUNT_MODE); |
| 779 | } | 894 | } |
| 895 | + | ||
| 896 | + | ||
| 897 | + MstxTensor::GetMstxVecUnaryInfo<T, T, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Not"); | ||
| 780 | 898 | ||
| 781 | NotImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), | 899 | NotImpl<PrimType, isSetMask>((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), |
| 782 | mask, repeatTime, repeatParams); | 900 | mask, repeatTime, repeatParams); |
| @@ -797,6 +915,9 @@ __aicore__ inline void Not(const LocalTensor<T>& dst, const LocalTensor<T>& src, | |||
| 797 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Not")) { | 915 | if (!CheckFunVecBinaryScalar(dst, src, static_cast<PrimType>(0), count, "Not")) { |
| 798 | ASCENDC_REPORT_CHECK_ERROR("Not", KernelFuncType::CALCOUNT_MODE); | 916 | ASCENDC_REPORT_CHECK_ERROR("Not", KernelFuncType::CALCOUNT_MODE); |
| 799 | } | 917 | } |
| 918 | + | ||
| 919 | + | ||
| 920 | + MstxTensor::GetMstxVecUnaryInfo<T, T, true>(dst, src, "Not", count); | ||
| 800 | 921 | ||
| 801 | NotImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); | 922 | NotImpl((__ubuf__ PrimType*)dst.GetPhyAddr(), (__ubuf__ PrimType*)src.GetPhyAddr(), count); |
| 802 | } | 923 | } |
| @@ -19,6 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | + | ||
| 22 | 23 | ||
| 23 | 24 | ||
| 24 | 25 | ||
| @@ -64,6 +65,9 @@ __aicore__ inline void Cast(const LocalTensor<T>& dst, const LocalTensor<U>& src | |||
| 64 | const RoundMode& roundMode, const uint64_t mask[], const uint8_t repeatTime, | 65 | const RoundMode& roundMode, const uint64_t mask[], const uint8_t repeatTime, |
| 65 | const UnaryRepeatParams& repeatParams) | 66 | const UnaryRepeatParams& repeatParams) |
| 66 | { | 67 | { |
| 68 | + | ||
| 69 | + MstxTensor::GetMstxVecUnaryCastInfo<T, U, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "Cast"); | ||
| 70 | + | ||
| 67 | using DstPrimType = PrimT<T>; | 71 | using DstPrimType = PrimT<T>; |
| 68 | using SrcPrimType = PrimT<U>; | 72 | using SrcPrimType = PrimT<U>; |
| 69 | 73 | ||
| @@ -90,6 +94,9 @@ template <typename T, typename U, bool isSetMask> | |||
| 90 | __aicore__ inline void Cast(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 94 | __aicore__ inline void Cast(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 91 | const RoundMode& roundMode, const uint64_t mask, const uint8_t repeatTime, const UnaryRepeatParams& repeatParams) | 95 | const RoundMode& roundMode, const uint64_t mask, const uint8_t repeatTime, const UnaryRepeatParams& repeatParams) |
| 92 | { | 96 | { |
| 97 | + | ||
| 98 | + MstxTensor::GetMstxVecUnaryCastInfo<T, U, isSetMask>(dst, src, mask, repeatTime, repeatParams, "Cast"); | ||
| 99 | + | ||
| 93 | using DstPrimType = PrimT<T>; | 100 | using DstPrimType = PrimT<T>; |
| 94 | using SrcPrimType = PrimT<U>; | 101 | using SrcPrimType = PrimT<U>; |
| 95 | 102 | ||
| @@ -123,6 +130,9 @@ template <typename T, typename U> | |||
| 123 | __aicore__ inline void Cast(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 130 | __aicore__ inline void Cast(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 124 | const RoundMode& roundMode, const uint32_t count) | 131 | const RoundMode& roundMode, const uint32_t count) |
| 125 | { | 132 | { |
| 133 | + | ||
| 134 | + MstxTensor::GetMstxVecUnaryCastInfo<T, U, true>(dst, src, "Cast", count); | ||
| 135 | + | ||
| 126 | using DstPrimType = PrimT<T>; | 136 | using DstPrimType = PrimT<T>; |
| 127 | using SrcPrimType = PrimT<U>; | 137 | using SrcPrimType = PrimT<U>; |
| 128 | 138 | ||
| @@ -196,6 +206,9 @@ template <typename T, typename U, bool isSetMask, bool isVecDeq, bool halfBlock> | |||
| 196 | __aicore__ inline void CastDeq(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 206 | __aicore__ inline void CastDeq(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 197 | const uint64_t mask[], uint8_t repeatTime, const UnaryRepeatParams& repeatParams) | 207 | const uint64_t mask[], uint8_t repeatTime, const UnaryRepeatParams& repeatParams) |
| 198 | { | 208 | { |
| 209 | + | ||
| 210 | + MstxTensor::GetMstxVecUnaryCastDeqInfo<T, U, isSetMask>(dst, src, mask[0], mask[1], repeatTime, repeatParams, "CastDeq", halfBlock); | ||
| 211 | + | ||
| 199 | using DstPrimType = PrimT<T>; | 212 | using DstPrimType = PrimT<T>; |
| 200 | using SrcPrimType = PrimT<U>; | 213 | using SrcPrimType = PrimT<U>; |
| 201 | 214 | ||
| @@ -214,6 +227,9 @@ template <typename T, typename U, bool isSetMask, bool isVecDeq, bool halfBlock> | |||
| 214 | __aicore__ inline void CastDeq(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 227 | __aicore__ inline void CastDeq(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 215 | const int32_t mask, uint8_t repeatTime, const UnaryRepeatParams& repeatParams) | 228 | const int32_t mask, uint8_t repeatTime, const UnaryRepeatParams& repeatParams) |
| 216 | { | 229 | { |
| 230 | + | ||
| 231 | + MstxTensor::GetMstxVecUnaryCastDeqInfo<T, U, isSetMask>(dst, src, mask, repeatTime, repeatParams, "CastDeq", halfBlock); | ||
| 232 | + | ||
| 217 | using DstPrimType = PrimT<T>; | 233 | using DstPrimType = PrimT<T>; |
| 218 | using SrcPrimType = PrimT<U>; | 234 | using SrcPrimType = PrimT<U>; |
| 219 | 235 | ||
| @@ -259,6 +275,9 @@ template <typename T, typename U, bool isVecDeq, bool halfBlock> | |||
| 259 | __aicore__ inline void CastDeq(const LocalTensor<T>& dst, const LocalTensor<U>& src, | 275 | __aicore__ inline void CastDeq(const LocalTensor<T>& dst, const LocalTensor<U>& src, |
| 260 | const uint32_t count) | 276 | const uint32_t count) |
| 261 | { | 277 | { |
| 278 | + | ||
| 279 | + MstxTensor::GetMstxVecUnaryCastDeqInfo<T, U, true>(dst, src, "CastDeq", count, halfBlock); | ||
| 280 | + | ||
| 262 | using DstPrimType = PrimT<T>; | 281 | using DstPrimType = PrimT<T>; |
| 263 | using SrcPrimType = PrimT<U>; | 282 | using SrcPrimType = PrimT<U>; |
| 264 | 283 | ||
| @@ -304,6 +323,9 @@ __aicore__ inline void AddReluCast(const LocalTensor<T>& dst, const LocalTensor< | |||
| 304 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "AddReluCast")) { | 323 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "AddReluCast")) { |
| 305 | ASCENDC_REPORT_CHECK_ERROR("AddReluCast", KernelFuncType::MASK_COUNT_MODE); | 324 | ASCENDC_REPORT_CHECK_ERROR("AddReluCast", KernelFuncType::MASK_COUNT_MODE); |
| 306 | } | 325 | } |
| 326 | + | ||
| 327 | + | ||
| 328 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "AddReluCast"); | ||
| 307 | 329 | ||
| 308 | AddReluCastImpl<PrimT<T>, PrimT<U>, isSetMask>((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src0.GetPhyAddr(), | 330 | AddReluCastImpl<PrimT<T>, PrimT<U>, isSetMask>((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src0.GetPhyAddr(), |
| 309 | (__ubuf__ PrimT<U>*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 331 | (__ubuf__ PrimT<U>*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -325,6 +347,9 @@ __aicore__ inline void AddReluCast(const LocalTensor<T>& dst, const LocalTensor< | |||
| 325 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "AddReluCast")) { | 347 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "AddReluCast")) { |
| 326 | ASCENDC_REPORT_CHECK_ERROR("AddReluCast", KernelFuncType::MASK_BIT_MODE); | 348 | ASCENDC_REPORT_CHECK_ERROR("AddReluCast", KernelFuncType::MASK_BIT_MODE); |
| 327 | } | 349 | } |
| 350 | + | ||
| 351 | + | ||
| 352 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "AddReluCast"); | ||
| 328 | 353 | ||
| 329 | AddReluCastImpl<PrimT<T>, PrimT<U>, isSetMask>((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src0.GetPhyAddr(), | 354 | AddReluCastImpl<PrimT<T>, PrimT<U>, isSetMask>((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src0.GetPhyAddr(), |
| 330 | (__ubuf__ PrimT<U>*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 355 | (__ubuf__ PrimT<U>*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -351,6 +376,9 @@ __aicore__ inline void AddReluCast(const LocalTensor<T>& dst, const LocalTensor< | |||
| 351 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, count, "AddReluCast")) { | 376 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, count, "AddReluCast")) { |
| 352 | ASCENDC_REPORT_CHECK_ERROR("AddReluCast", KernelFuncType::CALCOUNT_MODE); | 377 | ASCENDC_REPORT_CHECK_ERROR("AddReluCast", KernelFuncType::CALCOUNT_MODE); |
| 353 | } | 378 | } |
| 379 | + | ||
| 380 | + | ||
| 381 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "AddReluCast", count); | ||
| 354 | 382 | ||
| 355 | AddReluCastImpl((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src0.GetPhyAddr(), | 383 | AddReluCastImpl((__ubuf__ PrimT<T>*)dst.GetPhyAddr(), (__ubuf__ PrimT<U>*)src0.GetPhyAddr(), |
| 356 | (__ubuf__ PrimT<U>*)src1.GetPhyAddr(), count); | 384 | (__ubuf__ PrimT<U>*)src1.GetPhyAddr(), count); |
| @@ -391,6 +419,9 @@ __aicore__ inline void SubReluCast(const LocalTensor<T>& dst, const LocalTensor< | |||
| 391 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "SubReluCast")) { | 419 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "SubReluCast")) { |
| 392 | ASCENDC_REPORT_CHECK_ERROR("SubReluCast", KernelFuncType::MASK_COUNT_MODE); | 420 | ASCENDC_REPORT_CHECK_ERROR("SubReluCast", KernelFuncType::MASK_COUNT_MODE); |
| 393 | } | 421 | } |
| 422 | + | ||
| 423 | + | ||
| 424 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask, repeatTime, repeatParams, isSetMask, "SubReluCast"); | ||
| 394 | 425 | ||
| 395 | SubReluCastImpl<DstPrimType, SrcPrimType, isSetMask>((__ubuf__ DstPrimType*)dst.GetPhyAddr(), (__ubuf__ SrcPrimType*)src0.GetPhyAddr(), | 426 | SubReluCastImpl<DstPrimType, SrcPrimType, isSetMask>((__ubuf__ DstPrimType*)dst.GetPhyAddr(), (__ubuf__ SrcPrimType*)src0.GetPhyAddr(), |
| 396 | (__ubuf__ SrcPrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 427 | (__ubuf__ SrcPrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -414,6 +445,9 @@ __aicore__ inline void SubReluCast(const LocalTensor<T>& dst, const LocalTensor< | |||
| 414 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "SubReluCast")) { | 445 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, mask, repeatTime, repeatParams, "SubReluCast")) { |
| 415 | ASCENDC_REPORT_CHECK_ERROR("SubReluCast", KernelFuncType::MASK_BIT_MODE); | 446 | ASCENDC_REPORT_CHECK_ERROR("SubReluCast", KernelFuncType::MASK_BIT_MODE); |
| 416 | } | 447 | } |
| 448 | + | ||
| 449 | + | ||
| 450 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, mask[0], mask[1], repeatTime, repeatParams, isSetMask, "SubReluCast"); | ||
| 417 | 451 | ||
| 418 | SubReluCastImpl<DstPrimType, SrcPrimType, isSetMask>((__ubuf__ DstPrimType*)dst.GetPhyAddr(), (__ubuf__ SrcPrimType*)src0.GetPhyAddr(), | 452 | SubReluCastImpl<DstPrimType, SrcPrimType, isSetMask>((__ubuf__ DstPrimType*)dst.GetPhyAddr(), (__ubuf__ SrcPrimType*)src0.GetPhyAddr(), |
| 419 | (__ubuf__ SrcPrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); | 453 | (__ubuf__ SrcPrimType*)src1.GetPhyAddr(), mask, repeatTime, repeatParams); |
| @@ -442,6 +476,9 @@ __aicore__ inline void SubReluCast(const LocalTensor<T>& dst, const LocalTensor< | |||
| 442 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, count, "SubReluCast")) { | 476 | if (!CheckFuncVecBinaryCmp(dst, src0, src1, count, "SubReluCast")) { |
| 443 | ASCENDC_REPORT_CHECK_ERROR("SubReluCast", KernelFuncType::CALCOUNT_MODE); | 477 | ASCENDC_REPORT_CHECK_ERROR("SubReluCast", KernelFuncType::CALCOUNT_MODE); |
| 444 | } | 478 | } |
| 479 | + | ||
| 480 | + | ||
| 481 | + MstxTensor::GetMstxVecBinaryInfo(dst, src0, src1, "SubReluCast", count); | ||
| 445 | 482 | ||
| 446 | SubReluCastImpl((__ubuf__ DstPrimType*)dst.GetPhyAddr(), (__ubuf__ SrcPrimType*)src0.GetPhyAddr(), | 483 | SubReluCastImpl((__ubuf__ DstPrimType*)dst.GetPhyAddr(), (__ubuf__ SrcPrimType*)src0.GetPhyAddr(), |
| 447 | (__ubuf__ SrcPrimType*)src1.GetPhyAddr(), count); | 484 | (__ubuf__ SrcPrimType*)src1.GetPhyAddr(), count); |
| @@ -0,0 +1,1825 @@ | |||
| 1 | +/** | ||
| 2 | +* Copyright (c) 2025 Huawei Technologies Co., Ltd. | ||
| 3 | +* This program is free software, you can redistribute it and/or modify it under the terms and conditions of | ||
| 4 | +* CANN Open Software License Agreement Version 2.0 (the "License"). | ||
| 5 | +* Please refer to the License for details. You may not use this file except in compliance with the License. | ||
| 6 | +* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
| 7 | +* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | ||
| 8 | +* See LICENSE in the root of the software repository for the full text of the License. | ||
| 9 | +*/ | ||
| 10 | + | ||
| 11 | +/*! | ||
| 12 | + * \file mstx_local_tensor_info.h | ||
| 13 | + * \brief | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + | ||
| 24 | +namespace AscendC { | ||
| 25 | +namespace MstxTensor { | ||
| 26 | + | ||
| 27 | +enum MstxTensorAddressSpace { | ||
| 28 | + MSTX_TENSOR_AT_PRIVATE = 0, | ||
| 29 | + MSTX_TENSOR_AT_GM, | ||
| 30 | + MSTX_TENSOR_AT_L1, | ||
| 31 | + MSTX_TENSOR_AT_L0A, | ||
| 32 | + MSTX_TENSOR_AT_L0B, | ||
| 33 | + MSTX_TENSOR_AT_L0C, | ||
| 34 | + MSTX_TENSOR_AT_UB, | ||
| 35 | +}; | ||
| 36 | + | ||
| 37 | +struct MstxTensorDesc { | ||
| 38 | + MstxTensorAddressSpace space; | ||
| 39 | + uint64_t addr; | ||
| 40 | + uint64_t size; | ||
| 41 | + uint8_t dataBits; | ||
| 42 | +}; | ||
| 43 | + | ||
| 44 | +template <typename T> | ||
| 45 | +__aicore__ inline MstxTensorDesc From(const LocalTensor<T>& dst) { | ||
| 46 | + MstxTensorAddressSpace space; | ||
| 47 | + Hardware dstHWPos = GetPhyType((TPosition)dst.GetPosition()); | ||
| 48 | + if (dstHWPos == Hardware::GM) { | ||
| 49 | + space = MSTX_TENSOR_AT_GM; | ||
| 50 | + } else if (dstHWPos == Hardware::UB) { | ||
| 51 | + space = MSTX_TENSOR_AT_UB; | ||
| 52 | + } else if (dstHWPos == Hardware::L1) { | ||
| 53 | + space = MSTX_TENSOR_AT_L1; | ||
| 54 | + } else if (dstHWPos == Hardware::L0A) { | ||
| 55 | + space = MSTX_TENSOR_AT_L0A; | ||
| 56 | + } else if (dstHWPos == Hardware::L0B) { | ||
| 57 | + space = MSTX_TENSOR_AT_L0B; | ||
| 58 | + } else if (dstHWPos == Hardware::L0C) { | ||
| 59 | + space = MSTX_TENSOR_AT_L0C; | ||
| 60 | + } else { | ||
| 61 | + space = MSTX_TENSOR_AT_PRIVATE; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + uint8_t sizebit; | ||
| 65 | + if constexpr (IsSameType<PrimT<T>, int4b_t>::value) { | ||
| 66 | + sizebit = static_cast<uint8_t>(4 * sizeof(PrimT<T>)); | ||
| 67 | + } else { | ||
| 68 | + sizebit = static_cast<uint8_t>(8 * sizeof(PrimT<T>)); | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + return MstxTensorDesc{ | ||
| 72 | + space, | ||
| 73 | + reinterpret_cast<uint64_t>(dst.GetPhyAddr()), | ||
| 74 | + dst.GetSize(), | ||
| 75 | + sizebit | ||
| 76 | + }; | ||
| 77 | +} | ||
| 78 | + | ||
| 79 | +template <typename T> | ||
| 80 | +__aicore__ inline MstxTensorDesc FromGm(const GlobalTensor<T>& dst) { | ||
| 81 | + uint8_t sizebit; | ||
| 82 | + if constexpr (IsSameType<PrimT<T>, int4b_t>::value) { | ||
| 83 | + sizebit = static_cast<uint8_t>(4 * sizeof(PrimT<T>)); | ||
| 84 | + } else { | ||
| 85 | + sizebit = static_cast<uint8_t>(8 * sizeof(PrimT<T>)); | ||
| 86 | + } | ||
| 87 | + return MstxTensorDesc{ | ||
| 88 | + MSTX_TENSOR_AT_GM, | ||
| 89 | + reinterpret_cast<uint64_t>(dst.GetPhyAddr()), | ||
| 90 | + dst.GetSize(), | ||
| 91 | + sizebit | ||
| 92 | + }; | ||
| 93 | +} | ||
| 94 | + | ||
| 95 | +enum class MstxReportType : uint32_t { | ||
| 96 | + MSTX_VEC_UNARY = 3000, | ||
| 97 | + MSTX_VEC_BINARY = 3001, | ||
| 98 | + MSTX_VEC_GATHER = 3002, | ||
| 99 | + MSTX_VEC_BINARY_SCALAR, | ||
| 100 | + MSTX_VEC_BILINEAR_INTERPOLATION, | ||
| 101 | + MSTX_VEC_TENARY, | ||
| 102 | + MSTX_VEC_CAST, | ||
| 103 | + MSTX_VEC_CASTDEQ, | ||
| 104 | + MSTX_VEC_SET_DEQ_SCALE, | ||
| 105 | + MSTX_VEC_CMP, | ||
| 106 | + MSTX_VEC_CMPS, | ||
| 107 | + MSTX_VEC_SEL, | ||
| 108 | + MSTX_VEC_GATHER_MASK, | ||
| 109 | + MSTX_VEC_TRANSDATA, | ||
| 110 | + MSTX_VEC_TRANSPOSE, | ||
| 111 | + MSTX_VEC_WHOLE_REDUCE, | ||
| 112 | + MSTX_VEC_BLK_REDUCE, | ||
| 113 | + MSTX_VEC_REDUCE, | ||
| 114 | + MSTX_VEC_PAIR_REDUCE, | ||
| 115 | + MSTX_VEC_REPEAT_REDUCE, | ||
| 116 | + MSTX_VEC_DUP, | ||
| 117 | + MSTX_VEC_BROADCAST, | ||
| 118 | + MSTX_VEC_VCI, | ||
| 119 | + MSTX_VEC_COPY, | ||
| 120 | + MSTX_DATA_COPY = 4001, | ||
| 121 | + MSTX_DATA_COPY_PAD = 4002, | ||
| 122 | +}; | ||
| 123 | + | ||
| 124 | +enum MstxMaskMode: uint32_t { | ||
| 125 | + MSTX_MASK_NORM = 0, | ||
| 126 | + MSTX_MASK_COUNT, | ||
| 127 | + MSTX_MASK_FROM_REG = 0xff, | ||
| 128 | +}; | ||
| 129 | + | ||
| 130 | +struct MstxVectorMask { | ||
| 131 | + uint64_t mask0; | ||
| 132 | + uint64_t mask1; | ||
| 133 | +}; | ||
| 134 | + | ||
| 135 | +struct MstxVecWrapper { | ||
| 136 | + MstxMaskMode maskMode; | ||
| 137 | + MstxVectorMask mask; | ||
| 138 | + uint32_t reserveBufSize; | ||
| 139 | + bool useMask; | ||
| 140 | +}; | ||
| 141 | + | ||
| 142 | +__aicore__ inline MstxVecWrapper WrapperFrom(MstxMaskMode maskMode, uint64_t mask0, uint64_t mask1, bool isSetMask, uint32_t reserveBufSize) { | ||
| 143 | + return MstxVecWrapper{ | ||
| 144 | + maskMode, | ||
| 145 | + {mask0, mask1}, | ||
| 146 | + reserveBufSize, | ||
| 147 | + isSetMask | ||
| 148 | + }; | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +template <typename T> | ||
| 152 | +__aicore__ inline MstxVecWrapper WrapperFrom(MstxMaskMode maskMode, uint64_t mask, bool isSetMask, uint32_t reserveBufSize) { | ||
| 153 | + int32_t typeLen = 0; | ||
| 154 | + constexpr int32_t halfTypeLen = 64; // 1 register -> 64 bits -> 64 elements | ||
| 155 | + constexpr int32_t lenCoeff = 2; | ||
| 156 | + uint64_t trueMask0, trueMask1; | ||
| 157 | + if constexpr (IsSameType<T, int4b_t>::value) { | ||
| 158 | + typeLen = DEFAULT_BLOCK_SIZE * INT4_TWO; | ||
| 159 | + } else { | ||
| 160 | + typeLen = DEFAULT_BLOCK_SIZE / sizeof(T); | ||
| 161 | + } | ||
| 162 | + if (mask == halfTypeLen) { | ||
| 163 | + trueMask0 = FULL_MASK; | ||
| 164 | + trueMask1 = 0; | ||
| 165 | + } else if (mask == typeLen || mask >= halfTypeLen * lenCoeff) { | ||
| 166 | + trueMask0 = FULL_MASK; | ||
| 167 | + trueMask1 = FULL_MASK; | ||
| 168 | + } else { | ||
| 169 | + trueMask0 = (mask > halfTypeLen) ? FULL_MASK : (((static_cast<uint64_t>(1)) << static_cast<uint32_t>(mask)) - 1); | ||
| 170 | + trueMask1 = (mask > halfTypeLen) ? (((static_cast<uint64_t>(1)) << static_cast<uint32_t>(mask - halfTypeLen)) - 1) : 0; | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + return MstxVecWrapper{ | ||
| 174 | + maskMode, | ||
| 175 | + {trueMask0, trueMask1}, | ||
| 176 | + reserveBufSize, | ||
| 177 | + isSetMask | ||
| 178 | + }; | ||
| 179 | +} | ||
| 180 | + | ||
| 181 | +struct MstxVecUnaryDesc { | ||
| 182 | + MstxTensorDesc dst; | ||
| 183 | + MstxTensorDesc src; | ||
| 184 | + MstxVecWrapper wrapper; | ||
| 185 | + uint32_t blockNum; | ||
| 186 | + uint32_t dstBlockStride; | ||
| 187 | + uint32_t srcBlockStride; | ||
| 188 | + uint32_t repeatTimes; | ||
| 189 | + uint32_t dstRepeatStride; | ||
| 190 | + uint32_t srcRepeatStride; | ||
| 191 | + char name[64]; | ||
| 192 | +}; | ||
| 193 | + | ||
| 194 | +struct MstxVecReduceDesc { | ||
| 195 | + MstxTensorDesc dst; | ||
| 196 | + MstxTensorDesc src; | ||
| 197 | + MstxVecWrapper wrapper; | ||
| 198 | + uint32_t srcBlockStride; | ||
| 199 | + uint32_t repeatTimes; | ||
| 200 | + uint32_t dstRepeatStride; | ||
| 201 | + uint32_t srcRepeatStride; | ||
| 202 | + char name[64]; | ||
| 203 | +}; | ||
| 204 | + | ||
| 205 | +struct MstxVecBrcbDesc { | ||
| 206 | + MstxTensorDesc dst; | ||
| 207 | + MstxTensorDesc src; | ||
| 208 | + MstxVecWrapper wrapper; | ||
| 209 | + uint32_t dstBlockStride; | ||
| 210 | + uint32_t repeatTimes; | ||
| 211 | + uint32_t dstRepeatStride; | ||
| 212 | + char name[64]; | ||
| 213 | +}; | ||
| 214 | + | ||
| 215 | +struct MstxVecComplexReduceDesc { | ||
| 216 | + MstxTensorDesc dst; | ||
| 217 | + MstxTensorDesc src; | ||
| 218 | + MstxTensorDesc tmp; | ||
| 219 | + MstxVecWrapper wrapper; | ||
| 220 | + uint32_t repeatTimes; | ||
| 221 | + uint32_t srcRepeatStride; | ||
| 222 | + char name[64]; | ||
| 223 | +}; | ||
| 224 | + | ||
| 225 | +struct MstxVecDupDesc { | ||
| 226 | + MstxTensorDesc dst; | ||
| 227 | + MstxVecWrapper wrapper; | ||
| 228 | + uint32_t dstBlockStride; | ||
| 229 | + uint32_t repeatTimes; | ||
| 230 | + uint32_t dstRepeatStride; | ||
| 231 | + char name[64]; | ||
| 232 | +}; | ||
| 233 | + | ||
| 234 | +struct MstxVecCopy { | ||
| 235 | + MstxTensorDesc dst; | ||
| 236 | + MstxTensorDesc src; | ||
| 237 | + MstxVecWrapper wrapper; | ||
| 238 | + uint32_t repeatTimes; | ||
| 239 | + uint32_t dstStride; | ||
| 240 | + uint32_t srcStride; | ||
| 241 | + uint32_t dstRepeatSize; | ||
| 242 | + uint32_t srcRepeatSize; | ||
| 243 | + char name[64]; | ||
| 244 | +}; | ||
| 245 | + | ||
| 246 | +struct MstxVecCastDeqDesc { | ||
| 247 | + MstxTensorDesc dst; | ||
| 248 | + MstxTensorDesc src; | ||
| 249 | + MstxVecWrapper wrapper; | ||
| 250 | + uint32_t blockNum; | ||
| 251 | + uint32_t dstBlockStride; | ||
| 252 | + uint32_t srcBlockStride; | ||
| 253 | + uint32_t repeatTimes; | ||
| 254 | + uint32_t dstRepeatStride; | ||
| 255 | + uint32_t srcRepeatStride; | ||
| 256 | + bool halfBlock; | ||
| 257 | + char name[64]; | ||
| 258 | +}; | ||
| 259 | + | ||
| 260 | +struct MstxDataCopyDesc { | ||
| 261 | + MstxTensorDesc dst; | ||
| 262 | + MstxTensorDesc src; | ||
| 263 | + uint32_t lenBurst; | ||
| 264 | + uint32_t nBurst; | ||
| 265 | + uint32_t srcGap; | ||
| 266 | + uint32_t dstGap; | ||
| 267 | + char name[64]; | ||
| 268 | +}; | ||
| 269 | + | ||
| 270 | +struct MstxDataCopyPadDesc { | ||
| 271 | + MstxTensorDesc dst; | ||
| 272 | + MstxTensorDesc src; | ||
| 273 | + uint32_t lenBurst; | ||
| 274 | + uint32_t nBurst; | ||
| 275 | + uint32_t srcGap; | ||
| 276 | + uint32_t dstGap; | ||
| 277 | + uint32_t leftPad; | ||
| 278 | + uint32_t rightPad; | ||
| 279 | + char name[64]; | ||
| 280 | +}; | ||
| 281 | + | ||
| 282 | +struct MstxVecBinaryDesc { | ||
| 283 | + MstxTensorDesc dst; | ||
| 284 | + MstxTensorDesc src0; | ||
| 285 | + MstxTensorDesc src1; | ||
| 286 | + MstxVecWrapper wrapper; | ||
| 287 | + uint32_t blockNum; | ||
| 288 | + uint32_t dstBlockStride; | ||
| 289 | + uint32_t src0BlockStride; | ||
| 290 | + uint32_t src1BlockStride; | ||
| 291 | + uint32_t repeatTimes; | ||
| 292 | + uint32_t dstRepeatStride; | ||
| 293 | + uint32_t src0RepeatStride; | ||
| 294 | + uint32_t src1RepeatStride; | ||
| 295 | + char name[64]; | ||
| 296 | +}; | ||
| 297 | + | ||
| 298 | +struct MstxVecBilinearInterpolation { | ||
| 299 | + MstxTensorDesc dst; | ||
| 300 | + MstxTensorDesc src0; | ||
| 301 | + MstxTensorDesc src1; | ||
| 302 | + MstxTensorDesc src0Offset; | ||
| 303 | + MstxTensorDesc shared; | ||
| 304 | + MstxVecWrapper wrapper; | ||
| 305 | + uint32_t hRepeat; | ||
| 306 | + bool repeatMode; | ||
| 307 | + uint32_t dstBlockStride; | ||
| 308 | + uint32_t vROffset; | ||
| 309 | + uint32_t vRepeat; | ||
| 310 | + char name[64]; | ||
| 311 | +}; | ||
| 312 | + | ||
| 313 | +struct MstxVecTranspose { | ||
| 314 | + MstxTensorDesc dst; | ||
| 315 | + MstxTensorDesc src; | ||
| 316 | + MstxTensorDesc shared; | ||
| 317 | + bool temp; | ||
| 318 | + char name[64]; | ||
| 319 | +}; | ||
| 320 | + | ||
| 321 | +struct MstxVecSelDesc { | ||
| 322 | + MstxTensorDesc dst; | ||
| 323 | + MstxTensorDesc src0; | ||
| 324 | + MstxTensorDesc src1; | ||
| 325 | + MstxTensorDesc mask; | ||
| 326 | + MstxVecWrapper wrapper; | ||
| 327 | + bool scalarMode; | ||
| 328 | + uint32_t blockNum; | ||
| 329 | + uint32_t dstBlockStride; | ||
| 330 | + uint32_t src0BlockStride; | ||
| 331 | + uint32_t src1BlockStride; | ||
| 332 | + uint32_t repeatTimes; | ||
| 333 | + uint32_t dstRepeatStride; | ||
| 334 | + uint32_t src0RepeatStride; | ||
| 335 | + uint32_t src1RepeatStride; | ||
| 336 | + char name[64]; | ||
| 337 | +}; | ||
| 338 | + | ||
| 339 | +enum class MstxGatherMaskMode { | ||
| 340 | + V1, | ||
| 341 | + V2 | ||
| 342 | +}; | ||
| 343 | + | ||
| 344 | +struct MstxVecGatherMaskDesc { | ||
| 345 | + MstxTensorDesc dst; | ||
| 346 | + MstxTensorDesc src; | ||
| 347 | + MstxVecWrapper wrapper; | ||
| 348 | + MstxGatherMaskMode mode; | ||
| 349 | + uint32_t repeatTimes; | ||
| 350 | + uint32_t src0BlockStride; | ||
| 351 | + uint32_t src0RepeatStride; | ||
| 352 | + uint32_t src1RepeatStride; | ||
| 353 | + char name[64]; | ||
| 354 | +}; | ||
| 355 | + | ||
| 356 | +__aicore__ inline void CopyName(char b[64], __gm__ const char* a) | ||
| 357 | +{ | ||
| 358 | + uint32_t i = 0; | ||
| 359 | + for (; i < 63; ++i){ | ||
| 360 | + b[i] = a[i]; | ||
| 361 | + if (a[i] == '\0') { | ||
| 362 | + break; | ||
| 363 | + } | ||
| 364 | + } | ||
| 365 | + b[i] = '\0'; | ||
| 366 | +} | ||
| 367 | + | ||
| 368 | + | ||
| 369 | +template <typename T, typename U, bool isSetMask> | ||
| 370 | +__aicore__ inline void GetMstxVecUnaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask0, uint64_t mask1, | ||
| 371 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 372 | +{ | ||
| 373 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 374 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 375 | + mstxVecUnaryDesc.src = From(src); | ||
| 376 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 377 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 378 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 379 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 380 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 381 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 382 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 383 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 384 | + | ||
| 385 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_UNARY), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 386 | +} | ||
| 387 | + | ||
| 388 | +template <typename T, typename U, bool isSetMask> | ||
| 389 | +__aicore__ inline void GetMstxVecUnaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask, | ||
| 390 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 391 | +{ | ||
| 392 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 393 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 394 | + mstxVecUnaryDesc.src = From(src); | ||
| 395 | + mstxVecUnaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 396 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 397 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 398 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 399 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 400 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 401 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 402 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 403 | + | ||
| 404 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_UNARY), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 405 | +} | ||
| 406 | + | ||
| 407 | +template <typename T, typename U, bool isSetMask> | ||
| 408 | +__aicore__ inline void GetMstxVecUnaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, __gm__ const char* name, | ||
| 409 | + const int32_t count) | ||
| 410 | +{ | ||
| 411 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 412 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 413 | + mstxVecUnaryDesc.src = From(src); | ||
| 414 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 415 | + mstxVecUnaryDesc.blockNum = 8; | ||
| 416 | + mstxVecUnaryDesc.repeatTimes = 1; | ||
| 417 | + mstxVecUnaryDesc.dstBlockStride = 1; | ||
| 418 | + mstxVecUnaryDesc.srcBlockStride = 1; | ||
| 419 | + mstxVecUnaryDesc.dstRepeatStride = 8; | ||
| 420 | + mstxVecUnaryDesc.srcRepeatStride = 8; | ||
| 421 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 422 | + | ||
| 423 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_UNARY), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 424 | +} | ||
| 425 | + | ||
| 426 | +template <typename T, typename U, bool isSetMask> | ||
| 427 | +__aicore__ inline void GetMstxVecUnaryTenaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask0, uint64_t mask1, | ||
| 428 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 429 | +{ | ||
| 430 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 431 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 432 | + mstxVecUnaryDesc.src = From(src); | ||
| 433 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 434 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 435 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 436 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 437 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 438 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 439 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 440 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 441 | + | ||
| 442 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_TENARY), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 443 | +} | ||
| 444 | + | ||
| 445 | +template <typename T, typename U, bool isSetMask> | ||
| 446 | +__aicore__ inline void GetMstxVecUnaryTenaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask, | ||
| 447 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 448 | +{ | ||
| 449 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 450 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 451 | + mstxVecUnaryDesc.src = From(src); | ||
| 452 | + mstxVecUnaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 453 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 454 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 455 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 456 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 457 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 458 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 459 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 460 | + | ||
| 461 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_TENARY), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 462 | +} | ||
| 463 | + | ||
| 464 | +template <typename T, typename U, bool isSetMask> | ||
| 465 | +__aicore__ inline void GetMstxVecUnaryTenaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, __gm__ const char* name, | ||
| 466 | + const int32_t count) | ||
| 467 | +{ | ||
| 468 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 469 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 470 | + mstxVecUnaryDesc.src = From(src); | ||
| 471 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 472 | + mstxVecUnaryDesc.blockNum = 8; | ||
| 473 | + mstxVecUnaryDesc.repeatTimes = 1; | ||
| 474 | + mstxVecUnaryDesc.dstBlockStride = 1; | ||
| 475 | + mstxVecUnaryDesc.srcBlockStride = 1; | ||
| 476 | + mstxVecUnaryDesc.dstRepeatStride = 8; | ||
| 477 | + if constexpr (sizeof(T) > sizeof(U)) { | ||
| 478 | + mstxVecUnaryDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE / 2 ; | ||
| 479 | + } else { | ||
| 480 | + mstxVecUnaryDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 481 | + } | ||
| 482 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 483 | + | ||
| 484 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_TENARY), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 485 | +} | ||
| 486 | + | ||
| 487 | +template <typename T, typename U, bool isSetMask> | ||
| 488 | +__aicore__ inline void GetMstxVecUnaryCastInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask0, uint64_t mask1, | ||
| 489 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 490 | +{ | ||
| 491 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
C 这个也不是默认的 ![]() ![]() | |||
| 492 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 493 | + mstxVecUnaryDesc.src = From(src); | ||
| 494 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 495 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 496 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 497 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 498 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 499 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 500 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 501 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 502 | + | ||
| 503 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CAST), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 504 | +} | ||
| 505 | + | ||
| 506 | +template <typename T, typename U, bool isSetMask> | ||
| 507 | +__aicore__ inline void GetMstxVecUnaryCastInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask, | ||
| 508 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 509 | +{ | ||
| 510 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 511 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 512 | + mstxVecUnaryDesc.src = From(src); | ||
| 513 | + mstxVecUnaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 514 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 515 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 516 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 517 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 518 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 519 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 520 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 521 | + | ||
| 522 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CAST), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 523 | +} | ||
| 524 | + | ||
| 525 | +template <typename T, typename U, bool isSetMask> | ||
| 526 | +__aicore__ inline void GetMstxVecUnaryCastInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, __gm__ const char* name, | ||
| 527 | + const int32_t count) | ||
| 528 | +{ | ||
| 529 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 530 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 531 | + mstxVecUnaryDesc.src = From(src); | ||
| 532 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 533 | + mstxVecUnaryDesc.blockNum = 8; | ||
| 534 | + mstxVecUnaryDesc.repeatTimes = 1; | ||
| 535 | + mstxVecUnaryDesc.dstBlockStride = 1; | ||
| 536 | + mstxVecUnaryDesc.srcBlockStride = 1; | ||
| 537 | + if constexpr (sizeof(T) > sizeof(U)) { | ||
| 538 | + if constexpr (IsSameType<U, int4b_t>::value) { | ||
| 539 | + mstxVecUnaryDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 540 | + mstxVecUnaryDesc.srcRepeatStride = ONE_FOURTH_DEFAULT_REPEAT_STRIDE; | ||
| 541 | + } else { | ||
| 542 | + mstxVecUnaryDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 543 | + mstxVecUnaryDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE / 2; | ||
| 544 | + } | ||
| 545 | + } else if constexpr (sizeof(T) < sizeof(U)) { | ||
| 546 | + if constexpr (IsSameType<T, int4b_t>::value) { | ||
| 547 | + mstxVecUnaryDesc.dstRepeatStride = ONE_FOURTH_DEFAULT_REPEAT_STRIDE; | ||
| 548 | + mstxVecUnaryDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 549 | + } else { | ||
| 550 | + mstxVecUnaryDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE / 2; | ||
| 551 | + mstxVecUnaryDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 552 | + } | ||
| 553 | + } else { | ||
| 554 | + mstxVecUnaryDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 555 | + mstxVecUnaryDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 556 | + } | ||
| 557 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 558 | + | ||
| 559 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CAST), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 560 | +} | ||
| 561 | + | ||
| 562 | +template <typename T, typename U, bool isSetMask> | ||
| 563 | +__aicore__ inline void GetMstxVecUnaryCastDeqInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask0, uint64_t mask1, | ||
| 564 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name, bool halfBlock) | ||
| 565 | +{ | ||
| 566 | + MstxVecCastDeqDesc mstxVecCastDeqDesc; | ||
| 567 | + mstxVecCastDeqDesc.dst = From(dst); | ||
| 568 | + mstxVecCastDeqDesc.src = From(src); | ||
| 569 | + mstxVecCastDeqDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 570 | + mstxVecCastDeqDesc.blockNum = repeatParams.blockNumber; | ||
| 571 | + mstxVecCastDeqDesc.repeatTimes = repeatTime; | ||
| 572 | + mstxVecCastDeqDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 573 | + mstxVecCastDeqDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 574 | + mstxVecCastDeqDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 575 | + mstxVecCastDeqDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 576 | + mstxVecCastDeqDesc.halfBlock = halfBlock; | ||
| 577 | + CopyName(mstxVecCastDeqDesc.name, name); | ||
| 578 | + | ||
| 579 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CASTDEQ), sizeof(mstxVecCastDeqDesc), &mstxVecCastDeqDesc); | ||
| 580 | +} | ||
| 581 | + | ||
| 582 | +template <typename T, typename U, bool isSetMask> | ||
| 583 | +__aicore__ inline void GetMstxVecUnaryCastDeqInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask, | ||
| 584 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name, bool halfBlock) | ||
| 585 | +{ | ||
| 586 | + MstxVecCastDeqDesc mstxVecCastDeqDesc; | ||
| 587 | + mstxVecCastDeqDesc.dst = From(dst); | ||
| 588 | + mstxVecCastDeqDesc.src = From(src); | ||
| 589 | + mstxVecCastDeqDesc.wrapper = WrapperFrom<U>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 590 | + mstxVecCastDeqDesc.blockNum = repeatParams.blockNumber; | ||
| 591 | + mstxVecCastDeqDesc.repeatTimes = repeatTime; | ||
| 592 | + mstxVecCastDeqDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 593 | + mstxVecCastDeqDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 594 | + mstxVecCastDeqDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 595 | + mstxVecCastDeqDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 596 | + mstxVecCastDeqDesc.halfBlock = halfBlock; | ||
| 597 | + CopyName(mstxVecCastDeqDesc.name, name); | ||
| 598 | + | ||
| 599 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CASTDEQ), sizeof(mstxVecCastDeqDesc), &mstxVecCastDeqDesc); | ||
| 600 | +} | ||
| 601 | + | ||
| 602 | +template <typename T, typename U, bool isSetMask> | ||
| 603 | +__aicore__ inline void GetMstxVecUnaryCastDeqInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, __gm__ const char* name, | ||
| 604 | + const int32_t count, bool halfBlock) | ||
| 605 | +{ | ||
| 606 | + MstxVecCastDeqDesc mstxVecCastDeqDesc; | ||
| 607 | + mstxVecCastDeqDesc.dst = From(dst); | ||
| 608 | + mstxVecCastDeqDesc.src = From(src); | ||
| 609 | + mstxVecCastDeqDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 610 | + mstxVecCastDeqDesc.blockNum = 8; | ||
| 611 | + mstxVecCastDeqDesc.repeatTimes = 1; | ||
| 612 | + mstxVecCastDeqDesc.dstBlockStride = 1; | ||
| 613 | + mstxVecCastDeqDesc.srcBlockStride = 1; | ||
| 614 | + mstxVecCastDeqDesc.dstRepeatStride = 8; | ||
| 615 | + mstxVecCastDeqDesc.srcRepeatStride = 8; | ||
| 616 | + if constexpr (sizeof(T) > sizeof(U)) { | ||
| 617 | + if constexpr (IsSameType<U, int4b_t>::value) { | ||
| 618 | + mstxVecCastDeqDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 619 | + mstxVecCastDeqDesc.srcRepeatStride = ONE_FOURTH_DEFAULT_REPEAT_STRIDE; | ||
| 620 | + } else { | ||
| 621 | + mstxVecCastDeqDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 622 | + mstxVecCastDeqDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE / 2; | ||
| 623 | + } | ||
| 624 | + } else if constexpr (sizeof(T) < sizeof(U)) { | ||
| 625 | + if constexpr (IsSameType<T, int4b_t>::value) { | ||
| 626 | + mstxVecCastDeqDesc.dstRepeatStride = ONE_FOURTH_DEFAULT_REPEAT_STRIDE; | ||
| 627 | + mstxVecCastDeqDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 628 | + } else { | ||
| 629 | + mstxVecCastDeqDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE / 2; | ||
| 630 | + mstxVecCastDeqDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 631 | + } | ||
| 632 | + } else { | ||
| 633 | + mstxVecCastDeqDesc.dstRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 634 | + mstxVecCastDeqDesc.srcRepeatStride = DEFAULT_REPEAT_STRIDE; | ||
| 635 | + } | ||
| 636 | + | ||
| 637 | + mstxVecCastDeqDesc.halfBlock = halfBlock; | ||
| 638 | + CopyName(mstxVecCastDeqDesc.name, name); | ||
| 639 | + | ||
| 640 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CASTDEQ), sizeof(mstxVecCastDeqDesc), &mstxVecCastDeqDesc); | ||
| 641 | +} | ||
| 642 | + | ||
C 涉及count的输入不一致的T, U要确认是否采用1,1,1,8,8,8模式 ![]() ![]() | |||
| 643 | +//comparescalar双目的 | ||
| 644 | +template <typename T, typename U, bool isSetMask> | ||
| 645 | +__aicore__ inline void GetMstxVecUnaryCmpsInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask0, uint64_t mask1, | ||
| 646 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 647 | +{ | ||
| 648 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 649 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 650 | + mstxVecUnaryDesc.src = From(src); | ||
| 651 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 652 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 653 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 654 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 655 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 656 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 657 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 658 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 659 | + | ||
| 660 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMPS), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 661 | +} | ||
| 662 | + | ||
| 663 | +template <typename T, typename U, bool isSetMask> | ||
| 664 | +__aicore__ inline void GetMstxVecUnaryCmpsInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, uint64_t mask, | ||
| 665 | + const uint8_t repeatTime, const UnaryRepeatParams& repeatParams, __gm__ const char* name) | ||
| 666 | +{ | ||
| 667 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 668 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 669 | + mstxVecUnaryDesc.src = From(src); | ||
| 670 | + mstxVecUnaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 671 | + mstxVecUnaryDesc.blockNum = repeatParams.blockNumber; | ||
| 672 | + mstxVecUnaryDesc.repeatTimes = repeatTime; | ||
| 673 | + mstxVecUnaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 674 | + mstxVecUnaryDesc.srcBlockStride = repeatParams.srcBlkStride; | ||
| 675 | + mstxVecUnaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 676 | + mstxVecUnaryDesc.srcRepeatStride = repeatParams.srcRepStride; | ||
| 677 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 678 | + | ||
| 679 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMPS), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 680 | +} | ||
| 681 | + | ||
| 682 | +template <typename T, typename U, bool isSetMask> | ||
| 683 | +__aicore__ inline void GetMstxVecUnaryCmpsInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, __gm__ const char* name, | ||
| 684 | + const int32_t count) | ||
| 685 | +{ | ||
| 686 | + MstxVecUnaryDesc mstxVecUnaryDesc; | ||
| 687 | + mstxVecUnaryDesc.dst = From(dst); | ||
| 688 | + mstxVecUnaryDesc.src = From(src); | ||
| 689 | + mstxVecUnaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 690 | + mstxVecUnaryDesc.blockNum = 8; | ||
| 691 | + mstxVecUnaryDesc.repeatTimes = 1; | ||
| 692 | + mstxVecUnaryDesc.dstBlockStride = 1; | ||
| 693 | + mstxVecUnaryDesc.srcBlockStride = 1; | ||
| 694 | + mstxVecUnaryDesc.dstRepeatStride = 8; | ||
| 695 | + mstxVecUnaryDesc.srcRepeatStride = 8; | ||
| 696 | + CopyName(mstxVecUnaryDesc.name, name); | ||
| 697 | + | ||
| 698 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMPS), sizeof(mstxVecUnaryDesc), &mstxVecUnaryDesc); | ||
| 699 | +} | ||
| 700 | + | ||
| 701 | +template <typename T, typename U> | ||
| 702 | +__aicore__ inline void GetMstxVecReduceInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask0, uint64_t mask1, | ||
| 703 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 704 | +{ | ||
| 705 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 706 | + mstxVecReduceDesc.dst = From(dst); | ||
| 707 | + mstxVecReduceDesc.src = From(src); | ||
| 708 | + mstxVecReduceDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 709 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 710 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 711 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 712 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 713 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 714 | + | ||
| 715 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_WHOLE_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 716 | +} | ||
| 717 | + | ||
| 718 | +template <typename T, typename U> | ||
| 719 | +__aicore__ inline void GetMstxVecReduceInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask, | ||
| 720 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 721 | +{ | ||
| 722 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 723 | + mstxVecReduceDesc.dst = From(dst); | ||
| 724 | + mstxVecReduceDesc.src = From(src); | ||
| 725 | + mstxVecReduceDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 726 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 727 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 728 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 729 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 730 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 731 | + | ||
| 732 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_WHOLE_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 733 | +} | ||
| 734 | + | ||
| 735 | +template <typename T> | ||
| 736 | +__aicore__ inline void GetMstxVecCopyInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, uint64_t mask0, uint64_t mask1, | ||
| 737 | + const int32_t repeatTime, const CopyRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 738 | +{ | ||
| 739 | + MstxVecCopy mstxVecCopy; | ||
| 740 | + mstxVecCopy.dst = From(dst); | ||
| 741 | + mstxVecCopy.src = From(src); | ||
| 742 | + mstxVecCopy.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 743 | + mstxVecCopy.repeatTimes = repeatTime; | ||
| 744 | + mstxVecCopy.dstStride = repeatParams.dstStride; | ||
| 745 | + mstxVecCopy.srcStride = repeatParams.srcStride; | ||
| 746 | + mstxVecCopy.dstRepeatSize = repeatParams.dstRepeatSize; | ||
| 747 | + mstxVecCopy.srcRepeatSize = repeatParams.srcRepeatSize; | ||
| 748 | + CopyName(mstxVecCopy.name, name); | ||
| 749 | + | ||
| 750 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_COPY), sizeof(mstxVecCopy), &mstxVecCopy); | ||
| 751 | +} | ||
| 752 | + | ||
| 753 | +template <typename T> | ||
| 754 | +__aicore__ inline void GetMstxVecCopyInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, uint64_t mask, | ||
| 755 | + const int32_t repeatTime, const CopyRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 756 | +{ | ||
| 757 | + MstxVecCopy mstxVecCopy; | ||
| 758 | + mstxVecCopy.dst = From(dst); | ||
| 759 | + mstxVecCopy.src = From(src); | ||
| 760 | + mstxVecCopy.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 761 | + mstxVecCopy.repeatTimes = repeatTime; | ||
| 762 | + mstxVecCopy.dstStride = repeatParams.dstStride; | ||
| 763 | + mstxVecCopy.srcStride = repeatParams.srcStride; | ||
| 764 | + mstxVecCopy.dstRepeatSize = repeatParams.dstRepeatSize; | ||
| 765 | + mstxVecCopy.srcRepeatSize = repeatParams.srcRepeatSize; | ||
| 766 | + CopyName(mstxVecCopy.name, name); | ||
| 767 | + | ||
| 768 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_COPY), sizeof(mstxVecCopy), &mstxVecCopy); | ||
| 769 | +} | ||
| 770 | + | ||
| 771 | +template <typename T, typename U> | ||
| 772 | +__aicore__ inline void GetMstxVecReduceBlkInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask0, uint64_t mask1, | ||
| 773 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 774 | +{ | ||
| 775 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 776 | + mstxVecReduceDesc.dst = From(dst); | ||
| 777 | + mstxVecReduceDesc.src = From(src); | ||
| 778 | + mstxVecReduceDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 779 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 780 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 781 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 782 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 783 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 784 | + | ||
| 785 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BLK_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 786 | +} | ||
| 787 | + | ||
| 788 | +template <typename T, typename U> | ||
| 789 | +__aicore__ inline void GetMstxVecReduceBlkInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask, | ||
| 790 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 791 | +{ | ||
| 792 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 793 | + mstxVecReduceDesc.dst = From(dst); | ||
| 794 | + mstxVecReduceDesc.src = From(src); | ||
| 795 | + mstxVecReduceDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 796 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 797 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 798 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 799 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 800 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 801 | + | ||
| 802 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BLK_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 803 | +} | ||
| 804 | + | ||
| 805 | +template <typename T, typename U> | ||
| 806 | +__aicore__ inline void GetMstxVecReducePairInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask0, uint64_t mask1, | ||
| 807 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 808 | +{ | ||
| 809 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 810 | + mstxVecReduceDesc.dst = From(dst); | ||
| 811 | + mstxVecReduceDesc.src = From(src); | ||
| 812 | + mstxVecReduceDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 813 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 814 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 815 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 816 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 817 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 818 | + | ||
| 819 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_PAIR_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 820 | +} | ||
| 821 | + | ||
| 822 | +template <typename T, typename U> | ||
| 823 | +__aicore__ inline void GetMstxVecReducePairInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask, | ||
| 824 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 825 | +{ | ||
| 826 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 827 | + mstxVecReduceDesc.dst = From(dst); | ||
| 828 | + mstxVecReduceDesc.src = From(src); | ||
| 829 | + mstxVecReduceDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 830 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 831 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 832 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 833 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 834 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 835 | + | ||
| 836 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_PAIR_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 837 | +} | ||
| 838 | + | ||
| 839 | +template <typename T, typename U> | ||
| 840 | +__aicore__ inline void GetMstxVecReduceRepeatInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask0, uint64_t mask1, | ||
| 841 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 842 | +{ | ||
| 843 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 844 | + mstxVecReduceDesc.dst = From(dst); | ||
| 845 | + mstxVecReduceDesc.src = From(src); | ||
| 846 | + mstxVecReduceDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 847 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 848 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 849 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 850 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 851 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 852 | + | ||
| 853 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_REPEAT_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 854 | +} | ||
| 855 | + | ||
| 856 | +template <typename T, typename U> | ||
| 857 | +__aicore__ inline void GetMstxVecReduceRepeatInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, uint64_t mask, | ||
| 858 | + const int32_t repeatTime, const int32_t dstRepStride, const int32_t srcBlkStride, const int32_t srcRepStride, bool isSetMask, __gm__ const char* name) | ||
| 859 | +{ | ||
| 860 | + MstxVecReduceDesc mstxVecReduceDesc; | ||
| 861 | + mstxVecReduceDesc.dst = From(dst); | ||
| 862 | + mstxVecReduceDesc.src = From(src); | ||
| 863 | + mstxVecReduceDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 864 | + mstxVecReduceDesc.repeatTimes = repeatTime; | ||
| 865 | + mstxVecReduceDesc.srcBlockStride = srcBlkStride; | ||
| 866 | + mstxVecReduceDesc.dstRepeatStride = dstRepStride; | ||
| 867 | + mstxVecReduceDesc.srcRepeatStride = srcRepStride; | ||
| 868 | + CopyName(mstxVecReduceDesc.name, name); | ||
| 869 | + | ||
| 870 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_REPEAT_REDUCE), sizeof(mstxVecReduceDesc), &mstxVecReduceDesc); | ||
| 871 | +} | ||
| 872 | + | ||
| 873 | +template <typename T> | ||
| 874 | +__aicore__ inline void GetMstxVecBrcbInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, const uint8_t repeatTime, | ||
| 875 | + const BrcbRepeatParams& repeatParams, __gm__ const char* name) | ||
| 876 | +{ | ||
| 877 | + MstxVecBrcbDesc mstxVecBrcbDesc; | ||
| 878 | + mstxVecBrcbDesc.dst = From(dst); | ||
| 879 | + mstxVecBrcbDesc.src = From(src); | ||
| 880 | + mstxVecBrcbDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, 0, 0, false, static_cast<uint32_t>(0)); | ||
| 881 | + mstxVecBrcbDesc.repeatTimes = repeatTime; | ||
| 882 | + mstxVecBrcbDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 883 | + mstxVecBrcbDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 884 | + CopyName(mstxVecBrcbDesc.name, name); | ||
| 885 | + | ||
| 886 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BROADCAST), sizeof(mstxVecBrcbDesc), &mstxVecBrcbDesc); | ||
| 887 | +} | ||
| 888 | + | ||
| 889 | +template <typename T> | ||
| 890 | +__aicore__ inline void GetMstxVecTransposeInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, __gm__ const char* name) | ||
| 891 | +{ | ||
| 892 | + MstxVecTranspose mstxVecTranspose; | ||
| 893 | + mstxVecTranspose.dst = From(dst); | ||
| 894 | + mstxVecTranspose.src = From(src); | ||
| 895 | + mstxVecTranspose.temp = false; | ||
| 896 | + CopyName(mstxVecTranspose.name, name); | ||
| 897 | + | ||
| 898 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_TRANSPOSE), sizeof(mstxVecTranspose), &mstxVecTranspose); | ||
| 899 | +} | ||
| 900 | + | ||
| 901 | +template <typename T, typename U> | ||
| 902 | +__aicore__ inline void GetMstxVecTransposeTempInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, | ||
| 903 | + const LocalTensor<U> &sharedTmpBuffer, __gm__ const char* name) | ||
| 904 | +{ | ||
| 905 | + MstxVecTranspose mstxVecTranspose; | ||
| 906 | + mstxVecTranspose.dst = From(dst); | ||
| 907 | + mstxVecTranspose.src = From(src); | ||
| 908 | + mstxVecTranspose.shared = From(sharedTmpBuffer); | ||
| 909 | + mstxVecTranspose.temp = true; | ||
| 910 | + CopyName(mstxVecTranspose.name, name); | ||
| 911 | + | ||
| 912 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_TRANSPOSE), sizeof(mstxVecTranspose), &mstxVecTranspose); | ||
| 913 | +} | ||
| 914 | + | ||
| 915 | +template <typename T> | ||
| 916 | +__aicore__ inline void GetMstxVecDupInfo(const LocalTensor<T>& dst, uint64_t mask0, uint64_t mask1, | ||
| 917 | + const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride, bool isSetMask, __gm__ const char* name) | ||
| 918 | +{ | ||
| 919 | + MstxVecDupDesc mstxVecDupDesc; | ||
| 920 | + mstxVecDupDesc.dst = From(dst); | ||
| 921 | + mstxVecDupDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 922 | + mstxVecDupDesc.repeatTimes = repeatTime; | ||
| 923 | + mstxVecDupDesc.dstBlockStride = dstBlockStride; | ||
| 924 | + mstxVecDupDesc.dstRepeatStride = dstRepeatStride; | ||
| 925 | + CopyName(mstxVecDupDesc.name, name); | ||
| 926 | + | ||
| 927 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_DUP), sizeof(mstxVecDupDesc), &mstxVecDupDesc); | ||
| 928 | +} | ||
| 929 | + | ||
| 930 | +template <typename T> | ||
| 931 | +__aicore__ inline void GetMstxVecDupInfo(const LocalTensor<T>& dst, uint64_t mask, | ||
| 932 | + const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride, bool isSetMask, __gm__ const char* name) | ||
| 933 | +{ | ||
| 934 | + MstxVecDupDesc mstxVecDupDesc; | ||
| 935 | + mstxVecDupDesc.dst = From(dst); | ||
| 936 | + mstxVecDupDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 937 | + mstxVecDupDesc.repeatTimes = repeatTime; | ||
| 938 | + mstxVecDupDesc.dstBlockStride = dstBlockStride; | ||
| 939 | + mstxVecDupDesc.dstRepeatStride = dstRepeatStride; | ||
| 940 | + CopyName(mstxVecDupDesc.name, name); | ||
| 941 | + | ||
| 942 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_DUP), sizeof(mstxVecDupDesc), &mstxVecDupDesc); | ||
| 943 | +} | ||
| 944 | + | ||
| 945 | +template <typename T> | ||
| 946 | +__aicore__ inline void GetMstxVecDupInfo(const LocalTensor<T>& dst, const int32_t& count, __gm__ const char* name) | ||
| 947 | +{ | ||
| 948 | + MstxVecDupDesc mstxVecDupDesc; | ||
| 949 | + mstxVecDupDesc.dst = From(dst); | ||
| 950 | + mstxVecDupDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), true, static_cast<uint32_t>(0)); | ||
| 951 | + mstxVecDupDesc.repeatTimes = 1; | ||
| 952 | + mstxVecDupDesc.dstBlockStride = 1; | ||
| 953 | + mstxVecDupDesc.dstRepeatStride = 8; | ||
| 954 | + CopyName(mstxVecDupDesc.name, name); | ||
| 955 | + | ||
| 956 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_DUP), sizeof(mstxVecDupDesc), &mstxVecDupDesc); | ||
| 957 | +} | ||
| 958 | + | ||
| 959 | +template <typename T> | ||
| 960 | +__aicore__ inline void GetMstxVecIndexInfo(const LocalTensor<T>& dst, uint64_t mask0, uint64_t mask1, | ||
| 961 | + const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride, __gm__ const char* name) | ||
| 962 | +{ | ||
| 963 | + MstxVecDupDesc mstxVecDupDesc; | ||
| 964 | + mstxVecDupDesc.dst = From(dst); | ||
| 965 | + mstxVecDupDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, true, static_cast<uint32_t>(8192)); | ||
| 966 | + mstxVecDupDesc.repeatTimes = repeatTime; | ||
| 967 | + mstxVecDupDesc.dstBlockStride = dstBlockStride; | ||
| 968 | + mstxVecDupDesc.dstRepeatStride = dstRepeatStride; | ||
| 969 | + CopyName(mstxVecDupDesc.name, name); | ||
| 970 | + | ||
| 971 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_VCI), sizeof(mstxVecDupDesc), &mstxVecDupDesc); | ||
| 972 | +} | ||
| 973 | + | ||
| 974 | +template <typename T> | ||
| 975 | +__aicore__ inline void GetMstxVecIndexInfo(const LocalTensor<T>& dst, uint64_t mask, | ||
| 976 | + const uint8_t repeatTime, const uint16_t dstBlockStride, const uint8_t dstRepeatStride, __gm__ const char* name) | ||
| 977 | +{ | ||
| 978 | + MstxVecDupDesc mstxVecDupDesc; | ||
| 979 | + mstxVecDupDesc.dst = From(dst); | ||
| 980 | + mstxVecDupDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, true, static_cast<uint32_t>(8192)); | ||
| 981 | + mstxVecDupDesc.repeatTimes = repeatTime; | ||
| 982 | + mstxVecDupDesc.dstBlockStride = dstBlockStride; | ||
| 983 | + mstxVecDupDesc.dstRepeatStride = dstRepeatStride; | ||
| 984 | + CopyName(mstxVecDupDesc.name, name); | ||
| 985 | + | ||
| 986 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_VCI), sizeof(mstxVecDupDesc), &mstxVecDupDesc); | ||
| 987 | +} | ||
| 988 | + | ||
| 989 | +template <typename T> | ||
| 990 | +__aicore__ inline void GetMstxVecIndexInfo(const LocalTensor<T>& dst, uint32_t count, __gm__ const char* name) | ||
| 991 | +{ | ||
| 992 | + MstxVecDupDesc mstxVecDupDesc; | ||
| 993 | + mstxVecDupDesc.dst = From(dst); | ||
| 994 | + mstxVecDupDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), true, static_cast<uint32_t>(8192)); | ||
| 995 | + mstxVecDupDesc.repeatTimes = 1; | ||
| 996 | + mstxVecDupDesc.dstBlockStride = 1; | ||
| 997 | + mstxVecDupDesc.dstRepeatStride = 8; | ||
| 998 | + CopyName(mstxVecDupDesc.name, name); | ||
| 999 | + | ||
| 1000 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_VCI), sizeof(mstxVecDupDesc), &mstxVecDupDesc); | ||
| 1001 | +} | ||
| 1002 | + | ||
| 1003 | +//软仿 | ||
| 1004 | +template <typename T, typename U> | ||
| 1005 | +__aicore__ inline void GetMstxVecReduceComplexInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, | ||
| 1006 | + const LocalTensor<T>& sharedTmpBuffer, const int32_t mask0, const int32_t mask1, | ||
| 1007 | + const int32_t repeatTime, const int32_t srcRepStride, __gm__ const char* name) | ||
| 1008 | +{ | ||
| 1009 | + MstxVecComplexReduceDesc mstxVecComplexReduceDesc; | ||
| 1010 | + mstxVecComplexReduceDesc.dst = From(dst); | ||
| 1011 | + mstxVecComplexReduceDesc.src = From(src); | ||
| 1012 | + mstxVecComplexReduceDesc.tmp = From(sharedTmpBuffer); | ||
| 1013 | + mstxVecComplexReduceDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, true, static_cast<uint32_t>(8192)); | ||
| 1014 | + mstxVecComplexReduceDesc.repeatTimes = repeatTime; | ||
| 1015 | + mstxVecComplexReduceDesc.srcRepeatStride = srcRepStride; | ||
| 1016 | + CopyName(mstxVecComplexReduceDesc.name, name); | ||
| 1017 | + | ||
| 1018 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_REDUCE), sizeof(mstxVecComplexReduceDesc), &mstxVecComplexReduceDesc); | ||
| 1019 | +} | ||
| 1020 | + | ||
| 1021 | +template <typename T, typename U> | ||
| 1022 | +__aicore__ inline void GetMstxVecReduceComplexInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, | ||
| 1023 | + const LocalTensor<T>& sharedTmpBuffer, const int32_t mask, | ||
| 1024 | + const int32_t repeatTime, const int32_t srcRepStride, __gm__ const char* name) | ||
| 1025 | +{ | ||
| 1026 | + MstxVecComplexReduceDesc mstxVecComplexReduceDesc; | ||
| 1027 | + mstxVecComplexReduceDesc.dst = From(dst); | ||
| 1028 | + mstxVecComplexReduceDesc.src = From(src); | ||
| 1029 | + mstxVecComplexReduceDesc.tmp = From(sharedTmpBuffer); | ||
| 1030 | + mstxVecComplexReduceDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, true, static_cast<uint32_t>(8192)); | ||
| 1031 | + mstxVecComplexReduceDesc.repeatTimes = repeatTime; | ||
| 1032 | + mstxVecComplexReduceDesc.srcRepeatStride = srcRepStride; | ||
| 1033 | + CopyName(mstxVecComplexReduceDesc.name, name); | ||
| 1034 | + | ||
| 1035 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_REDUCE), sizeof(mstxVecComplexReduceDesc), &mstxVecComplexReduceDesc); | ||
| 1036 | +} | ||
| 1037 | + | ||
| 1038 | +template <typename T, typename U> | ||
| 1039 | +__aicore__ inline void GetMstxVecReduceComplexInfo(const LocalTensor<U>& dst, const LocalTensor<T>& src, | ||
| 1040 | + const LocalTensor<T>& sharedTmpBuffer, const int32_t count, __gm__ const char* name) | ||
| 1041 | +{ | ||
| 1042 | + MstxVecComplexReduceDesc mstxVecComplexReduceDesc; | ||
| 1043 | + mstxVecComplexReduceDesc.dst = From(dst); | ||
| 1044 | + mstxVecComplexReduceDesc.src = From(src); | ||
| 1045 | + mstxVecComplexReduceDesc.tmp = From(sharedTmpBuffer); | ||
| 1046 | + mstxVecComplexReduceDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), true, static_cast<uint32_t>(8192)); | ||
| 1047 | + mstxVecComplexReduceDesc.repeatTimes = 1; | ||
| 1048 | + mstxVecComplexReduceDesc.srcRepeatStride = 8; | ||
| 1049 | + CopyName(mstxVecComplexReduceDesc.name, name); | ||
| 1050 | + | ||
| 1051 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_REDUCE), sizeof(mstxVecComplexReduceDesc), &mstxVecComplexReduceDesc); | ||
| 1052 | +} | ||
| 1053 | + | ||
| 1054 | +template <typename T, typename U, typename V> | ||
| 1055 | +__aicore__ inline void GetMstxVecBinaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1056 | + const LocalTensor<V>& src1, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1057 | + const BinaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1058 | +{ | ||
| 1059 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1060 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1061 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1062 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1063 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 1064 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1065 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1066 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1067 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1068 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1069 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1070 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1071 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1072 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1073 | + | ||
| 1074 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1075 | +} | ||
| 1076 | + | ||
| 1077 | +template <typename T, typename U, typename V> | ||
| 1078 | +__aicore__ inline void GetMstxVecBinaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1079 | + const LocalTensor<V>& src1, uint64_t mask, const uint8_t repeatTime, | ||
| 1080 | + const BinaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1081 | +{ | ||
| 1082 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1083 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1084 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1085 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1086 | + mstxVecBinaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 1087 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1088 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1089 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1090 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1091 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1092 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1093 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1094 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1095 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1096 | + | ||
| 1097 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1098 | +} | ||
| 1099 | + | ||
| 1100 | +template <typename T, typename U, typename V> | ||
| 1101 | +__aicore__ inline void GetMstxVecBinaryInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1102 | + const LocalTensor<V>& src1, __gm__ const char* name, const int32_t count) | ||
| 1103 | +{ | ||
| 1104 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1105 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1106 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1107 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1108 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), true, static_cast<uint32_t>(0)); | ||
| 1109 | + mstxVecBinaryDesc.blockNum = 8; | ||
| 1110 | + mstxVecBinaryDesc.repeatTimes = 1; | ||
| 1111 | + mstxVecBinaryDesc.dstBlockStride = 1; | ||
| 1112 | + mstxVecBinaryDesc.src0BlockStride = 1; | ||
| 1113 | + mstxVecBinaryDesc.src1BlockStride = 1; | ||
| 1114 | + mstxVecBinaryDesc.dstRepeatStride = 8; | ||
| 1115 | + mstxVecBinaryDesc.src0RepeatStride = 8; | ||
| 1116 | + mstxVecBinaryDesc.src1RepeatStride = 8; | ||
| 1117 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1118 | + | ||
| 1119 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1120 | +} | ||
| 1121 | + | ||
| 1122 | +template <typename T, typename U, typename V> | ||
| 1123 | +__aicore__ inline void GetMstxVecBilinearInterpolationInfo(const LocalTensor<T> &dst, const LocalTensor<T> &src0, | ||
| 1124 | + const LocalTensor<U> &src0Offset, const LocalTensor<T> &src1, uint64_t mask0, uint64_t mask1, uint8_t hRepeat, | ||
| 1125 | + bool repeatMode, uint16_t dstBlkStride, uint16_t vROffset, uint8_t vRepeat, const LocalTensor<V> &sharedTmpBuffer, __gm__ const char* name) | ||
| 1126 | +{ | ||
| 1127 | + MstxVecBilinearInterpolation mstxVecBilinearInterpolation; | ||
| 1128 | + mstxVecBilinearInterpolation.dst = From(dst); | ||
| 1129 | + mstxVecBilinearInterpolation.src0 = From(src0); | ||
| 1130 | + mstxVecBilinearInterpolation.src1 = From(src1); | ||
| 1131 | + mstxVecBilinearInterpolation.src0Offset = From(src0Offset); | ||
| 1132 | + mstxVecBilinearInterpolation.shared = From(sharedTmpBuffer); | ||
| 1133 | + mstxVecBilinearInterpolation.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, true, static_cast<uint32_t>(8192)); | ||
| 1134 | + mstxVecBilinearInterpolation.hRepeat = hRepeat; | ||
| 1135 | + mstxVecBilinearInterpolation.repeatMode = repeatMode; | ||
| 1136 | + mstxVecBilinearInterpolation.dstBlockStride = dstBlkStride; | ||
| 1137 | + mstxVecBilinearInterpolation.vROffset = vROffset; | ||
| 1138 | + mstxVecBilinearInterpolation.vRepeat = vRepeat; | ||
| 1139 | + CopyName(mstxVecBilinearInterpolation.name, name); | ||
| 1140 | + | ||
| 1141 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BILINEAR_INTERPOLATION), sizeof(mstxVecBilinearInterpolation), &mstxVecBilinearInterpolation); | ||
| 1142 | +} | ||
| 1143 | + | ||
| 1144 | +template <typename T, typename U, typename V> | ||
| 1145 | +__aicore__ inline void GetMstxVecBilinearInterpolationInfo(const LocalTensor<T> &dst, const LocalTensor<T> &src0, | ||
| 1146 | + const LocalTensor<U> &src0Offset, const LocalTensor<T> &src1, uint64_t mask, uint8_t hRepeat, | ||
| 1147 | + bool repeatMode, uint16_t dstBlkStride, uint16_t vROffset, uint8_t vRepeat, const LocalTensor<V> &sharedTmpBuffer, __gm__ const char* name) | ||
| 1148 | +{ | ||
| 1149 | + MstxVecBilinearInterpolation mstxVecBilinearInterpolation; | ||
| 1150 | + mstxVecBilinearInterpolation.dst = From(dst); | ||
| 1151 | + mstxVecBilinearInterpolation.src0 = From(src0); | ||
| 1152 | + mstxVecBilinearInterpolation.src1 = From(src1); | ||
| 1153 | + mstxVecBilinearInterpolation.src0Offset = From(src0Offset); | ||
| 1154 | + mstxVecBilinearInterpolation.shared = From(sharedTmpBuffer); | ||
| 1155 | + mstxVecBilinearInterpolation.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, true, static_cast<uint32_t>(8192)); | ||
| 1156 | + mstxVecBilinearInterpolation.hRepeat = hRepeat; | ||
| 1157 | + mstxVecBilinearInterpolation.repeatMode = repeatMode; | ||
| 1158 | + mstxVecBilinearInterpolation.dstBlockStride = dstBlkStride; | ||
| 1159 | + mstxVecBilinearInterpolation.vROffset = vROffset; | ||
| 1160 | + mstxVecBilinearInterpolation.vRepeat = vRepeat; | ||
| 1161 | + CopyName(mstxVecBilinearInterpolation.name, name); | ||
| 1162 | + | ||
| 1163 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BILINEAR_INTERPOLATION), sizeof(mstxVecBilinearInterpolation), &mstxVecBilinearInterpolation); | ||
| 1164 | +} | ||
| 1165 | + | ||
| 1166 | +//select | ||
| 1167 | +//无软仿 | ||
| 1168 | +template <typename T, typename U> | ||
| 1169 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1170 | + const LocalTensor<T>& src0, const LocalTensor<T>& src1, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1171 | + const BinaryRepeatParams& repeatParams, bool isSetMask, SELMODE selMode, __gm__ const char* name) | ||
| 1172 | +{ | ||
| 1173 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1174 | + mstxVecSelDesc.dst = From(dst); | ||
| 1175 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1176 | + mstxVecSelDesc.src1 = From(src1); | ||
| 1177 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1178 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1179 | + if (mstxVecSelDesc.scalarMode) { | ||
| 1180 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(8192)); | ||
| 1181 | + } else { | ||
| 1182 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 1183 | + } | ||
| 1184 | + mstxVecSelDesc.blockNum = repeatParams.blockNumber; | ||
| 1185 | + mstxVecSelDesc.repeatTimes = repeatTime; | ||
| 1186 | + mstxVecSelDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1187 | + mstxVecSelDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1188 | + mstxVecSelDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1189 | + mstxVecSelDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1190 | + mstxVecSelDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1191 | + mstxVecSelDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1192 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1193 | + | ||
| 1194 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1195 | +} | ||
| 1196 | + | ||
| 1197 | +template <typename T, typename U> | ||
| 1198 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1199 | + const LocalTensor<T>& src0, const LocalTensor<T>& src1, uint64_t mask, const uint8_t repeatTime, | ||
| 1200 | + const BinaryRepeatParams& repeatParams, bool isSetMask, SELMODE selMode, __gm__ const char* name) | ||
| 1201 | +{ | ||
| 1202 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1203 | + mstxVecSelDesc.dst = From(dst); | ||
| 1204 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1205 | + mstxVecSelDesc.src1 = From(src1); | ||
| 1206 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1207 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1208 | + if (mstxVecSelDesc.scalarMode) { | ||
| 1209 | + mstxVecSelDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(8192)); | ||
| 1210 | + } else { | ||
| 1211 | + mstxVecSelDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 1212 | + } | ||
| 1213 | + mstxVecSelDesc.blockNum = repeatParams.blockNumber; | ||
| 1214 | + mstxVecSelDesc.repeatTimes = repeatTime; | ||
| 1215 | + mstxVecSelDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1216 | + mstxVecSelDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1217 | + mstxVecSelDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1218 | + mstxVecSelDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1219 | + mstxVecSelDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1220 | + mstxVecSelDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1221 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1222 | + | ||
| 1223 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1224 | +} | ||
| 1225 | + | ||
| 1226 | +template <typename T> | ||
| 1227 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1228 | + const LocalTensor<T>& src1, const uint8_t repeatTime, | ||
| 1229 | + const BinaryRepeatParams& repeatParams, SELMODE selMode, __gm__ const char* name) | ||
| 1230 | +{ | ||
| 1231 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1232 | + mstxVecSelDesc.dst = From(dst); | ||
| 1233 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1234 | + mstxVecSelDesc.src1 = From(src1); | ||
| 1235 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1236 | + if (mstxVecSelDesc.scalarMode) { | ||
| 1237 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, 0, 0, false, static_cast<uint32_t>(8192)); | ||
| 1238 | + } else { | ||
| 1239 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, 0, 0, false, static_cast<uint32_t>(0)); | ||
| 1240 | + } | ||
| 1241 | + mstxVecSelDesc.blockNum = repeatParams.blockNumber; | ||
| 1242 | + mstxVecSelDesc.repeatTimes = repeatTime; | ||
| 1243 | + mstxVecSelDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1244 | + mstxVecSelDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1245 | + mstxVecSelDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1246 | + mstxVecSelDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1247 | + mstxVecSelDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1248 | + mstxVecSelDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1249 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1250 | + | ||
| 1251 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1252 | +} | ||
| 1253 | + | ||
| 1254 | +template <typename T, typename U> | ||
| 1255 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1256 | + const LocalTensor<T>& src0, const uint8_t repeatTime, | ||
| 1257 | + const BinaryRepeatParams& repeatParams, SELMODE selMode, __gm__ const char* name) | ||
| 1258 | +{ | ||
| 1259 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1260 | + mstxVecSelDesc.dst = From(dst); | ||
| 1261 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1262 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1263 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1264 | + if (mstxVecSelDesc.scalarMode) { | ||
| 1265 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, 0, 0, false, static_cast<uint32_t>(8192)); | ||
| 1266 | + } else { | ||
| 1267 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, 0, 0, false, static_cast<uint32_t>(0)); | ||
| 1268 | + } | ||
| 1269 | + mstxVecSelDesc.blockNum = repeatParams.blockNumber; | ||
| 1270 | + mstxVecSelDesc.repeatTimes = repeatTime; | ||
| 1271 | + mstxVecSelDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1272 | + mstxVecSelDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1273 | + mstxVecSelDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1274 | + mstxVecSelDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1275 | + mstxVecSelDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1276 | + mstxVecSelDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1277 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1278 | + | ||
| 1279 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1280 | +} | ||
| 1281 | + | ||
| 1282 | +template <typename T, typename U> | ||
| 1283 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1284 | + const LocalTensor<T>& src0, const LocalTensor<T>& src1, uint32_t count, bool isSetMask, SELMODE selMode, __gm__ const char* name) | ||
| 1285 | +{ | ||
| 1286 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1287 | + mstxVecSelDesc.dst = From(dst); | ||
| 1288 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1289 | + mstxVecSelDesc.src1 = From(src1); | ||
| 1290 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1291 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1292 | + if (mstxVecSelDesc.scalarMode) { | ||
| 1293 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(8192)); | ||
| 1294 | + } else { | ||
| 1295 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 1296 | + } | ||
| 1297 | + mstxVecSelDesc.blockNum = 8; | ||
| 1298 | + mstxVecSelDesc.repeatTimes = 1; | ||
| 1299 | + mstxVecSelDesc.dstBlockStride = 1; | ||
| 1300 | + mstxVecSelDesc.src0BlockStride = 1; | ||
| 1301 | + mstxVecSelDesc.src1BlockStride = 1; | ||
| 1302 | + mstxVecSelDesc.dstRepeatStride = 8; | ||
| 1303 | + mstxVecSelDesc.src0RepeatStride = 8; | ||
| 1304 | + mstxVecSelDesc.src1RepeatStride = 8; | ||
| 1305 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1306 | + | ||
| 1307 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1308 | +} | ||
| 1309 | + | ||
| 1310 | +template <typename T, typename U> | ||
| 1311 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1312 | + const LocalTensor<T>& src0, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1313 | + const BinaryRepeatParams& repeatParams, bool isSetMask, SELMODE selMode, __gm__ const char* name) | ||
| 1314 | +{ | ||
| 1315 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1316 | + mstxVecSelDesc.dst = From(dst); | ||
| 1317 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1318 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1319 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(8192)); | ||
| 1320 | + mstxVecSelDesc.blockNum = repeatParams.blockNumber; | ||
| 1321 | + mstxVecSelDesc.repeatTimes = repeatTime; | ||
| 1322 | + mstxVecSelDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1323 | + mstxVecSelDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1324 | + mstxVecSelDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1325 | + mstxVecSelDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1326 | + mstxVecSelDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1327 | + mstxVecSelDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1328 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1329 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1330 | + | ||
| 1331 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1332 | +} | ||
| 1333 | + | ||
| 1334 | +template <typename T, typename U> | ||
| 1335 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1336 | + const LocalTensor<T>& src0, uint64_t mask, const uint8_t repeatTime, | ||
| 1337 | + const BinaryRepeatParams& repeatParams, bool isSetMask, SELMODE selMode, __gm__ const char* name) | ||
| 1338 | +{ | ||
| 1339 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1340 | + mstxVecSelDesc.dst = From(dst); | ||
| 1341 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1342 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1343 | + mstxVecSelDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(8192)); | ||
| 1344 | + mstxVecSelDesc.blockNum = repeatParams.blockNumber; | ||
| 1345 | + mstxVecSelDesc.repeatTimes = repeatTime; | ||
| 1346 | + mstxVecSelDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1347 | + mstxVecSelDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1348 | + mstxVecSelDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1349 | + mstxVecSelDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1350 | + mstxVecSelDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1351 | + mstxVecSelDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1352 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1353 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1354 | + | ||
| 1355 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1356 | +} | ||
| 1357 | + | ||
| 1358 | +template <typename T, typename U> | ||
| 1359 | +__aicore__ inline void GetMstxVecBinarySelInfo(const LocalTensor<T>& dst, const LocalTensor<U>& selMask, | ||
| 1360 | + const LocalTensor<T>& src0, uint32_t count, bool isSetMask, SELMODE selMode, __gm__ const char* name) | ||
| 1361 | +{ | ||
| 1362 | + MstxVecSelDesc mstxVecSelDesc; | ||
| 1363 | + mstxVecSelDesc.dst = From(dst); | ||
| 1364 | + mstxVecSelDesc.src0 = From(src0); | ||
| 1365 | + mstxVecSelDesc.mask = From(selMask); | ||
| 1366 | + mstxVecSelDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(8192)); | ||
| 1367 | + mstxVecSelDesc.blockNum = 8; | ||
| 1368 | + mstxVecSelDesc.repeatTimes = 1; | ||
| 1369 | + mstxVecSelDesc.dstBlockStride = 1; | ||
| 1370 | + mstxVecSelDesc.src0BlockStride = 1; | ||
| 1371 | + mstxVecSelDesc.src1BlockStride = 1; | ||
| 1372 | + mstxVecSelDesc.dstRepeatStride = 8; | ||
| 1373 | + mstxVecSelDesc.src0RepeatStride = 8; | ||
| 1374 | + mstxVecSelDesc.src1RepeatStride = 8; | ||
| 1375 | + mstxVecSelDesc.scalarMode = (selMode == AscendC::SELMODE::VSEL_TENSOR_SCALAR_MODE); | ||
| 1376 | + CopyName(mstxVecSelDesc.name, name); | ||
| 1377 | + | ||
| 1378 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_SEL), sizeof(mstxVecSelDesc), &mstxVecSelDesc); | ||
| 1379 | +} | ||
| 1380 | + | ||
| 1381 | +//compare | ||
| 1382 | +template <typename T, typename U, typename V> | ||
| 1383 | +__aicore__ inline void GetMstxVecBinaryCmpInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1384 | + const LocalTensor<V>& src1, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1385 | + const BinaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1386 | +{ | ||
| 1387 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1388 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1389 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1390 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1391 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 1392 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1393 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1394 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1395 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1396 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1397 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1398 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1399 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1400 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1401 | + | ||
| 1402 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMP), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1403 | +} | ||
| 1404 | + | ||
| 1405 | +template <typename T, typename U, typename V> | ||
| 1406 | +__aicore__ inline void GetMstxVecBinaryCmpInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1407 | + const LocalTensor<V>& src1, uint64_t mask, const uint8_t repeatTime, | ||
| 1408 | + const BinaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1409 | +{ | ||
| 1410 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1411 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1412 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1413 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1414 | + mstxVecBinaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 1415 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1416 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1417 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1418 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1419 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1420 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1421 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1422 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1423 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1424 | + | ||
| 1425 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMP), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1426 | +} | ||
| 1427 | + | ||
| 1428 | +template <typename T, typename U, typename V> | ||
| 1429 | +__aicore__ inline void GetMstxVecBinaryCmpInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1430 | + const LocalTensor<V>& src1, __gm__ const char* name, const int32_t count) | ||
| 1431 | +{ | ||
| 1432 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1433 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1434 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1435 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1436 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), true, static_cast<uint32_t>(0)); | ||
| 1437 | + mstxVecBinaryDesc.blockNum = 8; | ||
| 1438 | + mstxVecBinaryDesc.repeatTimes = 1; | ||
| 1439 | + mstxVecBinaryDesc.dstBlockStride = 1; | ||
| 1440 | + mstxVecBinaryDesc.src0BlockStride = 1; | ||
| 1441 | + mstxVecBinaryDesc.src1BlockStride = 1; | ||
| 1442 | + mstxVecBinaryDesc.dstRepeatStride = 8; | ||
| 1443 | + mstxVecBinaryDesc.src0RepeatStride = 8; | ||
| 1444 | + mstxVecBinaryDesc.src1RepeatStride = 8; | ||
| 1445 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1446 | + | ||
| 1447 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMP), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1448 | +} | ||
| 1449 | + | ||
| 1450 | +//软仿的 | ||
| 1451 | +template <typename T, typename U, typename V> | ||
| 1452 | +__aicore__ inline void GetMstxVecBinaryAddReqReluInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1453 | + const LocalTensor<V>& src1, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1454 | + const BinaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1455 | +{ | ||
| 1456 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1457 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1458 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1459 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1460 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(8192)); | ||
| 1461 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1462 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1463 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1464 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1465 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1466 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1467 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1468 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1469 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1470 | + | ||
| 1471 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1472 | +} | ||
| 1473 | + | ||
| 1474 | +template <typename T, typename U, typename V> | ||
| 1475 | +__aicore__ inline void GetMstxVecBinaryAddReqReluInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1476 | + const LocalTensor<V>& src1, uint64_t mask, const uint8_t repeatTime, | ||
| 1477 | + const BinaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1478 | +{ | ||
| 1479 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1480 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1481 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1482 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1483 | + mstxVecBinaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(8192)); | ||
| 1484 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1485 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1486 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1487 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.src0BlkStride; | ||
| 1488 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.src1BlkStride; | ||
| 1489 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1490 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.src0RepStride; | ||
| 1491 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.src1RepStride; | ||
| 1492 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1493 | + | ||
| 1494 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1495 | +} | ||
| 1496 | + | ||
| 1497 | +template <typename T, typename U, typename V> | ||
| 1498 | +__aicore__ inline void GetMstxVecBinaryAddReqReluInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src0, | ||
| 1499 | + const LocalTensor<V>& src1, __gm__ const char* name, const int32_t count) | ||
| 1500 | +{ | ||
| 1501 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1502 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1503 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1504 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1505 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), true, static_cast<uint32_t>(8192)); | ||
| 1506 | + mstxVecBinaryDesc.blockNum = 8; | ||
| 1507 | + mstxVecBinaryDesc.repeatTimes = 1; | ||
| 1508 | + mstxVecBinaryDesc.dstBlockStride = 1; | ||
| 1509 | + mstxVecBinaryDesc.src0BlockStride = 1; | ||
| 1510 | + mstxVecBinaryDesc.src1BlockStride = 1; | ||
| 1511 | + mstxVecBinaryDesc.dstRepeatStride = 8; | ||
| 1512 | + mstxVecBinaryDesc.src0RepeatStride = 8; | ||
| 1513 | + mstxVecBinaryDesc.src1RepeatStride = 8; | ||
| 1514 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1515 | + | ||
| 1516 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1517 | +} | ||
| 1518 | + | ||
| 1519 | +template <typename T> | ||
| 1520 | +__aicore__ inline void GetMstxVecBinaryScalarInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1521 | + const LocalTensor<T>& src1, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1522 | + const UnaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1523 | +{ | ||
| 1524 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1525 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1526 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1527 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1528 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 1529 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1530 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1531 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1532 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.srcBlkStride; | ||
| 1533 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.srcBlkStride; | ||
| 1534 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1535 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.srcRepStride; | ||
| 1536 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.srcRepStride; | ||
| 1537 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1538 | + | ||
| 1539 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY_SCALAR), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1540 | +} | ||
| 1541 | + | ||
| 1542 | +template <typename T> | ||
| 1543 | +__aicore__ inline void GetMstxVecBinaryScalarInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1544 | + const LocalTensor<T>& src1, uint64_t mask, const uint8_t repeatTime, | ||
| 1545 | + const UnaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1546 | +{ | ||
| 1547 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1548 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1549 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1550 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1551 | + mstxVecBinaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 1552 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1553 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1554 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1555 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.srcBlkStride; | ||
| 1556 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.srcBlkStride; | ||
| 1557 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1558 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.srcRepStride; | ||
| 1559 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.srcRepStride; | ||
| 1560 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1561 | + | ||
| 1562 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY_SCALAR), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1563 | +} | ||
| 1564 | + | ||
| 1565 | +template <typename T> | ||
| 1566 | +__aicore__ inline void GetMstxVecBinaryScalarInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1567 | + const LocalTensor<T>& src1, bool isSetMask, __gm__ const char* name, const int32_t count) | ||
| 1568 | +{ | ||
| 1569 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1570 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1571 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1572 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1573 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 1574 | + mstxVecBinaryDesc.blockNum = 8; | ||
| 1575 | + mstxVecBinaryDesc.repeatTimes = 1; | ||
| 1576 | + mstxVecBinaryDesc.dstBlockStride = 1; | ||
| 1577 | + mstxVecBinaryDesc.src0BlockStride = 1; | ||
| 1578 | + mstxVecBinaryDesc.src1BlockStride = 1; | ||
| 1579 | + mstxVecBinaryDesc.dstRepeatStride = 8; | ||
| 1580 | + mstxVecBinaryDesc.src0RepeatStride = 8; | ||
| 1581 | + mstxVecBinaryDesc.src1RepeatStride = 8; | ||
| 1582 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1583 | + | ||
| 1584 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_BINARY_SCALAR), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1585 | +} | ||
| 1586 | + | ||
| 1587 | +//comparescalar的三目的 | ||
| 1588 | +template <typename T> | ||
| 1589 | +__aicore__ inline void GetMstxVecBinaryScalarCmpsInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1590 | + const LocalTensor<T>& src1, uint64_t mask0, uint64_t mask1, const uint8_t repeatTime, | ||
| 1591 | + const UnaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1592 | +{ | ||
| 1593 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1594 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1595 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1596 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1597 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, isSetMask, static_cast<uint32_t>(0)); | ||
| 1598 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1599 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1600 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1601 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.srcBlkStride; | ||
| 1602 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.srcBlkStride; | ||
| 1603 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1604 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.srcRepStride; | ||
| 1605 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.srcRepStride; | ||
| 1606 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1607 | + | ||
| 1608 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMPS), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1609 | +} | ||
| 1610 | + | ||
| 1611 | +template <typename T> | ||
| 1612 | +__aicore__ inline void GetMstxVecBinaryScalarCmpsInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1613 | + const LocalTensor<T>& src1, uint64_t mask, const uint8_t repeatTime, | ||
| 1614 | + const UnaryRepeatParams& repeatParams, bool isSetMask, __gm__ const char* name) | ||
| 1615 | +{ | ||
| 1616 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1617 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1618 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1619 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1620 | + mstxVecBinaryDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, isSetMask, static_cast<uint32_t>(0)); | ||
| 1621 | + mstxVecBinaryDesc.blockNum = repeatParams.blockNumber; | ||
| 1622 | + mstxVecBinaryDesc.repeatTimes = repeatTime; | ||
| 1623 | + mstxVecBinaryDesc.dstBlockStride = repeatParams.dstBlkStride; | ||
| 1624 | + mstxVecBinaryDesc.src0BlockStride = repeatParams.srcBlkStride; | ||
| 1625 | + mstxVecBinaryDesc.src1BlockStride = repeatParams.srcBlkStride; | ||
| 1626 | + mstxVecBinaryDesc.dstRepeatStride = repeatParams.dstRepStride; | ||
| 1627 | + mstxVecBinaryDesc.src0RepeatStride = repeatParams.srcRepStride; | ||
| 1628 | + mstxVecBinaryDesc.src1RepeatStride = repeatParams.srcRepStride; | ||
| 1629 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1630 | + | ||
| 1631 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMPS), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1632 | +} | ||
| 1633 | + | ||
| 1634 | +template <typename T> | ||
| 1635 | +__aicore__ inline void GetMstxVecBinaryScalarCmpsInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src0, | ||
| 1636 | + const LocalTensor<T>& src1, bool isSetMask, __gm__ const char* name, const int32_t count) | ||
| 1637 | +{ | ||
| 1638 | + MstxVecBinaryDesc mstxVecBinaryDesc; | ||
| 1639 | + mstxVecBinaryDesc.dst = From(dst); | ||
| 1640 | + mstxVecBinaryDesc.src0 = From(src0); | ||
| 1641 | + mstxVecBinaryDesc.src1 = From(src1); | ||
| 1642 | + mstxVecBinaryDesc.wrapper = WrapperFrom(MSTX_MASK_COUNT, count, static_cast<uint64_t>(0), isSetMask, static_cast<uint32_t>(0)); | ||
| 1643 | + mstxVecBinaryDesc.blockNum = 8; | ||
| 1644 | + mstxVecBinaryDesc.repeatTimes = 1; | ||
| 1645 | + mstxVecBinaryDesc.dstBlockStride = 1; | ||
| 1646 | + mstxVecBinaryDesc.src0BlockStride = 1; | ||
| 1647 | + mstxVecBinaryDesc.src1BlockStride = 1; | ||
| 1648 | + mstxVecBinaryDesc.dstRepeatStride = 8; | ||
| 1649 | + mstxVecBinaryDesc.src0RepeatStride = 8; | ||
| 1650 | + mstxVecBinaryDesc.src1RepeatStride = 8; | ||
| 1651 | + CopyName(mstxVecBinaryDesc.name, name); | ||
| 1652 | + | ||
| 1653 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_CMPS), sizeof(mstxVecBinaryDesc), &mstxVecBinaryDesc); | ||
| 1654 | +} | ||
| 1655 | + | ||
| 1656 | +//GatherMask | ||
| 1657 | +template <typename T> | ||
| 1658 | +__aicore__ inline void GetMstxVecGatherMaskInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, | ||
| 1659 | + uint32_t mask0, uint32_t mask1, const GatherMaskParams& gatherMaskParams, GatherMaskMode mode, __gm__ const char* name) | ||
| 1660 | +{ | ||
| 1661 | + MstxVecGatherMaskDesc mstxVecGatherMaskDesc; | ||
| 1662 | + mstxVecGatherMaskDesc.dst = From(dst); | ||
| 1663 | + mstxVecGatherMaskDesc.src = From(src); | ||
| 1664 | + mstxVecGatherMaskDesc.wrapper = WrapperFrom(MSTX_MASK_FROM_REG, mask0, mask1, true, static_cast<uint32_t>(0)); | ||
| 1665 | + mstxVecGatherMaskDesc.mode = (mode == GatherMaskMode::VERSION_V2) ? AscendC::MstxTensor::MstxGatherMaskMode::V2 : AscendC::MstxTensor::MstxGatherMaskMode::V1; | ||
| 1666 | + mstxVecGatherMaskDesc.repeatTimes = gatherMaskParams.repeatTimes; | ||
| 1667 | + mstxVecGatherMaskDesc.src0BlockStride = gatherMaskParams.src0BlockStride; | ||
| 1668 | + mstxVecGatherMaskDesc.src0RepeatStride = gatherMaskParams.src0RepeatStride; | ||
| 1669 | + mstxVecGatherMaskDesc.src1RepeatStride = gatherMaskParams.src1RepeatStride; | ||
| 1670 | + CopyName(mstxVecGatherMaskDesc.name, name); | ||
| 1671 | + | ||
| 1672 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_GATHER_MASK), sizeof(mstxVecGatherMaskDesc), &mstxVecGatherMaskDesc); | ||
| 1673 | +} | ||
| 1674 | + | ||
| 1675 | +template <typename T> | ||
| 1676 | +__aicore__ inline void GetMstxVecGatherMaskInfo(const LocalTensor<T>& dst, const LocalTensor<T>& src, | ||
| 1677 | + uint32_t mask, const GatherMaskParams& gatherMaskParams, GatherMaskMode mode, __gm__ const char* name) | ||
| 1678 | +{ | ||
| 1679 | + MstxVecGatherMaskDesc mstxVecGatherMaskDesc; | ||
| 1680 | + mstxVecGatherMaskDesc.dst = From(dst); | ||
| 1681 | + mstxVecGatherMaskDesc.src = From(src); | ||
| 1682 | + mstxVecGatherMaskDesc.wrapper = WrapperFrom<T>(MSTX_MASK_FROM_REG, mask, true, static_cast<uint32_t>(0)); | ||
| 1683 | + mstxVecGatherMaskDesc.mode = (mode == GatherMaskMode::VERSION_V2) ? AscendC::MstxTensor::MstxGatherMaskMode::V2 : AscendC::MstxTensor::MstxGatherMaskMode::V1; | ||
| 1684 | + mstxVecGatherMaskDesc.repeatTimes = gatherMaskParams.repeatTimes; | ||
| 1685 | + mstxVecGatherMaskDesc.src0BlockStride = gatherMaskParams.src0BlockStride; | ||
| 1686 | + mstxVecGatherMaskDesc.src0RepeatStride = gatherMaskParams.src0RepeatStride; | ||
| 1687 | + mstxVecGatherMaskDesc.src1RepeatStride = gatherMaskParams.src1RepeatStride; | ||
| 1688 | + CopyName(mstxVecGatherMaskDesc.name, name); | ||
| 1689 | + | ||
| 1690 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_VEC_GATHER_MASK), sizeof(mstxVecGatherMaskDesc), &mstxVecGatherMaskDesc); | ||
| 1691 | +} | ||
| 1692 | + | ||
| 1693 | +template <typename T, typename U> | ||
| 1694 | +__aicore__ inline void GetMstxDataCopyInfo(const LocalTensor<T>& dst, const GlobalTensor<U>& src, | ||
| 1695 | + const DataCopyParams& repeatParams, __gm__ const char* name) | ||
| 1696 | +{ | ||
| 1697 | + MstxDataCopyDesc mstxDataCopyDesc; | ||
| 1698 | + mstxDataCopyDesc.dst = From(dst); | ||
| 1699 | + mstxDataCopyDesc.src = FromGm(src); | ||
| 1700 | + mstxDataCopyDesc.nBurst = repeatParams.blockCount; | ||
| 1701 | + mstxDataCopyDesc.lenBurst = repeatParams.blockLen; | ||
| 1702 | + mstxDataCopyDesc.srcGap = repeatParams.srcStride; | ||
| 1703 | + mstxDataCopyDesc.dstGap = repeatParams.dstStride; | ||
| 1704 | + CopyName(mstxDataCopyDesc.name, name); | ||
| 1705 | + | ||
| 1706 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY), sizeof(mstxDataCopyDesc), &mstxDataCopyDesc); | ||
| 1707 | +} | ||
| 1708 | + | ||
| 1709 | +template <typename T, typename U> | ||
| 1710 | +__aicore__ inline void GetMstxDataCopyInfo(const GlobalTensor<T>& dst, const LocalTensor<U>& src, | ||
| 1711 | + const DataCopyParams& repeatParams, __gm__ const char* name) | ||
| 1712 | +{ | ||
| 1713 | + MstxDataCopyDesc mstxDataCopyDesc; | ||
| 1714 | + mstxDataCopyDesc.dst = FromGm(dst); | ||
| 1715 | + mstxDataCopyDesc.src = From(src); | ||
| 1716 | + mstxDataCopyDesc.nBurst = repeatParams.blockCount; | ||
| 1717 | + mstxDataCopyDesc.lenBurst = repeatParams.blockLen; | ||
| 1718 | + mstxDataCopyDesc.srcGap = repeatParams.srcStride; | ||
| 1719 | + mstxDataCopyDesc.dstGap = repeatParams.dstStride; | ||
| 1720 | + CopyName(mstxDataCopyDesc.name, name); | ||
| 1721 | + | ||
| 1722 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY), sizeof(mstxDataCopyDesc), &mstxDataCopyDesc); | ||
| 1723 | +} | ||
| 1724 | + | ||
| 1725 | +template <typename T, typename U> | ||
| 1726 | +__aicore__ inline void GetMstxDataCopyInfo(const LocalTensor<T>& dst, const LocalTensor<U>& src, | ||
| 1727 | + const DataCopyParams& repeatParams, __gm__ const char* name) | ||
| 1728 | +{ | ||
| 1729 | + MstxDataCopyDesc mstxDataCopyDesc; | ||
| 1730 | + mstxDataCopyDesc.dst = From(dst); | ||
| 1731 | + mstxDataCopyDesc.src = From(src); | ||
| 1732 | + mstxDataCopyDesc.nBurst = repeatParams.blockCount; | ||
| 1733 | + mstxDataCopyDesc.lenBurst = repeatParams.blockLen; | ||
| 1734 | + mstxDataCopyDesc.srcGap = repeatParams.srcStride; | ||
| 1735 | + mstxDataCopyDesc.dstGap = repeatParams.dstStride; | ||
| 1736 | + CopyName(mstxDataCopyDesc.name, name); | ||
| 1737 | + | ||
| 1738 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY), sizeof(mstxDataCopyDesc), &mstxDataCopyDesc); | ||
| 1739 | +} | ||
| 1740 | + | ||
| 1741 | +template <typename T, typename U> | ||
| 1742 | +__aicore__ inline void GetMstxDataCopyPadInfo(const LocalTensor<T>& dst, const GlobalTensor<U>& src, | ||
| 1743 | + const DataCopyParams& dataCopyParams, const DataCopyPadParams &padParams, __gm__ const char* name) | ||
| 1744 | +{ | ||
| 1745 | + MstxDataCopyPadDesc mstxDataCopyPadDesc; | ||
| 1746 | + mstxDataCopyPadDesc.dst = From(dst); | ||
| 1747 | + mstxDataCopyPadDesc.src = FromGm(src); | ||
| 1748 | + mstxDataCopyPadDesc.nBurst = dataCopyParams.blockCount; | ||
| 1749 | + mstxDataCopyPadDesc.lenBurst = dataCopyParams.blockLen; | ||
| 1750 | + mstxDataCopyPadDesc.srcGap = dataCopyParams.srcStride; | ||
| 1751 | + mstxDataCopyPadDesc.dstGap = dataCopyParams.dstStride; | ||
| 1752 | + mstxDataCopyPadDesc.leftPad = padParams.leftPadding; | ||
| 1753 | + mstxDataCopyPadDesc.rightPad = padParams.rightPadding; | ||
| 1754 | + CopyName(mstxDataCopyPadDesc.name, name); | ||
| 1755 | + | ||
| 1756 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY_PAD), sizeof(mstxDataCopyPadDesc), &mstxDataCopyPadDesc); | ||
| 1757 | +} | ||
| 1758 | + | ||
| 1759 | +template <typename T, typename U> | ||
| 1760 | +__aicore__ inline void GetMstxDataCopyPadInfo(const GlobalTensor<T>& dst, const LocalTensor<U>& src, | ||
| 1761 | + const DataCopyParams& dataCopyParams, __gm__ const char* name) | ||
| 1762 | +{ | ||
| 1763 | + MstxDataCopyPadDesc mstxDataCopyPadDesc; | ||
| 1764 | + mstxDataCopyPadDesc.dst = FromGm(dst); | ||
| 1765 | + mstxDataCopyPadDesc.src = From(src); | ||
| 1766 | + mstxDataCopyPadDesc.nBurst = dataCopyParams.blockCount; | ||
| 1767 | + mstxDataCopyPadDesc.lenBurst = dataCopyParams.blockLen; | ||
| 1768 | + mstxDataCopyPadDesc.srcGap = dataCopyParams.srcStride; | ||
| 1769 | + mstxDataCopyPadDesc.dstGap = dataCopyParams.dstStride; | ||
| 1770 | + mstxDataCopyPadDesc.leftPad = 0; | ||
| 1771 | + mstxDataCopyPadDesc.rightPad = 0; | ||
| 1772 | + CopyName(mstxDataCopyPadDesc.name, name); | ||
| 1773 | + | ||
| 1774 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY_PAD), sizeof(mstxDataCopyPadDesc), &mstxDataCopyPadDesc); | ||
| 1775 | +} | ||
| 1776 | + | ||
| 1777 | +template <typename T, typename U> | ||
| 1778 | +__aicore__ inline void GetMstxDataCopyPadInfo(const LocalTensor<T>& dst, const GlobalTensor<U>& src, | ||
| 1779 | + const DataCopyExtParams &dataCopyParams, const DataCopyPadExtParams<T> &padParams, __gm__ const char* name) | ||
| 1780 | +{ | ||
| 1781 | + MstxDataCopyPadDesc mstxDataCopyPadDesc; | ||
| 1782 | + mstxDataCopyPadDesc.dst = From(dst); | ||
| 1783 | + mstxDataCopyPadDesc.src = FromGm(src); | ||
| 1784 | + mstxDataCopyPadDesc.nBurst = dataCopyParams.blockCount; | ||
| 1785 | + mstxDataCopyPadDesc.lenBurst = dataCopyParams.blockLen; | ||
| 1786 | + mstxDataCopyPadDesc.srcGap = dataCopyParams.srcStride; | ||
| 1787 | + mstxDataCopyPadDesc.dstGap = dataCopyParams.dstStride; | ||
| 1788 | + mstxDataCopyPadDesc.leftPad = padParams.leftPadding; | ||
| 1789 | + mstxDataCopyPadDesc.rightPad = padParams.rightPadding; | ||
| 1790 | + CopyName(mstxDataCopyPadDesc.name, name); | ||
| 1791 | + | ||
| 1792 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY_PAD), sizeof(mstxDataCopyPadDesc), &mstxDataCopyPadDesc); | ||
| 1793 | +} | ||
| 1794 | + | ||
| 1795 | +template <typename T, typename U> | ||
| 1796 | +__aicore__ inline void GetMstxDataCopyPadInfo(const GlobalTensor<T>& dst, const LocalTensor<U>& src, | ||
| 1797 | + const DataCopyExtParams& dataCopyParams, __gm__ const char* name) | ||
| 1798 | +{ | ||
| 1799 | + MstxDataCopyPadDesc mstxDataCopyPadDesc; | ||
| 1800 | + mstxDataCopyPadDesc.dst = FromGm(dst); | ||
| 1801 | + mstxDataCopyPadDesc.src = From(src); | ||
| 1802 | + mstxDataCopyPadDesc.nBurst = dataCopyParams.blockCount; | ||
| 1803 | + mstxDataCopyPadDesc.lenBurst = dataCopyParams.blockLen; | ||
| 1804 | + mstxDataCopyPadDesc.srcGap = dataCopyParams.srcStride; | ||
| 1805 | + mstxDataCopyPadDesc.dstGap = dataCopyParams.dstStride; | ||
| 1806 | + mstxDataCopyPadDesc.leftPad = 0; | ||
| 1807 | + mstxDataCopyPadDesc.rightPad = 0; | ||
| 1808 | + CopyName(mstxDataCopyPadDesc.name, name); | ||
| 1809 | + | ||
| 1810 | + __mstx_dfx_report_stub(static_cast<uint32_t>(MstxReportType::MSTX_DATA_COPY_PAD), sizeof(mstxDataCopyPadDesc), &mstxDataCopyPadDesc); | ||
| 1811 | +} | ||
| 1812 | + | ||
| 1813 | + | ||
| 1814 | + | ||
| 1815 | + | ||
| 1816 | + | ||
| 1817 | + | ||
| 1818 | + | ||
| 1819 | + | ||
| 1820 | + | ||
| 1821 | + | ||
| 1822 | +} | ||
| 1823 | +} | ||
| 1824 | + | ||
| 1825 | + | ||
| @@ -20,6 +20,7 @@ set(BASIC_UT_PRODUCT_TYPE_LIST_INIT | |||
| 20 | ascend310p | 20 | ascend310p |
| 21 | ascend910B1_AIC | 21 | ascend910B1_AIC |
| 22 | ascend910B1_AIV | 22 | ascend910B1_AIV |
| 23 | + ascend910B1_AIV_MSTX | ||
| 23 | ascend310B1 | 24 | ascend310B1 |
| 24 | ascend950pr_9599_AIC | 25 | ascend950pr_9599_AIC |
| 25 | ascend950pr_9599_AIV_BASIC | 26 | ascend950pr_9599_AIV_BASIC |
| @@ -72,6 +73,11 @@ file(GLOB ASCENDC_TEST_ascend910B1_AIV_CASE_SRC_FILES | |||
| 72 | ascendc_case_ascend910b1/ascendc_case_ascend910b1_aiv/*.cpp | 73 | ascendc_case_ascend910b1/ascendc_case_ascend910b1_aiv/*.cpp |
| 73 | ) | 74 | ) |
| 74 | 75 | ||
| 76 | +# ascend910B1 aiv mstx test cases | ||
| 77 | +file(GLOB ASCENDC_TEST_ascend910B1_AIV_MSTX_CASE_SRC_FILES | ||
| 78 | + ascendc_case_ascend910b1/ascendc_case_ascend910b1_aiv_mstx/test_operator_vec_mstx.cpp | ||
| 79 | +) | ||
| 80 | + | ||
| 75 | # ascend910B1 aic test cases | 81 | # ascend910B1 aic test cases |
| 76 | file(GLOB ASCENDC_TEST_ascend910B1_AIC_CASE_SRC_FILES | 82 | file(GLOB ASCENDC_TEST_ascend910B1_AIC_CASE_SRC_FILES |
| 77 | ascendc_case_ascend910b1/ascendc_case_ascend910b1_aic/*.cpp | 83 | ascendc_case_ascend910b1/ascendc_case_ascend910b1_aic/*.cpp |
| @@ -150,6 +156,7 @@ foreach(product_type ${BASIC_UT_PRODUCT_TYPE_LIST}) | |||
| 150 | $<$<STREQUAL:${product_type},ascend310p>:../common/tik_pv_wrapper.cpp> | 156 | $<$<STREQUAL:${product_type},ascend310p>:../common/tik_pv_wrapper.cpp> |
| 151 | $<$<STREQUAL:${product_type},ascend910B1_AIC>:../common/k3_pvwrap.cpp> | 157 | $<$<STREQUAL:${product_type},ascend910B1_AIC>:../common/k3_pvwrap.cpp> |
| 152 | $<$<STREQUAL:${product_type},ascend910B1_AIV>:../common/k3_pvwrap.cpp> | 158 | $<$<STREQUAL:${product_type},ascend910B1_AIV>:../common/k3_pvwrap.cpp> |
| 159 | + $<$<STREQUAL:${product_type},ascend910B1_AIV_MSTX>:../common/k3_pvwrap.cpp> | ||
| 153 | $<$<STREQUAL:${product_type},ascend310B1>:../common/k3_pvwrap.cpp> | 160 | $<$<STREQUAL:${product_type},ascend310B1>:../common/k3_pvwrap.cpp> |
| 154 | $<$<STREQUAL:${product_type},ascend610Lite>:../common/k3_pvwrap.cpp> | 161 | $<$<STREQUAL:${product_type},ascend610Lite>:../common/k3_pvwrap.cpp> |
| 155 | $<$<STREQUAL:${product_type},ascend950pr_9599_AIC>:../common/k3_pvwrap.cpp> | 162 | $<$<STREQUAL:${product_type},ascend950pr_9599_AIC>:../common/k3_pvwrap.cpp> |
| @@ -159,6 +166,7 @@ foreach(product_type ${BASIC_UT_PRODUCT_TYPE_LIST}) | |||
| 159 | $<$<STREQUAL:${product_type},mc62cm12aa_BASIC>:../common/k3_pvwrap.cpp> | 166 | $<$<STREQUAL:${product_type},mc62cm12aa_BASIC>:../common/k3_pvwrap.cpp> |
| 160 | $<$<STREQUAL:${product_type},mc62cm12aa_FRAMEWORK>:../common/k3_pvwrap.cpp> | 167 | $<$<STREQUAL:${product_type},mc62cm12aa_FRAMEWORK>:../common/k3_pvwrap.cpp> |
| 161 | ${ASCENDC_TEST_${product_type}_CASE_SRC_FILES} | 168 | ${ASCENDC_TEST_${product_type}_CASE_SRC_FILES} |
| 169 | + $<$<STREQUAL:${product_type},ascend910B1_AIV_MSTX>:${ASCENDC_TEST_ascend910B1_AIV_MSTX_CASE_SRC_FILES}> | ||
| 162 | ) | 170 | ) |
| 163 | 171 | ||
| 164 | target_compile_definitions(ascendc_ut_basic_api_${product_type} PRIVATE | 172 | target_compile_definitions(ascendc_ut_basic_api_${product_type} PRIVATE |
| @@ -170,6 +178,7 @@ foreach(product_type ${BASIC_UT_PRODUCT_TYPE_LIST}) | |||
| 170 | $<$<STREQUAL:${product_type},ascend610>:__NPU_ARCH__=2002;__DAV_M200__> | 178 | $<$<STREQUAL:${product_type},ascend610>:__NPU_ARCH__=2002;__DAV_M200__> |
| 171 | $<$<STREQUAL:${product_type},ascend910B1_AIC>:__NPU_ARCH__=2201;__DAV_C220__;__DAV_C220_CUBE__;__DAV_CUBE__> | 179 | $<$<STREQUAL:${product_type},ascend910B1_AIC>:__NPU_ARCH__=2201;__DAV_C220__;__DAV_C220_CUBE__;__DAV_CUBE__> |
| 172 | $<$<STREQUAL:${product_type},ascend910B1_AIV>:__NPU_ARCH__=2201;__DAV_C220__;__DAV_C220_VEC__;__DAV_VEC__> | 180 | $<$<STREQUAL:${product_type},ascend910B1_AIV>:__NPU_ARCH__=2201;__DAV_C220__;__DAV_C220_VEC__;__DAV_VEC__> |
| 181 | + $<$<STREQUAL:${product_type},ascend910B1_AIV_MSTX>:__NPU_ARCH__=2201;__DAV_C220__;__DAV_C220_VEC__;__DAV_VEC__> | ||
| 173 | $<$<STREQUAL:${product_type},ascend310B1>:__NPU_ARCH__=3002;__DAV_M300__> | 182 | $<$<STREQUAL:${product_type},ascend310B1>:__NPU_ARCH__=3002;__DAV_M300__> |
| 174 | $<$<STREQUAL:${product_type},ascend610Lite>:__NPU_ARCH__=3102;__DAV_M310__> | 183 | $<$<STREQUAL:${product_type},ascend610Lite>:__NPU_ARCH__=3102;__DAV_M310__> |
| 175 | $<$<STREQUAL:${product_type},ascend950pr_9599_AIC>:__NPU_ARCH__=3101;__DAV_C310__;__DAV_C310_CUBE__> | 184 | $<$<STREQUAL:${product_type},ascend950pr_9599_AIC>:__NPU_ARCH__=3101;__DAV_C310__;__DAV_C310_CUBE__> |
| @@ -200,6 +209,7 @@ foreach(product_type ${BASIC_UT_PRODUCT_TYPE_LIST}) | |||
| 200 | $<$<STREQUAL:${product_type},ascend310p>:tikicpulib::ascend310p> | 209 | $<$<STREQUAL:${product_type},ascend310p>:tikicpulib::ascend310p> |
| 201 | $<$<STREQUAL:${product_type},ascend910B1_AIC>:tikicpulib::ascend910B1> | 210 | $<$<STREQUAL:${product_type},ascend910B1_AIC>:tikicpulib::ascend910B1> |
| 202 | $<$<STREQUAL:${product_type},ascend910B1_AIV>:tikicpulib::ascend910B1> | 211 | $<$<STREQUAL:${product_type},ascend910B1_AIV>:tikicpulib::ascend910B1> |
| 212 | + $<$<STREQUAL:${product_type},ascend910B1_AIV_MSTX>:tikicpulib::ascend910B1> | ||
| 203 | $<$<STREQUAL:${product_type},ascend310B1>:tikicpulib::ascend310B1> | 213 | $<$<STREQUAL:${product_type},ascend310B1>:tikicpulib::ascend310B1> |
| 204 | $<$<STREQUAL:${product_type},ascend610Lite>:tikicpulib::ascend610Lite> | 214 | $<$<STREQUAL:${product_type},ascend610Lite>:tikicpulib::ascend610Lite> |
| 205 | $<$<STREQUAL:${product_type},ascend950pr_9599_AIC>:tikicpulib::ascend950pr_9599> | 215 | $<$<STREQUAL:${product_type},ascend950pr_9599_AIC>:tikicpulib::ascend950pr_9599> |
| @@ -53,6 +53,7 @@ basic_test_one_targets=( | |||
| 53 | # ascendc_ut_basic_api_ascend610Lite | 53 | # ascendc_ut_basic_api_ascend610Lite |
| 54 | ascendc_ut_basic_api_ascend910B1_AIC | 54 | ascendc_ut_basic_api_ascend910B1_AIC |
| 55 | ascendc_ut_basic_api_ascend910B1_AIV | 55 | ascendc_ut_basic_api_ascend910B1_AIV |
| 56 | + ascendc_ut_basic_api_ascend910B1_AIV_MSTX | ||
| 56 | ) | 57 | ) |
| 57 | 58 | ||
| 58 | basic_test_two_targets=( | 59 | basic_test_two_targets=( |


api name最好都统一放到尾巴