@Nathan_Wood
To my knowledge, we don’t have such mechanism.
This is to me not a type cast, but a memory cast. In your example, you have 16 bytes originally, and you want the first half act like four float16 and second half act like two float 32.
from_blob doesn’t support mixed data type copy as well.
What you can do here is to convert a and b to two new tensors with correct type and do your process and then write the processed data back to x_gpu from a and b (I assume the output is still a and b as example), all using their data ptr, so you control how you want to copy (your tensor should be contiguous).