mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Revert "Make device check error message more descriptive (#150750)"
This reverts commit 8253970a1f.
Reverted https://github.com/pytorch/pytorch/pull/150750 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it seems to cause a test to fail in trunk ([comment](https://github.com/pytorch/pytorch/pull/150750#issuecomment-2853438985))
This commit is contained in:
parent
460888f908
commit
451d652873
|
|
@ -5,8 +5,9 @@ namespace c10::impl {
|
|||
|
||||
void common_device_check_failure(Device common_device, const at::Tensor& tensor, at::CheckedFrom methodName, at::CheckedFrom argName) {
|
||||
TORCH_CHECK(false,
|
||||
"Expected all tensors to be on the same device, but got ", argName, " is on ", tensor.device(),
|
||||
", different from other tensors on ", common_device, " (when checking argument in method ", methodName, ")");
|
||||
"Expected all tensors to be on the same device, but "
|
||||
"found at least two devices, ", common_device, " and ", tensor.device(), "! "
|
||||
"(when checking argument for argument ", argName, " in method ", methodName, ")");
|
||||
}
|
||||
|
||||
} // namespace c10::impl
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user