add device name to device, all are constructed (#3221)

This commit is contained in:
George Hotz
2024-01-23 20:34:56 -08:00
committed by GitHub
parent 91a1b2bd7a
commit 23b084e70a
10 changed files with 22 additions and 21 deletions

View File

@@ -94,7 +94,7 @@ class CLDevice(Compiled):
self.pending_copyin: List[memoryview] = []
compile_key = hashlib.md5(self.device_name.encode() + self.driver_version.encode()).hexdigest()
super().__init__(CLAllocator(self), LinearizerOptions("GPU"), OpenCLRenderer,
super().__init__(device, CLAllocator(self), LinearizerOptions("GPU"), OpenCLRenderer,
functools.partial(compile_cl, self), f"compile_cl_{compile_key}", functools.partial(CLProgram, self))
def synchronize(self):
check(cl.clFinish(self.queue))