| 86 | } |
| 87 | |
| 88 | Tensor dnntensor_2_cctensor(const megdnn::TensorND& tensor, const char* name) { |
| 89 | Tensor res; |
| 90 | res.ptr = tensor.raw_ptr(); |
| 91 | res.dtype = dnndtype_2_ccdtype(tensor.layout.dtype); |
| 92 | res.layout = dnnlayout_2_cclayout(tensor.layout); |
| 93 | res.name = const_cast<char*>(name); |
| 94 | return res; |
| 95 | } |
| 96 | std::string to_string(Layout layout) { |
| 97 | std::stringstream ss; |
| 98 | ss << "["; |
no test coverage detected