@@ -1071,6 +1071,79 @@ function blas_symm(
10711071 )
10721072end
10731073
1074+ """
1075+ `blas_syrk`
1076+
1077+ C := alpha*A*A^T + beta*C, or C := alpha*A^T*A + beta*C, where alpha and beta are scalars. C must be a n x n symmetric matrix.\"
1078+ """
1079+ function blas_syrk (
1080+ A:: Value ,
1081+ C:: Value ,
1082+ alpha:: Value ,
1083+ beta:: Value ;
1084+ output:: IR.Type ,
1085+ uplo,
1086+ transpose= nothing ,
1087+ location= Location (),
1088+ )
1089+ op_ty_results = IR. Type[output,]
1090+ operands = Value[A, C, alpha, beta]
1091+ owned_regions = Region[]
1092+ successors = Block[]
1093+ attributes = NamedAttribute[namedattribute (" uplo" , uplo),]
1094+ ! isnothing (transpose) && push! (attributes, namedattribute (" transpose" , transpose))
1095+
1096+ return create_operation (
1097+ " enzymexla.blas.syrk" ,
1098+ location;
1099+ operands,
1100+ owned_regions,
1101+ successors,
1102+ attributes,
1103+ results= op_ty_results,
1104+ result_inference= false ,
1105+ )
1106+ end
1107+
1108+ """
1109+ `blas_trmm`
1110+
1111+ B := alpha * op(A) x B, or B := alpha * B x op(A), where alpha is a scalar,
1112+ B is a m x n matrix, A is a unit, or non-unit, upper or lower triangular
1113+ matrix, and op(A) is one of op(A) = A, or op(A) = A^T or A^H.
1114+ """
1115+ function blas_trmm (
1116+ A:: Value ,
1117+ B:: Value ,
1118+ alpha:: Value ;
1119+ output:: IR.Type ,
1120+ side,
1121+ uplo,
1122+ transpose,
1123+ location= Location (),
1124+ )
1125+ op_ty_results = IR. Type[output,]
1126+ operands = Value[A, B, alpha]
1127+ owned_regions = Region[]
1128+ successors = Block[]
1129+ attributes = NamedAttribute[
1130+ namedattribute (" side" , side),
1131+ namedattribute (" uplo" , uplo),
1132+ namedattribute (" transpose" , transpose),
1133+ ]
1134+
1135+ return create_operation (
1136+ " enzymexla.blas.trmm" ,
1137+ location;
1138+ operands,
1139+ owned_regions,
1140+ successors,
1141+ attributes,
1142+ results= op_ty_results,
1143+ result_inference= false ,
1144+ )
1145+ end
1146+
10741147function typeAlign (; result:: IR.Type , source, location= Location ())
10751148 op_ty_results = IR. Type[result,]
10761149 operands = Value[]
0 commit comments