-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[BUG] SoA request is ignored with external c++ #1379
Comments
I think this is intentional behavior. We currently only support SoA in user defined functions if we can inline them (see #1237), and it is unclear whether or not the user providing external C++ would desire SoA or AoS inputs. The later is perhaps something we could fix with annotations once we implement them |
Ah got it, thanks! |
Actually, I might reopen sorry. I think that concern is only relevant if the user has passed the Would a compromise be to allow this with the |
At the moment, the optimizer has no way of knowing whether the reason it is doing the memory pattern optimizations is because it is from |
Ahhh that makes sense, fair enough |
It looks like
stanc
ignores the-fsoa
flag if any undefined functions are used in the likelihood. Given the following model:I get the following generated c++:
If I remove the
undefined_fun()
call from the likelihood:I instead get:
Both models were called with
./mac-stanc ./soa_test.stan -fsoa --allow-undefined
using the Oct 23 nightly (the latest release)The text was updated successfully, but these errors were encountered: