Skip to content

Commit

Permalink
#13415: Update left shift (#15538)
Browse files Browse the repository at this point in the history
### Ticket
#13415

### Problem description
Update left shift

### What's changed
Updated file as mentioned in Issue
#15514.

### Checklist
- [x] [Post commit
CI](https://github.com/tenstorrent/tt-metal/actions/runs/12074417574)
passes
- [x] [Blackhole post-commit
tests](https://github.com/tenstorrent/tt-metal/actions/runs/12074418588)
passes
  • Loading branch information
VirdhatchaniKN authored Dec 1, 2024
1 parent 273a940 commit 7b74c5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ template <bool APPROXIMATION_MODE, int ITERATIONS = 8>
inline void calculate_left_shift(const uint shift_amt) {
#pragma GCC unroll 0
for (int d = 0; d < ITERATIONS; d++) {
vInt val = dst_reg[0];
vInt v = val;

val = val << shift_amt;
val = setsgn(val, v);
dst_reg[0] = val;

TTI_SFPLOAD(0,12,ADDR_MOD_7,0);
TT_SFPSHFT(shift_amt,0,0,1);
TTI_SFPSTORE(0,12,ADDR_MOD_7,0);
dst_reg++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ template <bool APPROXIMATION_MODE, int ITERATIONS = 8>
inline void calculate_left_shift(const uint shift_amt) {
#pragma GCC unroll 0
for (int d = 0; d < ITERATIONS; d++) {
vInt val = dst_reg[0];
vInt v = val;

val = val << shift_amt;
val = setsgn(val, v);
dst_reg[0] = val;

TTI_SFPLOAD(0,4,3,0);
TT_SFPSHFT(shift_amt,0,0,1);
TTI_SFPSTORE(0,4,3,0);
dst_reg++;
}
}
Expand Down

0 comments on commit 7b74c5b

Please sign in to comment.