kutacc_af2_outer_product_mean_calc_left_and_right_mul
Calculate the left and right projections in outer_product_mean.
Interface Definition
void kutacc_af2_outer_product_mean_calc_left_and_right_mul(kutacc_af2_opm_act_inputs_t *opm_acts_ptr, kutacc_af2_opm_mask_inputs_t *opm_masks_ptr, kutacc_af2_opm_weights_t *opm_weights_ptr);
Parameters
Table 1 Input parameter definition
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
opm_acts_ptr |
kutacc_af2_opm_act_inputs_t * |
Pointer of the kutacc_af2_opm_act_inputs_t type. For details about the data structure, see Table 2. |
Input |
opm_masks_ptr |
kutacc_af2_opm_mask_inputs_t * |
Pointer of the kutacc_af2_opm_mask_inputs_t type. For details about the data structure, see Table 3. |
Input |
opm_weights_ptr |
kutacc_af2_opm_weights_t * |
Pointer of the kutacc_af2_opm_weights_t type. For details about the data structure, see Table 4. |
Input |
Table 2 kutacc_af2_opm_act_inputs_t structure definition
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
n_seq |
int64_t |
Number of sequences |
Input |
n_res |
int64_t |
Number of residues |
Input |
input_act |
kutacc_tensor_h |
Input activation tensor |
Input |
left_proj |
kutacc_tensor_h |
Left projection |
Input |
right_proj |
kutacc_tensor_h |
Right projection |
Input |
left_proj_ |
kutacc_tensor_h |
Left projection after mask processing |
Input |
right_proj_ |
kutacc_tensor_h |
Right projection after mask processing |
Input |
Table 3 kutacc_af2_opm_mask_inputs_t structure definition
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
n_res_gather |
int64_t |
Number of residues after aggregation |
Input |
mask_bias |
int64_t |
Mask tensor address bias |
Input |
mask |
kutacc_tensor_h |
Mask tensor |
Input |
norm |
kutacc_tensor_h |
Normalization factor tensor |
Input |
Table 4 kutacc_af2_opm_weights_t structure definition
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
c_m |
int64_t |
Input feature dimension |
Input |
c_i |
int64_t |
Feature dimension after projection |
Input |
c_z |
int64_t |
Output feature dimension |
Input |
left_proj_w |
kutacc_tensor_h |
Left projection weight |
Input |
left_proj_b |
kutacc_tensor_h |
Left projection bias |
Input |
right_proj_w |
kutacc_tensor_h |
Right projection weight |
Input |
right_proj_b |
kutacc_tensor_h |
Right projection bias |
Input |
outer_w |
kutacc_tensor_h |
Output weight |
Input |
outer_b |
kutacc_tensor_h |
Output bias |
Input |
Constraints on integer parameters of outer_product_mean:
mask_bias ≥ 0
c_i, c_m, n_res, n_res_gather, n_seq > 0
n_seq * n_res < INT64_MAX
In single-process mode, n_res must be equal to n_res_gather. In multi-process mode, this condition is not met.