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

Method getValWithOffset

src/fastertransformer/utils/Tensor.h:430–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428
429 template<typename T>
430 inline T getValWithOffset(const std::string& key, size_t index) const
431 {
432 FT_CHECK_WITH_INFO(isExist(key),
433 fmtstr("Cannot find a tensor of name %s in the tensor map (keys: %s)",
434 key.c_str(),
435 vec2str(keys()).c_str()));
436 return tensor_map_.at(key).getVal<T>(index);
437 }
438
439 template<typename T>
440 inline T getValWithOffset(const std::string& key, size_t index, T default_value) const

Callers

nothing calls this directly

Calls 3

fmtstrFunction · 0.85
vec2strFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected