Skip to content

Commit

Permalink
fix format (hpcaitech#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuer867 authored and binmakeswell committed Apr 6, 2022
1 parent d3d5bed commit 5ecef13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions colossalai/kernel/cuda_native/csrc/kernels/include/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "cuda_util.h"

class Context {
public:
public:
Context() : _stream(nullptr) {
CHECK_GPU_ERROR(cublasCreate(&_cublasHandle));
}
Expand All @@ -30,7 +30,7 @@ class Context {

cublasHandle_t get_cublashandle() { return _cublasHandle; }

private:
private:
cudaStream_t _stream;
cublasHandle_t _cublasHandle;
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

#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 @@ -23,7 +22,7 @@ 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

0 comments on commit 5ecef13

Please sign in to comment.