Skip to content

Commit fe05c4f

Browse files
authored
Merge pull request #618 from chenghuaWang/wch-main
feat(core): Introduce kBool data type for Qnn ElewiseEqual Op
2 parents fe6c481 + 1dcf22e commit fe05c4f

15 files changed

Lines changed: 18 additions & 6 deletions

File tree

examples/qwen3_qnn_aot/aot_run.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ MLLM_MAIN({
2929

3030
RunnerConfig config;
3131
config.num_layers = qwen3_cfg.num_hidden_layers;
32-
config.num_heads = qwen3_cfg.num_attention_heads;
32+
config.num_heads = qwen3_cfg.num_key_value_heads;
3333
config.head_dim = qwen3_cfg.head_dim;
3434
config.vocab_size = qwen3_cfg.vocab_size;
3535
config.context_len = 1024;

examples/qwen3_qnn_aot/modeling_qwen_qnn_aot_sha.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,7 @@ inline void prepareParametersForSHA(const ParameterFile::ptr_t& params, const Qw
764764
std::string h_str = std::to_string(h);
765765
// Weight: slice per head
766766
std::string new_weight_name = layer_prefix + "q_norm." + h_str + ".weight"; // NOLINT
767-
auto sliced = orig_weight.slice({{h * head_dim, (h + 1) * head_dim}}, false);
768-
params->push(new_weight_name, sliced.contiguous().setMemType(kParamsNormal).setName(new_weight_name));
767+
params->push(new_weight_name, orig_weight.contiguous().setMemType(kParamsNormal).setName(new_weight_name));
769768

770769
// Scale: copy (scalar)
771770
if (has_scale) {
@@ -801,8 +800,7 @@ inline void prepareParametersForSHA(const ParameterFile::ptr_t& params, const Qw
801800
std::string h_str = std::to_string(h);
802801
// Weight: slice per head
803802
std::string new_weight_name = layer_prefix + "k_norm." + h_str + ".weight"; // NOLINT
804-
auto sliced = orig_weight.slice({{h * head_dim, (h + 1) * head_dim}}, false);
805-
params->push(new_weight_name, sliced.contiguous().setMemType(kParamsNormal).setName(new_weight_name));
803+
params->push(new_weight_name, orig_weight.contiguous().setMemType(kParamsNormal).setName(new_weight_name));
806804

807805
// Scale: copy (scalar)
808806
if (has_scale) {

mllm-kernel/CMakeLists.txt

Whitespace-only changes.

mllm-kernel/README.md

Whitespace-only changes.

mllm-kernel/ascend/README.md

Whitespace-only changes.

mllm-kernel/cuda/README.md

Whitespace-only changes.

mllm-kernel/pyproject-ascend.toml

Whitespace-only changes.

mllm-kernel/pyproject-cpu.toml

Whitespace-only changes.

mllm-kernel/pyproject-cuda.toml

Whitespace-only changes.

mllm-kernel/requirements.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)