quantize : fail fast on write errors (#3521)

This commit is contained in:
cebtenzzre 2023-10-07 04:41:52 -04:00 committed by GitHub
parent c26765a0a1
commit f1782c68de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7194,6 +7194,7 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s
}
std::ofstream fout(fname_out, std::ios::binary);
fout.exceptions(std::ofstream::failbit); // fail fast on write errors
const size_t meta_size = gguf_get_meta_size(ctx_out);