Hi,
I've encountered two problems. Both are possible to replicate with the microbench application code by extracting the sass code and then trying to insert the unmodified code into the kernel again:
$ maxas.pl -e microbench.cubin microbench.sass
$ maxas.pl -i microbench.sass microbench.cubin
- When doing the insertion step, I get this:
Unable to encode instruction: MOV R1, c[0x0];
It seems like something goes wrong in the extraction step here, because the second argument should have two address fields. This is what nvdisasm returns: MOV R1, c[0x0][0x20];
The error is removed by adding [0x20].
I've seen this problem in all kernels I've been trying to insert after extracting them with maxas.
- After modifying the MOV-instruction, this is the output from the insertion step:
Unknown Code 0x10 (size:0)
Unknown Code 0x18 (size:0)
Unknown Code 0x00 (size:0)
Unknown Code 0x00 (size:0)
Modified microbench CTAID Offsets: '' => '0018,0028'
Modified microbench Exit Offsets: '00e8,0000,0000' => '0138'
Modified microbench ParamSecSize: 100 => 88
Kernel: microbench, Instructions: 0, Register Count: 10, Bank Conflicts: 0, Reuse: 21.1% (4/19)
It seems strange that all these parameters are modified when the kernel is unchanged. And indeed, when running the application with the modified cubin I get a segmentation fault. I've tried different kernels with the same result. This doesn't happen if I roll back maxas to the commit before the enhanced cubin support was added and try the exact same thing, so I guess something goes wrong when the offsets are modified.
Thanks!