Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support INFERENCE_NUM_THREADS options in LLAMA_CPP #898

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

vshampor
Copy link
Contributor

Both plugin and model settings should be working now. Removed the openvino::funcSharedTests from the test build since the majority of the shared tests are irrelevant or incompatible with the LLAMA_CPP plugin flow right now.

@vshampor vshampor requested a review from a team as a code owner March 29, 2024 13:50
@github-actions github-actions bot added the category: build OpenVINO cmake script / infra label Mar 29, 2024
@vshampor vshampor requested a review from a team as a code owner March 29, 2024 14:06
@github-actions github-actions bot added the category: CI OpenVINO public CI label Mar 29, 2024
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
num_threads = it->second.as<int>();
if (num_threads < 0) {
OPENVINO_THROW("INFERENCE_NUM_THREADS cannot be negative");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPENVINO_ASSERT(num_threads > 0, "INFERENCE_NUM_THREADS should be positive")

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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use OPENVINO_ASSERT

@@ -0,0 +1,8 @@
project(llama_cpp_test_common)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, add copyright

@ilya-lavrenov ilya-lavrenov merged commit cb1c767 into openvinotoolkit:master Apr 17, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build OpenVINO cmake script / infra category: CI OpenVINO public CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants