feat(模型加载): 添加sync_to_temp选项支持临时目录加载

添加sync_to_temp参数控制是否将模型文件复制到临时目录后再加载
This commit is contained in:
2026-01-27 13:54:05 +08:00
parent 36a77d3318
commit a577d38f95
7 changed files with 94 additions and 1 deletions

View File

@@ -314,6 +314,7 @@ extern "C" {
bool use_extra_bufts; // use extra buffer types (used for weight repacking)
bool no_host; // bypass host buffer allowing extra buffers to be used
bool no_alloc; // only load metadata and simulate memory allocations
bool sync_to_temp; // copy model to temporary directory before loading
};
// NOTE: changing the default values of parameters marked as [EXPERIMENTAL] may cause crashes or incorrect results in certain configurations