Fix warning (signed vs unsigned)

PiperOrigin-RevId: 836106478
This commit is contained in:
Jan Wassenberg 2025-11-24 00:50:40 -08:00 committed by Copybara-Service
parent 0e5f4cbf1b
commit 37a25c9ffe
2 changed files with 5 additions and 5 deletions

View File

@ -218,7 +218,7 @@ void QDotKTile(DF df, const BF16* HWY_RESTRICT q, const size_t q_stride,
sum6 = hn::Zero(df); sum6 = hn::Zero(df);
sum7 = hn::Zero(df); sum7 = hn::Zero(df);
const float* HWY_RESTRICT k_row[kHTileSize]; const float* HWY_RESTRICT k_row[kHTileSize];
for (int i = 0; i < kHTileSize; ++i) { for (size_t i = 0; i < kHTileSize; ++i) {
k_row[i] = k.Row(k_pos[i]); k_row[i] = k.Row(k_pos[i]);
} }
@ -288,15 +288,15 @@ void TileFlashAttention(
const uint32_t* HWY_RESTRICT out_offsets, ThreadingContext& ctx, const uint32_t* HWY_RESTRICT out_offsets, ThreadingContext& ctx,
const size_t worker) { const size_t worker) {
GCPP_ZONE(ctx, worker, Zones::kFlashAttentionTileFlashAttention); GCPP_ZONE(ctx, worker, Zones::kFlashAttentionTileFlashAttention);
constexpr int kHTileSize = kNFx8HTileSize; constexpr size_t kHTileSize = kNFx8HTileSize;
using DF = hn::ScalableTag<float>; using DF = hn::ScalableTag<float>;
const DF df; const DF df;
using VF = hn::Vec<DF>; using VF = hn::Vec<DF>;
using DI = hn::ScalableTag<uint32_t>; using DI = hn::ScalableTag<uint32_t>;
const DI di; const DI di;
using VI = hn::Vec<DI>; using VI = hn::Vec<DI>;
const int kVTileSize = hn::Lanes(df); const size_t kVTileSize = hn::Lanes(df);
for (int i = 0; i < kVTileSize; ++i) { for (size_t i = 0; i < kVTileSize; ++i) {
hwy::ZeroBytes(att_out.Row(0) + out_offsets[i], hwy::ZeroBytes(att_out.Row(0) + out_offsets[i],
v.Cols() * sizeof(att_out.Row(0)[0])); v.Cols() * sizeof(att_out.Row(0)[0]));
} }

View File

@ -131,7 +131,7 @@ class BlobWriter {
std::vector<size_t> blob_sizes_; std::vector<size_t> blob_sizes_;
ThreadingContext& ctx_; ThreadingContext& ctx_;
// Current offset in the file used for writing. // Current offset in the file used for writing.
int64_t curr_offset_ = 0; uint64_t curr_offset_ = 0;
}; };
} // namespace gcpp } // namespace gcpp