| 547 | |
| 548 | template <typename Backend> |
| 549 | DLDevice GetDLDevice(const Tensor<Backend> &tensor) { |
| 550 | if constexpr (std::is_same_v<Backend, GPUBackend>) |
| 551 | return { kDLCUDA, tensor.device_id() }; |
| 552 | else |
| 553 | return { tensor.is_pinned() ? kDLCUDAHost : kDLCPU }; |
| 554 | } |
| 555 | |
| 556 | template <typename Backend> |
| 557 | DLMTensorPtr ToDLMTensor(Tensor<Backend> &tensor, |
no test coverage detected