Skip to content

Commit

Permalink
Math: Switch mat_multiply_elementwise product type to int32_t
Browse files Browse the repository at this point in the history
- Changed product variable from int64_t to int32_t
- Improved performance by reducing data size
- Achieved a 11.57% performance improvement in cycle count

| Rows | Cols | Cycles | Max Error | RMS Error | Result |
+------+------+--------+-----------+-----------+--------+
| 5    | 6    | 2972   | 0.00	   | 0.00      | Pass   |

Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
  • Loading branch information
ShriramShastry committed Aug 27, 2024
1 parent 65c21f0 commit c3eeab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int mat_multiply_elementwise(struct mat_matrix_16b *a, struct mat_matrix_16b *b,
int16_t *x = a->data;
int16_t *y = b->data;
int16_t *z = c->data;
int64_t p;
int32_t p;
int i;
const int shift_minus_one = a->fractions + b->fractions - c->fractions - 1;

Expand Down

0 comments on commit c3eeab1

Please sign in to comment.