Skip to content

Commit

Permalink
[Fix](bangc-ops): fix focalLossSigmoidBackward buffer overflow (Cambr…
Browse files Browse the repository at this point in the history
…icon#780)

Co-authored-by: laijiandong <[email protected]>
  • Loading branch information
stulai and laijiandong authored Jul 17, 2023
1 parent 881c7f5 commit db12dce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ __mlu_func__ void focalLossSigmoidBackwardBlock(
int32_t compute_num = 0;
int32_t compute_size = 0;
int32_t compute_align_size = NFU_ALIGN_SIZE;
const int32_t nfu_align_num = NFU_ALIGN_SIZE / sizeof(T);
const int32_t nfu_align_num = NFU_ALIGN_SIZE / sizeof(float);
if (sizeof(T) == sizeof(half)) {
compute_align_size += NFU_ALIGN_SIZE;
}
Expand Down

0 comments on commit db12dce

Please sign in to comment.