cloudcores / CuAssembler

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

Parsing of cuasm file failed #5

Closed benrothen closed 2 years ago

benrothen commented 2 years ago

Hi,

I ran into the following issue when trying to use CuAssembler:

Error when assembling instruction "[----:B------:R-:W-:Y:S04] SHF.L.W.U32.HI R11, R4, 0x13, R4 ;":("Assembling failed (NewModi): Unknown modifiers: ({'0_W'})",)

I am performing the following steps (without modifying the cuasm file): 1) disassemble my .cubin file into a .cuasm file using CuAsm.CubinFile 2) assemble .cuasm to .cubin using CuAsm.CuAsmParser

I checked the repo file and it should contain 0_W in the InsModiSet for SHF. In addition, I also tried to merge the repos file generated from my cuda binary with the default repos file for the sm_75 architecture and then use the updated repository in the CuAsmParser. But that doesn't seem to help.

Could you give me a hint on how to proceed with this error? Is this a limitation of the project in its current state?

Additional information on my setup:

- arch: sm_75
- OS: Ubuntu 20.04
- nvcc version: 10.1
cloudcores commented 2 years ago

Since the full list of modifiers is not available officially, there are inevitably some modifiers not supported in current release. And it seems you already get the way to update the repos with your own input.

What error it showes when you assemble the cuasm with your updated repos? It should be able to reproduce every instruction it learns from your sass. Did you find the updated repos containes the missing modifier for the corresponding InsKey? You may try to save your updated repos as file and replace the default file.

Note: An instance of CuInsAssembler only works for one InsKey(opcode+operand type). Thus you should check the assembler with the right key.