A couple of facts to start things off
From official "Inline PTX Assembly in CUDA":
The compiler front end does not parse the asm() statement template string and does not know what it means or even whether it is valid PTX input
And second, less well-known one: order of instruction's attributes (except types of operand) is not important
The combination of these facts leads to stark conclusion - CUDA compiler front-ends totally ignore PTX inline asm and only PTXAS known how to parse them. For example cuKLEE does this wrong
So I made simple (and hopefully fast) parser of PTX instructions
Note: this is not full featured replacement of PTX parser. it is designed specifically to extract instruction attributes and determine the correct instruction form based on argument types and counts
cvt.bf16x2.e5m2x2.rn.relu.scaled::n2::ue8m0.satfinite d, a, scale-factor;output will be something like
tail: d, a, scale-factor;
3 tail operands
--> cvt
line 71: 01x E32Q16
--- types 2:
bf16x2
e5m2x2
--- attrs 4:
1:5 satfinite
2:7 scaled::n2::ue8m0
1:0 relu
3:3 rn