mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
2
extra/amdpci/am_smi.py
Normal file → Executable file
2
extra/amdpci/am_smi.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import time, mmap, sys, shutil, os, glob, subprocess
|
||||
from tinygrad.helpers import to_mv, DEBUG, colored, ansilen
|
||||
from tinygrad.runtime.autogen import libc
|
||||
|
||||
@@ -376,7 +376,7 @@ class AMDev:
|
||||
for ver in [version, version[:2]+[0], version[:1]+[0, 0]]:
|
||||
try: return __import__(f"tinygrad.runtime.autogen.am.{prefix}_{ver[0]}_{ver[1]}_{ver[2]}", fromlist=[f"{prefix}_{ver[0]}_{ver[1]}_{ver[2]}"])
|
||||
except ImportError: pass
|
||||
assert False, f"am {self.devfmt}: failed to load {prefix} module with version {version}"
|
||||
raise ImportError(f"am {self.devfmt}: failed to load {prefix} module with version {version}")
|
||||
|
||||
def _build_regs(self):
|
||||
mods = [("MP0", self._ip_module("mp", am.MP0_HWIP)), ("NBIO", self._ip_module("nbio", am.NBIO_HWIP)), ("GC", self._ip_module("gc", am.GC_HWIP)),
|
||||
|
||||
Reference in New Issue
Block a user