How to set te.compute out tensor fp16?

I have following code:

WE = te.placeholder((W, K, N), dtype='float16', name="Weights")
    packWE = te.compute(
        (K // kc, N // stride, kc, weights_num, stride),
        lambda xo, y, xi, w, z: WE[w, xo * kc + xi, y * stride + z],
        name="B",
    )

the packWE is caculated from WE, I have WE which type is float16, I wanto packWE to be float32 how to set it?

What if I want WE to be float16, will it automatically infer the type?