Skip to content

Commit b6072fa

Browse files
committed
sync with upstream llama.cpp and sync ggml-hexagon.cpp from project kantv
1 parent 7b00b51 commit b6072fa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ggml/src/ggml-hexagon/ggml-hexagon.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ static constexpr const qnn_op_caps ggmlqnn_k_op_caps[] = {
654654
{false, GGML_OP_CONV_TRANSPOSE_1D, 0, nullptr},
655655
{false, GGML_OP_IM2COL, 0, nullptr},
656656
{false, GGML_OP_IM2COL_BACK, 0, nullptr},
657+
{false, GGML_OP_CONV_2D_DW, 0, nullptr},
657658
{false, GGML_OP_CONV_TRANSPOSE_2D, 0, nullptr},
658659
{false, GGML_OP_POOL_1D, 0, nullptr},
659660
{false, GGML_OP_POOL_2D, 0, nullptr},
@@ -760,6 +761,7 @@ static constexpr const hexagon_op_caps ggmlhexagon_k_op_caps[] = {
760761
{false, GGML_OP_CONV_TRANSPOSE_1D, 0, nullptr, nullptr},
761762
{false, GGML_OP_IM2COL, 0, nullptr, nullptr},
762763
{false, GGML_OP_IM2COL_BACK, 0, nullptr, nullptr},
764+
{false, GGML_OP_CONV_2D_DW, 0, nullptr, nullptr},
763765
{false, GGML_OP_CONV_TRANSPOSE_2D, 0, nullptr, nullptr},
764766
{false, GGML_OP_POOL_1D, 0, nullptr, nullptr},
765767
{true, GGML_OP_POOL_2D, 1, "ggmlop_dsp_pool2d", ggmlop_dsp_pool2d},
@@ -5574,13 +5576,21 @@ static bool ggmlhexagon_can_handle_op_through_cdsp(ggml_backend_dev_t dev, const
55745576
const ggml_tensor * src0 = op_tensor->src[0];
55755577
const ggml_tensor * src1 = op_tensor->src[1];
55765578
const int src0_rank = ggml_n_dims(src0);
5579+
const int64_t ne00 = src0->ne[0];
55775580
int src1_rank = 0;
55785581
if (nullptr != src1) {
55795582
src1_rank = ggml_n_dims(src1);
55805583
}
55815584
switch (op_tensor->op) {
55825585
case GGML_OP_ADD:
55835586
{
5587+
//TODO:workaround approach to fix HWACCEL_CDSP can't works in ASR inference and LLM inference
5588+
// with some LLM models in a standard Android APP
5589+
// one more thing, I think the latest QNN SDK's internal also use the similar approach
5590+
if (ne00 < 1024) {
5591+
return false;
5592+
}
5593+
55845594
if (!ggml_are_same_shape(src0, src1)) {
55855595
return false;
55865596
}

0 commit comments

Comments
 (0)