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

Method isValidBatchSize

src/fastertransformer/models/decoder/Decoder.cc:104–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103template<typename T>
104bool Decoder<T>::isValidBatchSize(size_t batch_size)
105{
106 if (max_batch_size_ == 0) {
107 max_batch_size_ = batch_size;
108 return true;
109 }
110 else {
111 return batch_size <= max_batch_size_;
112 }
113}
114
115template<typename T>
116Decoder<T>::Decoder(size_t max_batch_size,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected