-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[tmva] MLP codegen threadsafety #572
Conversation
Can one of the admins verify this patch? |
NB: opened the PR to make the draft public and open the discussion thread. no need to let jenkins run haven't tested the output of the codegen yet. |
1db4db6
to
aecb0d7
Compare
from my side good to merge. NB: in the rapidcheck repo you can also see how my change changes the generated code by comparing the class.C files. |
@phsft-bot build! |
Starting build on |
Build failed on mac1012/native. Warnings:
|
use array variables in GetMvaValue__ rather than dynamically allocated arrays, pointed to by a member array of double pointers.
use array variables in GetMvaValue__ rather than dynamically allocated arrays, pointed to by a member array of double pointers.
suggestion from code review by @GerhardRaven
@phsft-bot build! |
as it turnes out the
...class.C
files generated by the TMVA MLP are not thread safe (fWeights
is a constant array of contant pointers to beginnings of double arrays, and the contents therein vary at runtime inside the GetMvaValue__ method)So the quick hack here is to replace the class member of dynamically allocated arrays by fixed sized arrays in the function scope.
QUASICODE OLD
QUASICODE NEW