min, max: check that operand and outputs are on the same device type (#32862)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/32001
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32862
Differential Revision: D19695935
Pulled By: ezyang
fbshipit-source-id: bb37eb7a187214aa69259828024366f479a258d7