cerebras.modelzoo.common.half_dtype.maybe_to_half_dtype#

cerebras.modelzoo.common.half_dtype.maybe_to_half_dtype(tensor)[source]#

Return tensor cast to half dtype if on CSX or autocast CPU/GPU ctx.