Skip to content

Commit

Permalink
补提交
Browse files Browse the repository at this point in the history
黄宇扬 committed Apr 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1407747 commit c773557
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/fastllm.cpp
Original file line number Diff line number Diff line change
@@ -690,7 +690,7 @@ namespace fastllm {
int st = g * this->groupCnt;
int end = std::min(m, (g + 1) * this->groupCnt);
int j = st;
#ifdef __aarch64__X
#ifdef __aarch64__
uint8x8_t maskHigh = vdup_n_u8(0xF0);
uint8x8_t maskLow = vdup_n_u8(0xF);
uint32x4_t sum0 = {0, 0, 0, 0};
@@ -705,7 +705,7 @@ namespace fastllm {

sum0 = vaddw_u16(sum0, vadd_u16(sa, sb));
}
weightSum[i] += sum0[0] + sum0[1] + sum0[2] + sum0[3];
weightSum[gid] += sum0[0] + sum0[1] + sum0[2] + sum0[3];
#endif
#ifdef __AVX2__X
__m256i acc = _mm256_setzero_si256();
@@ -2129,6 +2129,12 @@ namespace fastllm {
}, {}, {});
}

void LinearEx(Data &input, Data &weight, const Data &bias, Data &output, LinearExType exType) {
curExecutor->Run("Linear", {
{"input", &input}, {"weight", &weight}, {"bias", (Data*)&bias}, {"output", &output}
}, {}, {{"exType", (int)exType}});
}

void Split(const Data &input, int axis, int start, int end, Data &output) {
curExecutor->Run("Split", {
{"input", (Data*)&input}, {"output", &output}

0 comments on commit c773557

Please sign in to comment.