Error: Cuda implementation of the computing library is not available

Hi,I heard that root 6.26 will support RooFit automatic GPU acceleration. I tried it soon using

auto result = pdf.fitTo(*data, RooFit::BatchMode(“GPU”), RooFit::Save());

just like ACAT 2021 (29 November 2021 - 3 December 2021): Accelerating RooFit with GPUs · Indico . but it report

Only supported string values for BatchMode() are “off”, “cpu”, or “cuda”.

then i changed BatchMode(“GPU”) to BatchMode(“cuda”), my terminal report

terminate called after throwing an instance of ‘std::runtime_error’
what(): In: RooFitDriver(), /home/conda/feedstock_root/build_artifacts/root_base_1646481317233/work/root-source/roofit/roofitcore/src/RooFitDriver.cxx:201: Cuda implementation of the computing library is not available

I wonder how i can use GPU acceleration succesfully.
Here is my code

using namespace RooFit;
void test()
RooRealVar x(“x”,“x”,-10,10);
RooRealVar mean(“mean”,“mean”,0,-5,5);
RooRealVar width(“width”,“width”,0.1,0.01,5);
RooGaussian model(“model”,“model”,x,mean,width);
RooDataSet *data=model.generate(x,1000);
auto r1=model.fitTo(*data,Save(),RooFit::BatchMode(“cuda”));


Welcome to the ROOT forum,
As it is a Roofit/Roostat question, @moneta may help you.

The ROOT build in Conda has no support for GPUs (i.e. it’s built with support for CUDA disabled altogether). You may have to build ROOT from source or use another binary distribution to be able to make use of CUDA within ROOT.

1 Like

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