mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
perf: reduce fused compute buffers (#2290)
This commit is contained in:
1 parent
9234ad822a
commit
5f8c19f98d
11 files changed
+425
-87
No files matched your search
@@ -277,7 +277,10 @@ namespace SD_CUDA_NAMESPACE {
|
||||
}
|
||||
|
||||
static ggml_status rope_prepare(ggml_backend_t, ggml_tensor* const* nodes, int count, void**, size_t* workspace, void*) {
|
||||
*workspace = ggml_nbytes(nodes[count - 1]);
|
||||
const auto* dst = nodes[count - 1];
|
||||
// Owning casts are fresh outputs; copies into existing storage retain view_src.
|
||||
const bool fresh_output = !dst->data && !dst->buffer && !dst->view_src;
|
||||
*workspace = fresh_output ? 0 : ggml_nbytes(dst);
|
||||
return GGML_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user