| 26 | |
| 27 | template<typename T> |
| 28 | void Decoding<T>::initialize() |
| 29 | { |
| 30 | decoder_ = new Decoder<T>(max_batch_size_ * beam_width_, |
| 31 | head_num_, |
| 32 | size_per_head_, |
| 33 | inter_size_, |
| 34 | num_layer_, |
| 35 | stream_, |
| 36 | cublas_wrapper_, |
| 37 | allocator_, |
| 38 | is_free_buffer_after_forward_); |
| 39 | |
| 40 | dynamic_decode_layer_ = new DynamicDecodeLayer<DynamicDecodeType>(vocab_size_, |
| 41 | vocab_size_padded_, |
| 42 | end_id_, |
| 43 | stream_, |
| 44 | cublas_wrapper_, |
| 45 | allocator_, |
| 46 | is_free_buffer_after_forward_, |
| 47 | cuda_device_prop_); |
| 48 | } |
| 49 | |
| 50 | template<typename T> |
| 51 | void Decoding<T>::allocateBuffer() |
nothing calls this directly
no outgoing calls
no test coverage detected