Hello there.
I found problem in inline ptx.
This code will work incorrect:
asm(“bra $label;\n”);
asm(“$label:\n”
“mov.s32 %reg, %0;\n” :: “r”(1234));
in ptx it will:
bra $label;
mov %r, 1234;
$label:
mov.s32 %reg, %r;
1234 will not be loaded to %reg, because program jump across parameters initialization. Is it bug or feature? Maybe more correctly load asm parameters before each instruction or, in the last resort send compilation warning?
Regards.