cloudcores / CuAssembler

An unofficial cuda assembler, for all generations of SASS, hopefully :)
MIT License
361 stars 66 forks source link

Errors on CUDA 11.6 #7

Closed wpybtw closed 1 year ago

wpybtw commented 2 years ago

Hi, I tried to use CuAssembler on the sample CuTest code. It works well on the build-in cubin files. However, when I recompiled it using NVCC11.6 and the same arguments, the new cubin file can not be disassembled correctly and gots the following error:

 2022-05-12 23:33:29,857 -          - Running CubinFile.loadCubin...
2022-05-12 23:33:29,857 -    ENTRY -     Loading cubin file cudatest.sm_75.cubin...
2022-05-12 23:33:29,858 -    ERROR - Abnormal elf layout detected! No program header found!
Traceback (most recent call last):
  File "a.py", line 4, in <module>
    cf = CubinFile(binname)
  File "/home//sync_test/CuAssembler/CuAsm/CubinFile.py", line 28, in __init__
    self.loadCubin(cubinname)
  File "/home//sync_test/CuAssembler/CuAsm/CuAsmLogger.py", line 143, in wrapper
    ret = func(*args, **kwargs)
  File "/home//sync_test/CuAssembler/CuAsm/CubinFile.py", line 72, in loadCubin
    raise Exception(msg)
Exception: Abnormal elf layout detected! No program header found!

Any plan to support new compilers?

cloudcores commented 2 years ago

New cuda compiler removed the ELF program header info, thus changed the default ELF layout. But the ELF seems still work right without those program headers. I've updated the CubinFile.py to ignore it.