Why isn't data type an arguement while creating nn modules?

I was looking at code of Layer norm and the tensors are implicitly being assigned float32 data type.
Why has this been done?