Skip to content

Commit 9dc05b7

Browse files
committed
fix(moore): enable Mate flash-attn inference
1 parent 3faa1db commit 9dc05b7

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎csrc/infinicore/src/ops/mha_kvcache/mha_kvcache_infiniops.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ std::size_t implementation_index_for_device(
2525
return 0;
2626
}
2727
if (device_type == infini::ops::Device::Type::kMoore) {
28-
return 8;
28+
return 16;
2929
}
3030
return 16;
3131
}

‎csrc/infinicore/src/ops/multi_head_attention_varlen/mha_varlen_infiniops.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ std::size_t implementation_index_for_device(
2323
return 0;
2424
}
2525
if (device_type == infini::ops::Device::Type::kMoore) {
26-
return 8;
26+
return 16;
2727
}
2828
return 16;
2929
}

‎csrc/pybind11/engine/engine.hpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ inline void bind_infer_engine(py::module &m) {
121121
}
122122
return state_dict_tp_all;
123123
})
124-
.def("process_weights_after_loading", &InferEngine::process_weights_after_loading, "Process the weights after loading on all workers (e.g., for quantization)")
124+
.def("process_weights_after_loading", &InferEngine::process_weights_after_loading,
125+
"Process the weights after loading on all workers (e.g., for quantization)",
126+
py::call_guard<py::gil_scoped_release>())
125127
.def(
126128
"forward", [](InferEngine &self, const InferEngine::Input &input) -> InferEngine::Output {
127129
// IMPORTANT: Release the GIL before calling forward() to allow other Python threads

0 commit comments

Comments
 (0)