Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyu-intel committed May 31, 2024
1 parent af00a4e commit fa0e5cf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bestla/bestla/bestla_prologue_b.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class WeightKBlockNInteger {
if (scales) {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template SPtr<float>()[i * stor->mNPad + j] = scales[j * rawnk_scale + i];
}
} else {
Expand All @@ -365,7 +365,7 @@ class WeightKBlockNInteger {
if (scales) {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template SPtr<utils::bf16>()[i * stor->mNPad + j] = utils::bf16(scales[j * rawnk_scale + i]);
}
} else {
Expand All @@ -383,7 +383,7 @@ class WeightKBlockNInteger {
if (scales) {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template SPtr<utils::f8>()[i * stor->mNPad + j] = scales[j * rawnk_scale + i];
}
} else {
Expand All @@ -403,7 +403,7 @@ class WeightKBlockNInteger {
if (thdp.valid) {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template ZPtr<int8_t>()[i * stor->mNPad + j] = zero_points[j * rawnk_scale + i];
}
} else {
Expand Down Expand Up @@ -1189,7 +1189,7 @@ class WeightKBlockNFloat {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
if (scales != nullptr) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template SPtr<utils::bf16>()[j + i * stor->mNPad] = static_cast<utils::bf16>(scales[i * N + j]);
}
}
Expand All @@ -1214,7 +1214,7 @@ class WeightKBlockNFloat {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
if (scales != nullptr) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template SPtr<utils::f8>()[j + i * stor->mNPad] = static_cast<int8_t>(scales[i * N + j]);
}
}
Expand All @@ -1233,7 +1233,7 @@ class WeightKBlockNFloat {
for (int i = thdp.loc[1]; i < thdp.loc[1] + thdp.size[1]; i++) {
if (i < rawnk_scale) {
if (scales != nullptr) {
for (size_t j = 0; j < N; j++) {
for (int j = 0; j < N; j++) {
stor->template SPtr<uint8_t>()[j + i * stor->mNPad] = static_cast<uint8_t>(scales[i * N + j]);
}
}
Expand Down

0 comments on commit fa0e5cf

Please sign in to comment.