Skip to content

LLM inference in C/C++

C++ ggml

hexagon: fix CPY fence bug (#28033)

Shenghan Yang9723942adc51
diff --git a/ggml/src/ggml-hexagon/htp/cpy-ops.c b/ggml/src/ggml-hexagon/htp/cpy-ops.c
index 15bc8dc244..c945425dab 100644
--- a/ggml/src/ggml-hexagon/htp/cpy-ops.c
+++ b/ggml/src/ggml-hexagon/htp/cpy-ops.c
@@ -330,7 +330,7 @@ int op_cpy(struct htp_ops_context * octx) {
}
const struct htp_tensor *sync = octx->src[1];
- if (sync) {
+ if (sync && (sync->flags & HTP_TENSOR_FENCE)) {
if (!use_dma) {
// htp_tensor_flush_all(octx->ctx, octx->dsts, 1);
qurt_mem_cache_clean((qurt_addr_t) 0, 0, QURT_MEM_CACHE_FLUSH_INVALIDATE_ALL, QURT_MEM_DCACHE);