| 48 | } // namespace |
| 49 | |
| 50 | std::string TensorDeviceToString(const std::shared_ptr<Tensor>& tensor) { |
| 51 | if (tensor->is_global()) { return CHECK_JUST(tensor->parallel_desc())->device_tag(); } |
| 52 | return CHECK_JUST(tensor->device())->ToString(); |
| 53 | } |
| 54 | |
| 55 | Maybe<void> CastDeviceForCPUScalarTensor(std::shared_ptr<Tensor>& tensor, |
| 56 | std::shared_ptr<Tensor>& other, bool inplace) { |
no test coverage detected