Madgraph5 GPU development
# Madgraph on GPU dev meeting
https://indico.cern.ch/event/1355164/
Present: OM, SR, AV (notes), AT, CV
Apologies: TC, NN, ZW, DM
## Ameya
AT shows some slides.
OM on slide 3: also look at DY+jets, AV had shown that phase space sampling is even bigger there, right?
AV: yes this was even bigger in DY+3j, look at tyhe CHEP2024 slides from last week.
AT: two big problems in x_to_f_arg, it is not reentrant (stateful, commons) and has lots of branching.
AT: feedback?
OM: one issue seems to be passcuts, also because it often returns false, so it breaks the vectorization
OM: so you might need repacking between the two steps
OM: so essentially call x_to_f_arg until you have enough momenta that pass the cuts, and repack that
SR: can you move passcuts inside x_to_f_arg and only return events that pass?
OM: not clear, maybe a bit the same problem? on a gpu you get branching anyway?
AV: about lastbin, if we have a btach of 1000 events, do we need a sigle lastbin or 1000 lastbins?
OM: no we need 1000 lastbin values, so one per event
AV: very nice! one point, about my 'low hanging fruits', I had a check again and these were xbin
inside sample_get_x, so this was orthogonal to what AT is doing outside/before sample_get_x
AT: thanks, maybe will have a look anyway, if these are really trivial changes
OM: gen_mom is also a complex function because it depends on various conditions
(which however should mostly be the same for all events in a warp, though not completely...)
AT: will probably be coming to the madgraph meeting in february
## Carl
CV: nta
## Olivier
OM: need to synchronise with SR and AV about how to structure the paper
SR: added a couple of points
OM: maybe first point is author list, we could open up to people here
and allow them to choose whether to be included or not
AV: there is also proceedings and also technical paper we had discussed
OM: proceedings count for almost nothing, so this is a physica paper, thought of scipost
OM: include results on standalone and also on madevent results
OM: add a section on numerical precision
SR: timeline?
OM: very urgent thing to do...
OM: also did a plenary in chep last week!
## Andrea
Back from CHEP, gave the LO talk
https://indico.cern.ch/event/1338689/contributions/6015964/
Now just back, will start going through various LO fixes/improvements as discussed with OM in Krakow.
## Stefan
SR: First thing, bumped into people deplying NextGen hardware, this will be hundreds of H100s.
Could be used for backfilling from experiment MC generator, then stop at any point.
Resources would come in March, so I would put my priority on this for my personal development work.
CMS can put a Grid CE to submit jobs there.
SR: Is this something that MG is able to do?
OM: this would be checkpointing.... this was a bit the idea of gridpacks.
The easiest would be to add checkpointing after each madevent, but it requires some work.
SR: pure pyton level? OM: yes essentially python level
OM: already have some bits and pieces of code, but need someone with FTE time to check this
OM: there is already some handling of ctrl-c
AV: what is the main use? trigger? during data taking?
SR: big packages cms/atlas for emulating farm, and also theory for lattice qcd
AV: also can use this for development?
SR: yes and there are also
AV: CMS probably needs physics validation before they move to this
SR: yes but we can do things in parallel
SR: second point, through CNRS got a contact for simulating higher floating point calculation in software
Also have a student from CMS interested in this
There is a library for CPU but nothing yet on GPU
SR: third point, got in contact with Tomas CHEP organiser
He would like to contribute students for our efforts
SR: fourth point, AV/SR got an email from Vince Pascuzzi about quantum algorithms for IBM
AV: thanks for reminding me, we should follow up... have the vague impression we already met him, will check
OM: was not convinced about quantum computing from krakow
AV: also, as a fifth point, SR/AV had a discussion with people doing FPGAs
OM/SR: yes they will come in February
## AOB
Next meeting 12 Nov