I read the source code of tensorflow on github and find gen_math_ops is imported.
from tensorflow.python.ops import gen_math_ops
However, i
It's automatically generated by tf_gen_op_wrapper_* rules here.
tf_gen_op_wrapper_*
Also you can use ?? in your IPython notebook to find location