You misunderstood my example. You don’t need unpackbits or anything like that to pass data from CuPy to Pytorch. That was just something I wanted to do.
>>> t1 = torch.cuda.ByteTensor([2, 22, 222])
>>> c1 = cupy.asarray(t1)
>>> t2 = torch.as_tensor(c, device="cuda")
>>> c2 = cupy.asarray(t2)

>>> t1
tensor([  2,  22, 222], device='cuda:0', dtype=torch.uint8)
>>> t2
tensor([  2,  22, 222], device='cuda:0', dtype=torch.uint8)
>>> c1
array([  2,  22, 222], dtype=uint8)
>>> c2
array([  2,  22, 222], dtype=uint8)

Note the dtype is preserved.