mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-23 05:48:08 -05:00
qcom as_buffer (#6371)
This commit is contained in:
@@ -313,6 +313,10 @@ class QCOMAllocator(HCQAllocator):
|
||||
self.device.synchronize()
|
||||
ctypes.memmove(from_mv(dest), src.va_addr, dest.nbytes)
|
||||
|
||||
def as_buffer(self, src:HCQBuffer) -> memoryview:
|
||||
self.device.synchronize()
|
||||
return to_mv(src.va_addr, src.size)
|
||||
|
||||
def _free(self, opaque, options:BufferOptions):
|
||||
self.device.synchronize()
|
||||
self.device._gpu_free(opaque)
|
||||
|
||||
Reference in New Issue
Block a user