How does "*" work in multiplication?

I know * could work as Z = X * Y in matrix element-wise multiplication and Y could also be a scalar here.

However, where is this overload implemented? I tried to debug in Python on this line Z = X * Y but I could not step in any deeper. I want to know how this is overloaded.

PS: I tried to multiply a quantized weight of QInt8 dtype and a float scalar and it directly raised
promoteTypes with quantized numbers is not handled yet; figure out what the correct rules should be, offending types: QInt8 Float
, which is in C++ code. But the debugger could not show any detail. I think understanding this implementation of multiplication would be benificial for this issue.