Skip to content

Commit

Permalink
Add comments to the mac/mul config
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestcl-amd committed Apr 10, 2024
1 parent b934c53 commit 938cf9a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/Conversion/AIEVecToLLVM/AIEVecToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,20 @@ class MulElemOpConversion
int conf;
};

// sgn_x: Sign mask of matrix X. If it is one matrix X is interpreted as
// signed, else it treated as unsigned.
// sgn_y: Sign mask of matrix Y. If it is one matrix Y is interpreted as
// signed, else it treated as unsigned.
// zero_acc1: Zeroing of acc1. If it is one then acc1 is zeroed.
// zero_acc2: Zeroing of acc2. If it is one then acc2 is zeroed.
// sub_mul: Negation mask of the matrix multiplication result. If it is
// one the result of the operation will be negated.
// sub_acc1: Negation mask of acc1. If it is one acc1 will be negated.
// sub_acc2: Negation mask of acc2. If it is one acc2 will be negated.
// shift16: Shift mask of acc1. If a bit is set the <<16 operation will be
// executed on acc1.
// sub_mask: Negation mask of complex multiplications. Negates a term of a
// complex multiplication.
static int aiev2_mul_mac_compute_control(int sgn_x, int sgn_y, int amode,
int bmode, int variant, int zero_acc,
int shift16, int sub0, int sub1,
Expand Down Expand Up @@ -428,7 +442,7 @@ class MulElemOpConversion
// acc = mac_elem_16_2_conf(a_lo, false, b_lo, false, acc, 0, 1, 0, 0);
// return acc;
// }
// Caller's syntax to the above CPP intrinsic is below:
// Caller to the above CPP intrinsic:
// v16int32 v1 = LHS();
// v16int32 v2 = RHS();
// v16acc64 v3 = mul_elem_16_2(v1, broadcast_zero_s32(), v2,
Expand Down

0 comments on commit 938cf9a

Please sign in to comment.