OxfordIonTrapGroup / ndscan

N-dimensional scans for ARTIQ
GNU Lesser General Public License v3.0
19 stars 16 forks source link

Implement host-only scannables #27

Open dnadlinger opened 5 years ago

dnadlinger commented 5 years ago

The fragment design already accommodates scans of parameters where any changes require a new kernel to be launched (for instance, scanning a magnetic field via a closed-loop servo), reflected in the host_setup/device_setup split.

This is not supported in the actual scan implementation yet, though; parameters need a host-only flag, and the scan scheduler/loop need to take it into account.

hartytp commented 1 year ago

Writing up notes from a discussion with @dnadlinger yesterday, I wonder if we should remove host only scannables from the nscan's design goals.

My primary motivation for that is that (as I understand it) supporting host only scannables is the only driver for having different execution models / separate code paths for core / host scans. I see this as having a few downsides compared with having a single portable scan loop which is use for all scans, regardless of whether they are run on the host or coredevice:

It's also not obvious to me how useful the kind of use-case pointed to above really is. My experience has generally been that host scans which call into kernels tend to be impractically slow due to multiple compilations. This has tended to push us in the other direction of having the entire experiment be a single kernel and using other techniques to solve these issues.

Anyway, I don't want to overstate any of the above objections - none are killer - but they just feel like points of friction and it's not obvious to me how useful the feature we get in return really is.