]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
CUDA: Do not mutate cgraph for fused ADDs (llama/19566)
authorOliver Simons <redacted>
Fri, 13 Feb 2026 09:37:55 +0000 (10:37 +0100)
committerGeorgi Gerganov <redacted>
Sat, 14 Feb 2026 22:20:18 +0000 (00:20 +0200)
commit2285fa5abbd3be7d3c333cf120aa59d0b54638a6
treeb2ebd0115e2e414e93bd6a5dc37d03d7a25ed87d
parent58964778a57243ec0fd50c9c3a01aece6def0692
CUDA: Do not mutate cgraph for fused ADDs (llama/19566)

* Do not mutate cgraph for fused ADDs

1. We should try to minimize in-place changes to the incoming
   ggml_cgraph where possible (those should happen in graph_optimize)
2. Modifying in-place leads to an additional, unnecessary graph capture
   step as we store the properties before modifying the graph in-place
   in the cuda-backend

* Assert ggml_tensor is trivially copyable

* Update ggml/src/ggml-cuda/ggml-cuda.cu

Co-authored-by: Aman Gupta <redacted>
---------

Co-authored-by: Aman Gupta <redacted>
src/ggml-cuda/ggml-cuda.cu