0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00

Compare commits

..

1 commit

Author SHA1 Message Date
erwanvivien
1a26a051a5
zml/tensor: return a distinct tensor from toMemory on single-memory platforms (#1087)
On cpu, neuron and metal, `toMemory` returned self. Donating a result to
a device buffer and its `toMemory` copy to a host buffer then called
`reuseBuffer` twice on the same tensor id: the second donation replaced
the first, and compilation panicked because both outputs aliased the
host buffer. This broke llmd async scheduling on Metal and CPU.

Return the same value under a new tensor id instead.
2026-11-16 14:17:19 +01:00
10 changed files with 19 additions and 95 deletions