RooFitDriver Class deleted?

Dear experts,
I am very interested in using roofit with cuda.
I am trying to look at how RooFit achieve this.
I found that the RooFitDriver Class is removed in ROOTv6.30.02 and ROOTv6.30.04.
Can I using GPU with ROOTv6.30.02 and ROOTv6.30.04?
If yes, how did RooFit achieve this without RooFitDriver?
Best Wishes,

I think @jonas can help you

Hello! Thanks for expressing interest in the GPU mode of RooFit!

It works pretty well at this point for speeding up fits with many datapoints.

The former RooFitDriver got renamed to RooFit::Evaluator so it’s more clear what it does.

What is you exact usecase for RooFit on the GPU? I would be happy to give you more advice.

1 Like

Hi,Thanks a lot for your explanation!
A few years ago, we hacked old-version roofit and achieved a GPU-based fitter to perform amplitude analysis.
But to be honest, the method is a little bit strange.
I am considering to use the new roofit to refactor the framework.
It would be great if there are some recent documents for me to learn how new roofit achieved the GPU acceleration.

Best Wishes,

Thanks for you reply, that’s exactly the usecase I was thinking would be good for the GPU backend!

Not many developers were interested in building on top of it yet, so I didn’t write technical documentation yet. But since you’re asking now, it is the good time to do it.

Keep an eye on this page: ROOT: RooFit Developer Documentation

Next week, there will be something about implementing custom pdfs on the GPU there.

Two more notes:

  • maybe wait for the next ROOT release in May (6.32.00) before really getting started with this project, or base your work on the current ROOT nightlies or self-compiled master branch. The interfaces for the CUDA backend were changing in this development cycle, so you save some work by not looking at 6.30 anymore

  • We don’t currently support numeric integration on the GPU yet. Do you need this for your framework? It depends on your fit I guess: if it’s bottlenecked by numeric integrals, our GPU backend also doesn’t help. However, numeric integrals on the GPU is part of ROOTs 2024 plan of work, so by 6.34 it will be there (if you have any thoughts on this, like how you do numeric integrals in your framework, I’m happy to hear about it as input for my work).


Thanks a lot for the document!

  • I can wait the new version (6.32.00)
  • In our amplitude analysis framework, the integration is performed with MC samples. I think that many amplitude analysis, at least in LHCb, use MC samples for integration.
    We writed a cuda kernal to perform the integration. The MC sample is more than ten times larger than the data sample.
    The MC sample are transfered to GPU just like the data sample, then calculate the matrix element using the MC sample, and then use thrust::reduce to sum the MC smaples to obtain the integration. Is this pissible to be achieved now?

Best Wishes,

Hi @Zhihong_Shen,

MC integration is done in RooFit by the RooMCIntegrator, which doesn’t support the GPU yet. But I can also work on that before the release.

Just to get a better idea of your usecase: how many dimensions do you have in your pdf, and how many data points do you fit? Is your code available somewhere? If your MC integration CUDA Kernel works well, maybe we can bring it inside RooFit? I guess the kernel itself should be not too hacky, but I understand you did quite a bit of black magic to make it work together with RooFit :slight_smile:

You have the link to your framework somewhere?

It depends on the analyses, in my recent analysis, the sample size is about 0.4M for data and MC samples in total. There are about 160 free parameters. The pdf is six dimensions.
I set the precision of some numbers to float to speed up, it would be great if we can dicide the precision in the future.
I have invited you to join my github project, you can look at the code.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.