Skip to content

Not define __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT for Clang#2024

Open
fujunwei wants to merge 1 commit intouxlfoundation:masterfrom
fujunwei:build_openvino_with_chromium
Open

Not define __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT for Clang#2024
fujunwei wants to merge 1 commit intouxlfoundation:masterfrom
fujunwei:build_openvino_with_chromium

Conversation

@fujunwei
Copy link
Copy Markdown

We are trying to build OpenVINO with Chromiumt, but the __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT is only defined for MSVC (_MSC_VER >= 1911), the Clang (used in Chromium builds) doesn't support
std::hardware_destructive_interference_size that is not available in Clang's standard library, so adds && !__clang__ to the __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT macro.

@dnmokhov
Copy link
Copy Markdown
Contributor

@fujunwei, could you please rebase your branch from master to ensure all the checks pass? Thanks in advance!

@petterreinholdtsen
Copy link
Copy Markdown
Contributor

I notice your change also fail on the copyright check. After some struggle I figured out that this check expect a line like "Copyright (c) 2026 UXL Foundation Contributors" in the headers where it claim there is missing copyright information.

@fujunwei fujunwei force-pushed the build_openvino_with_chromium branch from 4ada617 to 494ac34 Compare March 30, 2026 06:10
@fujunwei
Copy link
Copy Markdown
Author

Rebased the latest code, PTAL. Thanks.

@fujunwei
Copy link
Copy Markdown
Author

/cc @huningxin

@fujunwei
Copy link
Copy Markdown
Author

fujunwei commented Apr 3, 2026

@dnmokhov @petterreinholdtsen could you please take a look again, thanks.

Comment on lines 267 to +268
__TBB_GLIBCXX_VERSION >= 90000 && __TBB_LANG >= 201703L)
#define __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT (_MSC_VER >= 1911)
#define __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT (_MSC_VER >= 1911 && !__clang__)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This has an undesirable effect of disabling std::hardware_destructive_interference_size for ICX (which is Clang-based). Have you considered using something like __has_feature instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants