| 41 | namespace { |
| 42 | |
| 43 | bool IsCPUScalarTensor(const std::shared_ptr<Tensor>& tensor) { |
| 44 | return tensor->shape()->NumAxes() == 0 |
| 45 | && TensorDeviceToString(tensor).find("cpu") != std::string::npos; |
| 46 | } |
| 47 | |
| 48 | } // namespace |
| 49 |
no test coverage detected