Skip to content

Commit 3b9886e

Browse files
committed
Change debug prints to function syntax
1 parent 4cbeb2f commit 3b9886e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/llama_cpp_plugin/src/compiled_model.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ LlamaCppModel::LlamaCppModel(const std::string& gguf_fname,
2727
: ICompiledModel(nullptr, plugin),
2828
m_gguf_fname(gguf_fname),
2929
m_num_threads(num_threads) {
30-
OPENVINO_DEBUG << "llama_cpp_plugin: loading llama model directly from GGUF... " << std::endl;
30+
OPENVINO_DEBUG("llama_cpp_plugin: loading llama model directly from GGUF... \n");
3131
llama_model_params mparams = llama_model_default_params();
3232
mparams.n_gpu_layers = 99;
3333
m_llama_model_ptr = llama_load_model_from_file(gguf_fname.c_str(), mparams);
34-
OPENVINO_DEBUG << "llama_cpp_plugin: llama model loaded successfully from GGUF..." << std::endl;
34+
OPENVINO_DEBUG("llama_cpp_plugin: llama model loaded successfully from GGUF... \n");
3535

3636
auto input_ids = std::make_shared<ov::opset13::Parameter>(ov::element::Type_t::i64, ov::PartialShape({-1, -1}));
3737
auto fake_convert = std::make_shared<ov::opset13::Convert>(input_ids->output(0), ov::element::Type_t::f32);
@@ -71,7 +71,7 @@ std::shared_ptr<const ov::Model> LlamaCppModel::get_runtime_model() const {
7171
}
7272

7373
void LlamaCppModel::set_property(const ov::AnyMap& properties) {
74-
OPENVINO_DEBUG << "llama_cpp_plugin: attempted to set_property (did nothing)";
74+
OPENVINO_DEBUG("llama_cpp_plugin: attempted to set_property (did nothing)");
7575
}
7676

7777
ov::Any LlamaCppModel::get_property(const std::string& name) const {

modules/llama_cpp_plugin/src/infer_request.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void allocate_tensor_impl(ov::SoPtr<ov::ITensor>& tensor,
2828
LlamaCppSyncInferRequest::LlamaCppSyncInferRequest(const std::shared_ptr<const LlamaCppModel>& compiled_model,
2929
size_t num_threads)
3030
: ov::ISyncInferRequest(compiled_model) {
31-
OPENVINO_DEBUG << "llama_cpp_plugin: infer request ctor called\n";
31+
OPENVINO_DEBUG("llama_cpp_plugin: infer request ctor called\n");
3232
llama_context_params cparams = llama_context_default_params();
3333
cparams.n_threads = num_threads ? num_threads : std::thread::hardware_concurrency();
3434
cparams.n_ctx = 0; // this means that the actual n_ctx will be taken equal to the model's train-time value
@@ -51,7 +51,7 @@ LlamaCppSyncInferRequest::LlamaCppSyncInferRequest(const std::shared_ptr<const L
5151
}
5252
void LlamaCppSyncInferRequest::set_tensors_impl(const ov::Output<const ov::Node> port,
5353
const std::vector<ov::SoPtr<ov::ITensor>>& tensors) {
54-
OPENVINO_DEBUG << "llama_cpp_plugin: set_tensors_impl called\n";
54+
OPENVINO_DEBUG("llama_cpp_plugin: set_tensors_impl called\n");
5555
}
5656

5757
void llama_batch_add_reimpl(struct llama_batch& batch,
@@ -131,12 +131,12 @@ void LlamaCppSyncInferRequest::infer() {
131131
llama_batch_free(batch);
132132
};
133133
std::vector<ov::ProfilingInfo> LlamaCppSyncInferRequest::get_profiling_info() const {
134-
OPENVINO_DEBUG << "llama_cpp_plugin: get_profiling_info() called\n";
134+
OPENVINO_DEBUG("llama_cpp_plugin: get_profiling_info() called\n");
135135
return std::vector<ov::ProfilingInfo>{};
136136
};
137137

138138
std::vector<ov::SoPtr<ov::IVariableState>> LlamaCppSyncInferRequest::query_state() const {
139-
OPENVINO_DEBUG << "llama_cpp_plugin: query_state() called\n";
139+
OPENVINO_DEBUG("llama_cpp_plugin: query_state() called\n");
140140
return {std::static_pointer_cast<ov::IVariableState>(std::make_shared<LlamaCppState>(m_llama_ctx))};
141141
}
142142

0 commit comments

Comments
 (0)