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

Allow building and loading of TBBBind on macOS #1132

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

isaevil
Copy link
Contributor

@isaevil isaevil commented Jun 13, 2023

Description

Current build infrastructure and code base don't allow to build and use TBBBind on macOS, while HWLOC is able to recognize hybrid cores on macOS M1/M2. With this patch user may build TBBBind on macOS and be able to use tbb::info namespace to obtain high-level information about the system and limit task_arena accordingly (without actual CPU binding since such functionality is not supported on macOS via HWLOC).

Fixes # - issue number(s) if exists

  • - git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details)

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

DLD(__TBB_internal_allocate_binding_handler, allocate_binding_handler_ptr),
DLD(__TBB_internal_deallocate_binding_handler, deallocate_binding_handler_ptr),
DLD(__TBB_internal_apply_affinity, apply_affinity_ptr),
DLD(__TBB_internal_restore_affinity, restore_affinity_ptr),
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

can it be dynamically understood that tbbbind does not have all symbols and "bind"-related symbols are just not set upon loading of tbbbind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dynamic_link functionality guarantees that either all of requested symbols are loaded, or none of them, if something is missing. Thus, we shouldn't expect hwloc's cpubind related symbols here in the first place.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
@isaevil isaevil marked this pull request as ready for review July 28, 2023 09:17
@isaevil isaevil merged commit f9fd1be into master Aug 3, 2023
18 of 19 checks passed
@isaevil isaevil deleted the dev/isaevil/tbbbind-macos branch August 3, 2023 09:01
AndreyMlashkin pushed a commit to AndreyMlashkin/conan-center-index that referenced this pull request Oct 28, 2023
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.

3 participants