Skip to content

Commit 741bbc9

Browse files
authored
Revert "am: queues allocated on gpus (tinygrad#8836)" (tinygrad#8837)
This reverts commit 7bbb568.
1 parent 7bbb568 commit 741bbc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tinygrad/runtime/ops_amd.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def _map_pci_range(self, bar, off=0, addr=0, size=None):
502502
return to_mv(fd.mmap(addr, sz, mmap.PROT_READ | mmap.PROT_WRITE, mmap.MAP_SHARED | (MAP_FIXED if addr else 0), off), sz)
503503

504504
def alloc(self, size:int, host=False, uncached=False, cpu_access=False):
505-
if host or (not getenv("AMD_ALLOC_QUEUE_DEV_MEM", 1) and uncached and cpu_access): # host or gtt-like memory.
505+
if host or (uncached and cpu_access): # host or gtt-like memory.
506506
vaddr = self.adev.mm.alloc_vaddr(size:=round_up(size, mmap.PAGESIZE), align=mmap.PAGESIZE)
507507
va = HWInterface.anon_mmap(vaddr, size, mmap.PROT_READ | mmap.PROT_WRITE, mmap.MAP_SHARED | mmap.MAP_ANONYMOUS | MAP_LOCKED | MAP_FIXED, 0)
508508

@@ -564,7 +564,7 @@ def __init__(self, device:str=""):
564564
if self.target < 100300 or self.target >= 120000: raise RuntimeError(f"Unsupported arch: {self.arch}")
565565

566566
if AMDDevice.signals_page is None:
567-
AMDDevice.signals_page = self.dev_iface.alloc(16 * 65536, host=True, uncached=True, cpu_access=True)
567+
AMDDevice.signals_page = self.dev_iface.alloc(16 * 65536, uncached=True, cpu_access=True)
568568
AMDDevice.signals_pool = [AMDDevice.signals_page.va_addr + off for off in range(0, AMDDevice.signals_page.size, 16)]
569569
else: self.dev_iface.map(AMDDevice.signals_page)
570570

0 commit comments

Comments
 (0)