mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-24 06:18:01 -05:00
hcq check queue size before submit (#6481)
This commit is contained in:
@@ -315,7 +315,7 @@ class HWCommandQueue:
|
||||
Args:
|
||||
device: The device to submit the queue to
|
||||
"""
|
||||
self._submit(device)
|
||||
if self.q: self._submit(device)
|
||||
return self
|
||||
def _submit(self, device:HCQCompiled): raise NotImplementedError("backend should overload this function")
|
||||
|
||||
|
||||
@@ -109,8 +109,6 @@ class NVCommandQueue(HWCommandQueue): # pylint: disable=abstract-method
|
||||
self.q = hw_view # type: ignore
|
||||
|
||||
def _submit_to_gpfifo(self, dev, gpfifo:GPFifo):
|
||||
if len(self.q) == 0: return
|
||||
|
||||
if dev == self.binded_device: cmdq_addr = self.hw_page.va_addr
|
||||
else:
|
||||
if dev.cmdq_wptr + len(self.q) * 4 > dev.cmdq_page.size:
|
||||
|
||||
Reference in New Issue
Block a user