We agreed on to include the Intel TBB into Stan-math for 2.21 only if we can include a benefit for the users by providing a scheduler aware
map_rect. In case we don’t get codes ready for
map_rect, then 2.21 can be the last fully GPL-2 compatible release.
I was wondering if we could go for the following: Given that we only use the TBB for
map_rect with 2.21 it should be possible to write the code such that the TBB is mandatory only if
STAN_THREADS is turned on, but the TBB is actually not used whenever
STAN_THREADS is not set. Thus, the 2.21 release would only require the TBB whenever threading is used.
To be clear - in going forward the TBB will be made mandatory for any setting of
STAN_THREADS. However, integrating it like this will make 2.21 semi-compatible with the GPL-2 (just delete the TBB and don’t use threading) and moreover, the interfaces get a bit more time to deal with 2.21 wrt to the TBB.
Integrating the TBB in this manner may require an additional if-def here or there… not many for sure, but it is absolutely manageable.
(I am assuming that once we have threaded multi-chain warmup in stan, then most users will switch to threaded Stan anyways as a default).