Any way to change float32 tensor to Int16 in te?

I’m trying to build a new operator in te, in which i need to quantify the data from float32 to int16. My quantization method is simple: data/scale.

But I’m having trouble converting float32 data to int16. If use tir.Cast, then Ansor cannot automatically optimize operators.

Is there any way to quantify variables at TE Level and automatically optimize them later using Ansor ?