Thanks @kparzysz . I believe the argument can go both ways in here. If we view 
the overall IR as "staged",  lowering means we have a strategy to map them to 
the corresponding low level intrinsics.

 While legalization means we remap the op by composing using other expressions, 
which still need to be lowered in order to remain valid in the target platform.

For example, mapping  `exp => llvm.exp` is a way of lowering, but because llvm 
does not have `sigmoid`, imagine we have a sigmoid op, mapping `sigmoid(x)=>1 
/(1 + exp(-x))` will be called legalization, and we still need to map the exp 
to `llvm.exp` after legalize in order to run on the target platform.





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/is-there-a-difference-between-lower-and-legalize-in-tir/10714/9)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/99b86cfdb99cb42cce3b70e15b8beffbb78ba6689263bd6dd8d5a968698d1ab3).

Reply via email to