From f46d0f982c58ad8204d0db9660fe24ad80a1b972 Mon Sep 17 00:00:00 2001 From: YdrMaster Date: Thu, 2 Jan 2025 09:53:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20infini=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20async=20h2d=20copy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: YdrMaster --- models/llama/infini/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/llama/infini/src/lib.rs b/models/llama/infini/src/lib.rs index c0a5176..1980945 100644 --- a/models/llama/infini/src/lib.rs +++ b/models/llama/infini/src/lib.rs @@ -133,13 +133,12 @@ impl H2DLoader { } fn load(&mut self, host: Contiguous, stream: &Stream) -> DevBlob { - let device = stream.get_device(); self.event.synchronize(); match host { Contiguous::Borrowed(host) => self.host.copy_from_slice(host), Contiguous::Owned(host) => self.host = host, }; - device.memcpy_h2d(&mut self.dev, &self.host); + stream.memcpy_h2d(&mut self.dev, &self.host); stream.record(&mut self.event); replace(&mut self.dev, stream.malloc::(self.host.len())) }