-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add parameter to execute inference requests at a fixed frequency #26820
base: master
Are you sure you want to change the base?
Add parameter to execute inference requests at a fixed frequency #26820
Conversation
c962946
to
e22a77d
Compare
@@ -65,6 +65,11 @@ static const char cache_dir_message[] = "Optional. Enables caching of loaded mod | |||
static const char load_from_file_message[] = "Optional. Loads model from file directly without read_model." | |||
" All CNNNetwork options (like re-shape) will be ignored"; | |||
|
|||
/// @brief message for run frequency | |||
static const char run_frequency_message[] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in serving it's typically named "requests rate"
/// @brief message for run frequency | ||
static const char run_frequency_message[] = | ||
"Execute at a fixed frequency. Note if the targeted rate per second cannot be reached, " | ||
"the benchmark would start the next run immediately, trying its best to catch up."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every iteration of the main loop starts with inferRequest = inferRequestsQueue.get_idle_request();
which blocks. That means the benchmark would not start the next run immediately.
samples/cpp/benchmark_app/main.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, keep C++ and Python implementations aligned
samples/cpp/benchmark_app/main.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test to test_benchmark_app.py https://github.com/openvinotoolkit/openvino/tree/master/tests/samples_tests/smoke_tests
samples/cpp/benchmark_app/main.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -307,6 +312,9 @@ DEFINE_string(api, "async", api_message); | |||
/// @brief Number of infer requests in parallel | |||
DEFINE_uint64(nireq, 0, infer_requests_count_message); | |||
|
|||
/// @brief Execute infer requests at a fixed frequency | |||
DEFINE_double(rfreq, 0, run_frequency_message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default could be infinity. That way you don't need to handle 0 separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If set to INFINITY, then the function if (FLAGS_rfreq > 0)
will still get executed which is redundant right? Having default as 0 would simply skip that and runs without delay. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know for sure. You should try. I'd expect sleep_for to have the similar logic inside: if <=0 then return.
samples/cpp/benchmark_app/main.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nkogteva, what were your reasons against limiting infer requests rate introduction?
build_jenkins |
1762638
to
551caa3
Compare
fa49ebc
to
91982ac
Compare
Signed-off-by: Maciej Falkowski <maciej.falkowski@intel.com> Signed-off-by: Ooi, Boon Sin <boon.sin.ooi@intel.com>
91982ac
to
ab68729
Compare
Signed-off-by: Ooi, Boon Sin <boon.sin.ooi@intel.com>
ab68729
to
7040c62
Compare
Details:
Tickets: