Skip to content

Commit

Permalink
Update progress
Browse files Browse the repository at this point in the history
  • Loading branch information
AyiStar committed Jul 27, 2024
1 parent e92ad41 commit 04a2ca4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Output a well-organized technical report.
#### Benchmarks
- [x] Add arguments with different types.
- [x] Prepare more model weights.
- [ ] Benchmark more models.
- [x] Benchmark more models.

#### Autotune
TBD
15 changes: 8 additions & 7 deletions src/lamm_kernel_q2_k.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ LA_INLINE void lamm_simd_block_kernel(const block_q2_K *a, const block_q8_K *b,

static_assert(B0 > 0 && B0 <= 4);
static_assert(B1 > 0 && B1 <= 4);
// std::cout << "Q2_K SIMD block called with B0=" << B0 << ", B1=" << B1 << std::endl;
// std::cout << "Q2_K SIMD block called with B0=" << B0 << ", B1=" << B1 <<
// std::endl;
using namespace simd;

const ivreg_t m3 = ivset(3);
Expand Down Expand Up @@ -281,12 +282,12 @@ LA_INLINE void lamm_simd_block_kernel(const block_q2_K *a, const block_q8_K *b,
#undef INNER_FN
#undef OUTER_FN

#define FN(N) \
if constexpr (B0 > N) { \
ai##N++; \
} \
if constexpr (B1 > N) { \
bj##N++; \
#define FN(N) \
if constexpr (B0 > N) { \
ai##N++; \
} \
if constexpr (B1 > N) { \
bj##N++; \
}
LOOP(FN, 4)
#undef FN
Expand Down
3 changes: 2 additions & 1 deletion src/loongarch_matmul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ void lamm_mul_mat(const struct ggml_compute_params *params,
C.col = ne11;
C.ld = nb1 / ggml_type_size(dst->type);

using MatMulFuncPtr = void(*)(const Matrix &A, const Matrix &B, const Matrix &C, int ith, int nth);
using MatMulFuncPtr = void (*)(const Matrix &A, const Matrix &B,
const Matrix &C, int ith, int nth);
MatMulFuncPtr mm_func = nullptr;
switch (A.type) {
case GGML_TYPE_F32:
Expand Down

0 comments on commit 04a2ca4

Please sign in to comment.