| 111 | } |
| 112 | |
| 113 | Tensor Tensor::getExtraTensorViewInTensor(const std::string& extra_tensor_name) { |
| 114 | if (impl_->attachedViews().count(extra_tensor_name) != 1) { |
| 115 | MLLM_ERROR_EXIT(ExitCode::kCoreError, "Can't find {}", extra_tensor_name); |
| 116 | } |
| 117 | return Tensor(impl_->attachedViews().at(extra_tensor_name).second); |
| 118 | } |
| 119 | |
| 120 | Tensor Tensor::zeros(const std::vector<int32_t>& shape, DataTypes dtype, DeviceTypes device) { |
| 121 | auto i = Tensor::empty(shape, dtype, device).alloc(); |
no test coverage detected