Which step is appropriate for rewriting `multiply` to `saturate multiply` in tvm codegen

Recently I’m working on model quantization.

I have two goals:

  1. multiply(int8_a, int8_b) ->int8_c ====> saturate_multiply(int8_a, int8_b) -> int8_c. Making multiply operation in model to saturate multiply
  2. multiply(int8_a, float32_b) ->int8_c ====> saturate_multiply(int8_a, float32_b) -> int8_c

Which step is most appropriate for rewriting multiply in relay --> net.so process.