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

Method initialize

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

Source from the content-addressed store, hash-verified

26
27template<typename T>
28void 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
50template<typename T>
51void Decoding<T>::allocateBuffer()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected