Thanks, @derisavi @sgrechanik-h for putting in your thoughts. Let me try to summarize the trade-offs dimensions so far.
## Power of simplification - They are going to be similar because in most cases divisors are positive. - Floordiv and euclidean div are the same when divisors are positive. ## Consistency with Existing Choices - Floordiv is used by python, which means we could in the future change operator overload in python to make use of it for better consistency. - Euclidean div is used by Halide and smt-libs. - Floordiv seems was used by isl and MLIR. ## Developer familarity Floordiv is relatively easier to explain, and can be written as ```floor(a/b)```. Low-level compiler developers might be able to understand both after some time. ## Cost of Lowering Need to think about the cost of lowering: - When both signs of dividend and divisor are known, can lower to trunc div - When sign of divisor is known, floordiv and eucildean div are can have the same rule. - A bit unclear when the sign of divisor is unknown, which I hope would never happen, but need to discuss the rules. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dmlc/tvm/issues/3478#issuecomment-508822339