diff --git a/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_2d.cpp b/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_2d.cpp index c0f74735a37..0fa899feb4a 100644 --- a/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_2d.cpp +++ b/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_2d.cpp @@ -119,14 +119,14 @@ void kernel_main() { for (uint32_t h = 0; h < TILE_HEIGHT; h++) { for (uint32_t w = 0; w < TILE_WIDTH; w++) { uint32_t n = nt * TILE_HEIGHT + h; - int32_t c = ct * TILE_WIDTH + w; + uint32_t c = ct * TILE_WIDTH + w; uint32_t target_tilized_idx = get_tilized_idx(0, h); // 0, n int32_t target_val = target_l1_ptr[target_tilized_idx]; uint32_t tmp_weight_tilized_idx = get_tilized_idx(h, w); // n, c - if (target_val != ignore_index && target_val == c) { + if (target_val != ignore_index && target_val == static_cast(c)) { #if defined(WEIGHT) tmp_weight_l1_ptr[tmp_weight_tilized_idx] = fp32_dest_acc_cast(weight_l1_ptr[target_val]); #else diff --git a/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_3d.cpp b/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_3d.cpp index fe6b196b26d..6c8697bc352 100644 --- a/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_3d.cpp +++ b/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_3d.cpp @@ -127,10 +127,10 @@ void kernel_main() { uint32_t target_tilized_idx = get_tilized_idx(n % TILE_HEIGHT, w); int32_t target_val = target_l1_ptr[target_tilized_idx]; - int32_t c = ct * TILE_HEIGHT + h; + uint32_t c = ct * TILE_HEIGHT + h; uint32_t tmp_weight_tilized_idx = get_tilized_idx(h, w); - if (target_val != ignore_index && target_val == c) { + if (target_val != ignore_index && target_val == static_cast(c)) { #if defined(WEIGHT) tmp_weight_l1_ptr[tmp_weight_tilized_idx] = fp32_dest_acc_cast(weight_l1_ptr[target_val]); #else diff --git a/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_4d.cpp b/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_4d.cpp index 8926a05687d..073298d147a 100644 --- a/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_4d.cpp +++ b/tt_eager/tt_dnn/op_library/moreh_nll_loss_backward/moreh_nll_loss_backward/kernels/reader_moreh_nll_loss_backward_4d.cpp @@ -96,7 +96,7 @@ void kernel_main() { uint32_t inner = i % num_inner_tile; uint32_t nc = i / num_inner_tile; uint32_t n = nc / C; - int32_t c = static_cast(nc % C); + uint32_t c = nc % C; cb_reserve_back(cb_target, onetile); uint32_t l1_write_addr_target = get_write_ptr(cb_target); @@ -120,7 +120,7 @@ void kernel_main() { int32_t target_val = target_l1_ptr[idx]; FP32_DEST_ACC_FTYPE val; - if (target_val != ignore_index && target_val == c) { + if (target_val != ignore_index && target_val == static_cast(c)) { #if defined(WEIGHT) val = fp32_dest_acc_cast(weight_l1_ptr[target_val]); #else