rename HWInterface -> FileIOInterface (#9989)

* rename HWInterface -> FileIOInterface

* ugh
This commit is contained in:
nimlgen
2025-04-22 22:18:57 +03:00
committed by GitHub
parent c1539b0319
commit db51133537
8 changed files with 69 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
import ctypes, ctypes.util, time, os, builtins, fcntl
from tinygrad.runtime.support.hcq import HWInterface
from tinygrad.runtime.support.hcq import FileIOInterface
from test.mockgpu.nv.nvdriver import NVDriver
from test.mockgpu.amd.amddriver import AMDDriver
start = time.perf_counter()
@@ -53,7 +53,7 @@ def _open(path, flags):
return virtfd.fd
return os.open(path, flags, 0o777) if os.path.exists(path) else None
class MockHWInterface(HWInterface):
class MockFileIOInterface(FileIOInterface):
def __init__(self, path:str="", flags:int=os.O_RDONLY, fd:int|None=None):
self.path = path
self.fd = fd or _open(path, flags)