ROCm / HIP-CPU

An implementation of HIP that works on CPUs, across OSes.
MIT License
107 stars 19 forks source link

Detect implicit TBB dependence of parallel STL #13

Closed MathiasMagnus closed 3 years ago

MathiasMagnus commented 3 years ago

This PR addresses #11.

It includes the lightest of STL headers in C++17 mode which immediately pulls in bits/c++config.h which in turn includes pstl/pstl_config.h which exposes the half-baked machinery of PSTL back-end detection and simply defaults to TBB.

image

CMake script looks for the macro __PSTL_PAR_BACKEND_TBB and if present searches for TBB and links to it. It is still not bullet-proof, but better than the current linkage to system TBB.

_(Note: does not support TBB versions prior to 2017 as per the docs, but that shouldn't matter, as minimum requirements for PSTL is 2018.)_

MathiasMagnus commented 3 years ago

@AlexVlx How can the macOS tests fail due to these changes? Tests seem to be timing out.

AlexVlx commented 3 years ago

@AlexVlx How can the macOS tests fail due to these changes? Tests seem to be timing out.

That's an unrelated (known) failure, please ignore.

MathiasMagnus commented 3 years ago

I'll revisit the issue this week. (At least that's the plan.)

MathiasMagnus commented 3 years ago

I added the missing TBB detection and it builds on all platforms and just "regularly" timeouts on macOS.

AlexVlx commented 3 years ago

Merged, thank you.