fix: clarify lora quant support and small fixes (#792)

This commit is contained in:
Markus Hartung
2025-09-08 16:39:25 +02:00
committed by GitHub
parent c648001030
commit abb115cd02
5 changed files with 49 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <filesystem>
#include <functional>
#include <iostream>
#include <map>
@@ -1283,6 +1284,21 @@ int main(int argc, const char* argv[]) {
}
}
// create directory if not exists
{
namespace fs = std::filesystem;
const fs::path out_path = params.output_path;
if (const fs::path out_dir = out_path.parent_path(); !out_dir.empty()) {
std::error_code ec;
fs::create_directories(out_dir, ec); // OK if already exists
if (ec) {
fprintf(stderr, "failed to create directory '%s': %s\n",
out_dir.string().c_str(), ec.message().c_str());
return 1;
}
}
}
std::string base_path;
std::string file_ext;
std::string file_ext_lower;