mirror of https://github.com/commaai/tinygrad.git
fix hip del on compile fail (#2163)
* fix hip del on compile fail * the test doesn't actually work
This commit is contained in:
parent
8cf0bb9351
commit
7f4f925385
|
@ -80,13 +80,13 @@ class RawHIPBuffer(RawBufferCopyInOut, RawBufferTransfer):
|
|||
|
||||
class HIPProgram:
|
||||
def __init__(self, name:str, prg:str, binary=False):
|
||||
self.modules, self.prgs = [], []
|
||||
prg = prg if binary else self.compile(prg, name)
|
||||
|
||||
if DEBUG >= 6:
|
||||
asm = early_exec((["/opt/rocm/llvm/bin/llvm-objdump", '-d', '-'], prg))
|
||||
print('\n'.join([x for x in asm.decode('utf-8').split("\n") if 's_code_end' not in x]))
|
||||
|
||||
self.modules, self.prgs = [], []
|
||||
for i in range(HIP.device_count):
|
||||
hip.hipSetDevice(i)
|
||||
self.modules.append(hip.hipModuleLoadData(prg))
|
||||
|
|
Loading…
Reference in New Issue