Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

#include "cuda_util.h"

template <typename T> class CrossEntropyLayer {
public:
template <typename T>
class CrossEntropyLayer {
public:
CrossEntropyLayer(float epsilon, int padding_idx, int max_batch_tokens);

virtual ~CrossEntropyLayer();
Expand All @@ -22,7 +23,7 @@ template <typename T> class CrossEntropyLayer {

void set_cur_batch_shape(int batch_size, int seq_len, int vocab_size);

private:
private:
void allocate_mem_buffer() {
// allocate local gpu memory
_loss_buffer = cuda_malloc<float>(_max_batch_tokens * 2);
Expand Down