This commit is contained in:
George Hotz
2023-05-21 11:45:38 -07:00
parent ed038ba129
commit 81a11d891d
9 changed files with 144 additions and 13 deletions

View File

@@ -62,6 +62,8 @@ class CLProgram:
from disassemblers.adreno import disasm
disasm(self.binary())
elif 'gfx1100' in CL.cl_ctx.devices[0].name:
# NOTE: this can move, you have to read the ELF
#print(','.join([hex(x) for x in struct.unpack("I"*0x10, self.binary()[0x800:0x840])]))
asm = early_exec(([ROCM_LLVM_PATH / "llvm-objdump", '-d', '-'], self.binary()))
print('\n'.join([x for x in asm.decode('utf-8').split("\n") if 's_code_end' not in x]))
else: