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

Method isValidSeqLen

src/fastertransformer/models/decoding/Decoding.cc:154–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153template<typename T>
154bool Decoding<T>::isValidSeqLen(size_t seq_len)
155{
156 if (max_seq_len_ == 0) {
157 // allocater additional one to put the start token
158 max_seq_len_ = seq_len + 1;
159 return true;
160 }
161 else {
162 return seq_len <= max_seq_len_;
163 }
164}
165
166template<typename T>
167bool Decoding<T>::isValidMemSeqLen(size_t seq_len)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected