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

[try_put_and_wait] Part 1: Add implementation of try_put_and_wait feature for function_node #1398

Conversation

kboyarinov
Copy link
Contributor

Description

Extend function_node (queueing, rejecting, lightweight) with the new try_put_and_wait API for waiting on single messages.

Add basic functionality such as message_metainfo and basic try_put_and_wait function.

Fixes # - issue number(s) if exists

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

@kboyarinov kboyarinov changed the title [try_put_and_wait] Add implementation of try_put_and_wait feature for function_node [try_put_and_wait] Part 1: Add implementation of try_put_and_wait feature for function_node Jun 20, 2024
include/oneapi/tbb/detail/_config.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_impl.h Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_item_buffer_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_item_buffer_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/flow_graph.h Outdated Show resolved Hide resolved
test/tbb/test_function_node.cpp Show resolved Hide resolved
test/tbb/test_function_node.cpp Outdated Show resolved Hide resolved
test/tbb/test_function_node.cpp Show resolved Hide resolved
test/tbb/test_function_node.cpp Outdated Show resolved Hide resolved
test/tbb/test_function_node.cpp Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_cache_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_cache_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_cache_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_item_buffer_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_impl.h Outdated Show resolved Hide resolved
Copy link
Contributor

@vossmjp vossmjp left a comment

Choose a reason for hiding this comment

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

Haven't looked at tests yet.

include/oneapi/tbb/detail/_flow_graph_body_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/detail/_flow_graph_node_impl.h Outdated Show resolved Hide resolved
include/oneapi/tbb/flow_graph.h Outdated Show resolved Hide resolved
test_try_put_and_wait_queueing(tbb::flow::unlimited);

test_try_put_and_wait_rejecting(tbb::flow::serial);
// TODO: add integration test with buffering node before rejecting function_node
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose I would expect additional tests that have fan-out and fan-in to the function_node and perhaps more than one overlapping tracked message. But I suppose these would not be unique tests to function_node but be a broader test. Will there be such tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, current tests are just basic tests for waiting only for jobs required to execute wait_message and not waiting for any other tasks in the graph. Some tests for tricky graphs should be added for each node types in the future. Can it be considered as a future improvements for testing?

Copy link
Contributor

@vossmjp vossmjp left a comment

Choose a reason for hiding this comment

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

looks good to me

@kboyarinov kboyarinov merged commit 35358fd into dev/kboyarinov/try_put_and_wait_production Aug 1, 2024
21 of 22 checks passed
@kboyarinov kboyarinov deleted the dev/kboyarinov/try_put_and_wait_function_node branch August 1, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants