about FP16 and texture

I am trying to access 4-D matrix. The 4th dimension is 2.
My question is whether it is possible to combine 2 FP16 values into one FP32 in texture application. If it is ok, I can reduce the dimension of the matrix from 4 to 3.
In the texture, I don’t need to do the interpolation. I can use cudaFilterModePoint.

Thanks a lot.

In that case I’m not sure there is any need to use a floating point texture.

For FP16 there is a half2 vector type already defined. Conversion from say a 32-bit unsigned quantity to half2 should be trivial - reinterpret_cast.

You can then access the half quantities separately.

A texture read on an underlying 32-bit unsigned data set should be possible.

I’m sure you could do the same thing between FP32 and FP16, as well.