-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Compilation failures under LLVM 19 #3106
Comments
Looks like this static assert was introduced by llvm/llvm-project#81379 |
@SteveBronder @andrjohns are you able to take a look at this? It will become a blocker for the upcoming release I think! |
It appears the issue is specifically with mixing a complex value of our autodiff types with a primitive in |
The actual error in template <class _Tp, class _Up, __enable_if_t<is_arithmetic<_Up>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI complex<typename __promote<_Tp, _Up>::type> pow(const complex<_Tp>& __x, const _Up& __y) {
typedef complex<typename __promote<_Tp, _Up>::type> result_type;
return std::pow(result_type(__x), result_type(__y));
} and the offending code in the tests is calling a
which should be calling the stan pow function from here
We could make ours a more likely candidate by making |
Hmm, actually maybe we should just make our |
For testing I can pull the docker image we use, if there’s something you’d rather me try |
Yes I think that's right because the standard has the pow signature using |
Can you try changing the signature I linked above to be template <typename T, typename = require_arithmetic_t<T>>
inline std::complex<var> pow(const std::complex<var>& x, const T& y) {
return internal::complex_pow(x, y);
} |
@SteveBronder it looks like this model also fails, due to the apply_scalar overload calling Details
Unfortunately it doesn't look like adding |
(note: that failure does not mention std::complex) |
Oh that's very interesting. Yes in that case I think just adding |
Description
LLVM 19.1.0 was released last week: https://discourse.llvm.org/t/llvm-19-1-0-released/81285
Running our test pipeline uncovered some failures: https://jenkins.flatironinstitute.org/blue/organizations/jenkins/Stan%2FBleedingEdgeCompilersMonthly/detail/BleedingEdgeCompilersMonthly/198/pipeline/207
Example
Details
Expected Output
Compilation to succeed
It smells like #3006 may be related again, it looks like these asserts are in the complex functions
Current Version:
v4.9.0
The text was updated successfully, but these errors were encountered: