[PTX] Should we keep backward-compatibility of PTX?

Hi Justin,

There are some backward incompatible features of PTX; for example,
special registers are redefined as v4i32 (they were v4i16) in PTX 2.0.
And CUDA 4.0 was rolled out last week. I heard that some instructions
are deprecated.

I am not sure how stable (or unstable) PTX specification is. Do you
have a rough assessment of its stability?

If PTX specification is still fast evolving, I would suggest we keep
up with latest specification, and consider backward compatibility
later when it is stabilized. What do you think?

Regards,
Che-Liang

Hi Justin,

There are some backward incompatible features of PTX; for example,
special registers are redefined as v4i32 (they were v4i16) in PTX 2.0.
And CUDA 4.0 was rolled out last week. I heard that some instructions
are deprecated.

I have not checked out CUDA 4.0 yet, but any deprecated instructions would need to be made so as part of a separate PTX version, either 2.2 or 3.0.

My suggestion is to stay thorough with the intrinsics. Lets create i16 and i32 versions of both, and emit appropriate cvt instructions if necessary for the target PTX version. This should be easy enough using the existing PTXVersion field in PTXSubtarget.

I am not sure how stable (or unstable) PTX specification is. Do you
have a rough assessment of its stability?

From what I can tell, it is fairly stable. When things change, they seem to primarily be additions to the ISA.

If PTX specification is still fast evolving, I would suggest we keep
up with latest specification, and consider backward compatibility
later when it is stabilized. What do you think?

I’m fine with that, as long as later PTX versions do not require later shader models. I want to maintain compatibility as far back as shader model 1.0 for some older hardware I want to test with. Besides, I think most of the functionality in newer PTX versions can be easily predicated with sub-target flags.