mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-23 13:58:00 -05:00
nv: return real struct in _alloc_boot_struct (#11130)
This commit is contained in:
@@ -127,7 +127,7 @@ class NVDev(PCIDevImplBase):
|
||||
def _alloc_boot_struct(self, struct):
|
||||
va, paddrs = System.alloc_sysmem(sz:=ctypes.sizeof(type(struct)), contiguous=True)
|
||||
to_mv(va, sz)[:] = bytes(struct)
|
||||
return struct, paddrs[0]
|
||||
return type(struct).from_address(va), paddrs[0]
|
||||
|
||||
def _download(self, file) -> str:
|
||||
url = f"https://raw.githubusercontent.com/NVIDIA/open-gpu-kernel-modules/e8113f665d936d9f30a6d508f3bacd1e148539be/{file}"
|
||||
|
||||
Reference in New Issue
Block a user