[BUG]fix gh-2348

when constant are used, we use the smallest dtype for them. But this
isn't enought when computing on them. So upcast to int64 to make sure
compuration is right.