It's not an immediate issue, but you are correct that we may potentially have CUDA 12.34 and that will mess up the integer version encoding.
In fact, NVIDIA hit exactly this kind of problem in CUDA-11.7 when they had to version some of the libraries as 11.10 and had to change the binary representation and break existing ABIs. Here we're only dealing with internal use, but I'll update the encoding to give us more wiggle room.
Indeed, previously it would set PTXVersion=32 if the specific ptx feature was not listed. I believe it was a bug as it would clobber correctly parsed features before it.
Right now we will only update PTXVersion, if we did manage to parse the feature. The code looks a bit misleading. getAsInteger() returns true on failure and when that happens, we hit continue w/o setting PTXVersion.
I was considering erroring out here, but that would be a problem if we were to have another feature starting with +ptx.
I've got rid of integer-encoded version altogether and switched to comparing VersionTuple directly.