mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
metal raise when command queue is not created (#6044)
* metal raise when command queue is not created * dont do that
This commit is contained in:
@@ -99,6 +99,8 @@ class MetalDevice(Compiled):
|
||||
def __init__(self, device:str):
|
||||
self.device = Metal.MTLCreateSystemDefaultDevice()
|
||||
self.mtl_queue = self.device.newCommandQueueWithMaxCommandBufferCount_(1024)
|
||||
if self.mtl_queue is None: raise RuntimeError("Cannot allocate a new command queue")
|
||||
|
||||
self.mtl_buffers_in_flight: List[Any] = []
|
||||
self.mv_in_metal: List[memoryview] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user