Skip to content

Commit

Permalink
Merge branch 'develop' into develop-lx
Browse files Browse the repository at this point in the history
  • Loading branch information
lx200916 authored Nov 30, 2023
2 parents e8ba266 + 9d63e57 commit b8da847
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ enum DataType {
MLLM_TYPE_COUNT,
};
enum ChlType {
BHSD = 0,
BSHD = 1,
BSHD = 0,
BHSD = 1,
};

enum Chl {
Expand Down
17 changes: 9 additions & 8 deletions src/Tensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ class Tensor {
// inline int offset(const int n, const int c = 0, const int h = 0,
// const int w = 0) const {
// CHECK_GE(n, 0);
// CHECK_LE(n, num());
// CHECK_GE(channels(), 0);
// CHECK_LE(c, channels());
// CHECK_GE(height(), 0);
// CHECK_LE(h, height());
// CHECK_GE(width(), 0);
// CHECK_LE(w, width());
// return ((n * channels() + c) * height() + h) * width() + w;
// CHECK_LE(n, batch());
// CHECK_GE(head(), 0);
// CHECK_LE(c, head());
// CHECK_GE(sequence(), 0);
// CHECK_LE(h, sequence());
// CHECK_GE(dimension(), 0);
// CHECK_LE(w, dimension());
// return ((n * head() + c) * sequence() + h) * dimension() + w;
// }
inline int offset(const int b, const int h = 0, const int s = 0,
const int d = 0) const {
Expand Down Expand Up @@ -536,6 +536,7 @@ class Tensor {
// TODO:Name?



template <class Dtype>
void fullData(Dtype value) {
for (int n = 0; n < batch(); ++n) {
Expand Down
3 changes: 2 additions & 1 deletion src/backends/cpu/CPUKVCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class CPUKVCache final : public Op {

private:
bool support_multi_thread_ = false;
int cache_seq_len_= -INFINITY;

int cache_seq_len_= -999;
bool isK_;

int cache_limit_ ;
Expand Down

0 comments on commit b8da847

Please sign in to comment.