xref: /aosp_15_r20/external/pytorch/aten/src/ATen/core/adaption.cpp (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #include <ATen/core/op_registration/adaption.h>
2 
3 
4 namespace c10::impl {
5 
common_device_check_failure(Device common_device,const at::Tensor & tensor,at::CheckedFrom methodName,at::CheckedFrom argName)6 void common_device_check_failure(Device common_device, const at::Tensor& tensor, at::CheckedFrom methodName, at::CheckedFrom argName) {
7   TORCH_CHECK(false,
8     "Expected all tensors to be on the same device, but "
9     "found at least two devices, ", common_device, " and ", tensor.device(), "! "
10     "(when checking argument for argument ", argName, " in method ", methodName, ")");
11 }
12 
13 } // namespace c10::impl
14