-
Notifications
You must be signed in to change notification settings - Fork 15
feat(core): add resource-limited execution to graph nodes #850
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
Open
knoepfel
wants to merge
8
commits into
Framework-R-D:main
Choose a base branch
from
knoepfel:introduce-resources
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
44ec5a3
Promote resource-limiting TBB preview check to top-level directory
knoepfel d3ca3a3
feat(resources): add mutable resource registration
knoepfel 764d204
feat(registration): split product selectors from resources
knoepfel 55fd879
feat(nodes): add resource-aware node builder
knoepfel 24e7c2b
feat(observer): support resource tokens
knoepfel 9d59815
feat(transform): support resource tokens in transforms and predicates
knoepfel 85e1bd7
feat(fold): support resource tokens
knoepfel 1cd8f5b
feat(unfold): support resource tokens in unfold operations
knoepfel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Provides phlex_check_tbb_resource_limiting(), which verifies that the | ||
| # TBB preview resource-limiting API required by Phlex is available. | ||
|
|
||
| include_guard() | ||
|
|
||
| include(CheckCXXSourceCompiles) | ||
|
|
||
| function(phlex_check_tbb_resource_limiting) | ||
| set(_phlex_required_libraries_save ${CMAKE_REQUIRED_LIBRARIES}) | ||
| set(_phlex_required_includes_save ${CMAKE_REQUIRED_INCLUDES}) | ||
| set(_phlex_required_flags_save "${CMAKE_REQUIRED_FLAGS}") | ||
|
|
||
| get_target_property(_phlex_tbb_includes TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) | ||
| if(_phlex_tbb_includes) | ||
| set(CMAKE_REQUIRED_INCLUDES ${_phlex_tbb_includes}) | ||
| endif() | ||
| set(CMAKE_REQUIRED_LIBRARIES TBB::tbb) | ||
| set(CMAKE_REQUIRED_FLAGS "-std=c++${CMAKE_CXX_STANDARD}") | ||
|
|
||
| check_cxx_source_compiles( | ||
| " | ||
| #define TBB_PREVIEW_FLOW_GRAPH_RESOURCE_LIMITING 1 | ||
| #include <oneapi/tbb/flow_graph.h> | ||
|
|
||
| using type = oneapi::tbb::flow::resource_limiter<int>; | ||
|
|
||
| int main() {} | ||
| " | ||
| HAVE_TBB_RESOURCE_LIMITING | ||
| ) | ||
|
|
||
| set(CMAKE_REQUIRED_LIBRARIES ${_phlex_required_libraries_save}) | ||
| set(CMAKE_REQUIRED_INCLUDES ${_phlex_required_includes_save}) | ||
| set(CMAKE_REQUIRED_FLAGS "${_phlex_required_flags_save}") | ||
|
|
||
| if(NOT HAVE_TBB_RESOURCE_LIMITING) | ||
| message(FATAL_ERROR "Phlex requires TBB with flow::resource_limiter support") | ||
| endif() | ||
| endfunction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.