MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / TensorMap

Method TensorMap

src/fastertransformer/utils/Tensor.cc:348–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348TensorMap::TensorMap(const std::unordered_map<std::string, Tensor>& tensor_map)
349{
350 for (auto& kv : tensor_map) {
351 if (isValid(kv.second)) {
352 insert(kv.first, kv.second);
353 }
354 else {
355 FT_LOG_DEBUG(fmtstr("%s is not a valid tensor, skipping insert into TensorMap", kv.first.c_str()));
356 }
357 }
358}
359
360TensorMap::TensorMap(const std::vector<Tensor>& tensor_map)
361{

Callers

nothing calls this directly

Calls 2

fmtstrFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected