Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/vllm/model_executor/models/qwen3_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4016,7 +4016,13 @@ GdnQkvzOutput ProjectGdnQkvz(Dev d, const GdnLayerWeights& w, const Tensor& h,
vt::tenstorrent::DebugDeviceReadbackF32(d.q, wt);
std::FILE* f2 = std::fopen((dir + "/w_device.bin").c_str(), "wb");
if (f2) {
std::fwrite(vec.data(), 4, vec.size(), f2);
// issue #2021: `vec` may be empty, in which case `data()` may
// return `nullptr` -- well-defined for a size-0 `fwrite` by the
// C standard, but `fwrite`'s `nonnull` attribute makes GCC 15
// flag the call itself under -Werror=nonnull regardless of the
// runtime size. Guard rather than silence: there is nothing to
// write for an empty readback either way.
if (!vec.empty()) std::fwrite(vec.data(), 4, vec.size(), f2);
std::fclose(f2);
}
}
Expand Down
Loading