Skip to content

Commit

Permalink
Apply comments from previous PR
Browse files Browse the repository at this point in the history
  • Loading branch information
vshampor committed Apr 17, 2024
1 parent e95ba3b commit 81574ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
8 changes: 2 additions & 6 deletions modules/llama_cpp_plugin/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ std::shared_ptr<ov::ICompiledModel> LlamaCppPlugin::compile_model(const std::str
auto it = properties.find(ov::inference_num_threads.name());
if (it != properties.end()) {
num_threads = it->second.as<int>();
if (num_threads < 0) {
OPENVINO_THROW("INFERENCE_NUM_THREADS cannot be negative");
}
OPENVINO_ASSERT(num_threads >= 0, "INFERENCE_NUM_THREADS cannot be negative");
} else {
num_threads = m_num_threads;
}
Expand All @@ -52,9 +50,7 @@ void LlamaCppPlugin::set_property(const ov::AnyMap& properties) {
for (const auto& map_entry : properties) {
if (ov::inference_num_threads == map_entry.first) {
int num_threads = map_entry.second.as<int>();
if (num_threads < 0) {
OPENVINO_THROW("INFERENCE_NUM_THREADS cannot be negative");
}
OPENVINO_ASSERT(num_threads >= 0, "INFERENCE_NUM_THREADS cannot be negative");
m_num_threads = num_threads;
}
OPENVINO_THROW_NOT_IMPLEMENTED("llama_cpp_plugin: setting property ", map_entry.first, "not implemented");
Expand Down
3 changes: 3 additions & 0 deletions modules/llama_cpp_plugin/tests/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

project(llama_cpp_test_common)

add_library(llama_cpp_test_common STATIC
Expand Down
3 changes: 3 additions & 0 deletions modules/llama_cpp_plugin/tests/functional/src/batching.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (C) 2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#include <gtest/gtest.h>

#include "llm_inference.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (C) 2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include <gtest/gtest.h>

Expand Down

0 comments on commit 81574ef

Please sign in to comment.