hcq check queue size before submit (#6481)

This commit is contained in:
nimlgen
2024-09-11 23:13:13 +03:00
committed by GitHub
parent dda5c63f4a
commit eac046ea55
2 changed files with 1 additions and 3 deletions

View File

@@ -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")

View File

@@ -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: