@@ -502,7 +502,7 @@ def _map_pci_range(self, bar, off=0, addr=0, size=None):
502
502
return to_mv (fd .mmap (addr , sz , mmap .PROT_READ | mmap .PROT_WRITE , mmap .MAP_SHARED | (MAP_FIXED if addr else 0 ), off ), sz )
503
503
504
504
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.
506
506
vaddr = self .adev .mm .alloc_vaddr (size := round_up (size , mmap .PAGESIZE ), align = mmap .PAGESIZE )
507
507
va = HWInterface .anon_mmap (vaddr , size , mmap .PROT_READ | mmap .PROT_WRITE , mmap .MAP_SHARED | mmap .MAP_ANONYMOUS | MAP_LOCKED | MAP_FIXED , 0 )
508
508
@@ -564,7 +564,7 @@ def __init__(self, device:str=""):
564
564
if self .target < 100300 or self .target >= 120000 : raise RuntimeError (f"Unsupported arch: { self .arch } " )
565
565
566
566
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 )
568
568
AMDDevice .signals_pool = [AMDDevice .signals_page .va_addr + off for off in range (0 , AMDDevice .signals_page .size , 16 )]
569
569
else : self .dev_iface .map (AMDDevice .signals_page )
570
570
0 commit comments