MCPcopy Create free account
hub / github.com/UbiquitousLearning/mllm / getExtraTensorViewInTensor

Method getExtraTensorViewInTensor

mllm/core/Tensor.cpp:113–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113Tensor 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
120Tensor Tensor::zeros(const std::vector<int32_t>& shape, DataTypes dtype, DeviceTypes device) {
121 auto i = Tensor::empty(shape, dtype, device).alloc();

Callers 1

Calls 2

atMethod · 0.80
TensorClass · 0.70

Tested by

no test coverage detected