In summary: No, I don’t think so and I am in favour of not requiring two flags to make tmva compile with gpu support.
Indeed, the current defaults are cuda=OFF and tmva-gpu=ON. However, the DL library is enabled ifftmva-gpu and cude holds true. Currently the only user of cuda, to my knowledge, is the tmva dl-library.
In this context, it could make sense to remove the cuda flag completely. We should at least make tmva-gpu imply cuda as currently it is absolutely required.
One reason to have the separation of the tmva-gpu and cuda flags is that if there were several backends available, the user should be able to choose their preference. However, also in this case there should be a reasonable default.
We need to discuss with @moneta to decide what to do. In principle, we shouldn’t have duplication of flags for similar functionality. On the other hand, if we remove the cuda flag, we may have to add it back later when something else (e.g. fitting) supports CUDA in ROOT. That said, it seems tmva-gpu and cuda interact in a strange way and we need to sort that out indeed.
I agree with @amadio. I thin kit is better to keep the cuda flag in case other parts of ROOT will support Cuda in the future. Also TMVA-GPU it is good to have it because in principle you could have cuda for some other parts of ROOT and TMVA-CPU for others.
I think the flags work fine, if something does not work as expected we should fix.
If CUDA is enable I think by default also TMVA-GPU is enabled
The opposite it is not true (i.e if TMVA-GPU is set to ON it will not be set if CUDA=Off). Maybe this could be changed