Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check device_setup matches run_once #287

Open
hartytp opened this issue Jun 17, 2022 · 1 comment
Open

check device_setup matches run_once #287

hartytp opened this issue Jun 17, 2022 · 1 comment

Comments

@hartytp
Copy link
Contributor

hartytp commented Jun 17, 2022

Is there any good use case for device_setup implementations not to be kernels? If not, shall we add a build-time check that device_setup is a kernel to help spot errors. Otherwise a missing decorator can lead to long run times in a way that can be slightly non-trivial to debug.

Is there any good use case for one of device_setup and run_once to be a kernel but not the other? If not, shall we add a run-time check that enforces this? Otherwise a missing decorator can lead to long run times in a way that can be non-trivial to debug.

This check should presumably be applied recursively to all subfragment device_setups...

FWIW it also feels conceptually wrong to me to have a "device setup" which does not run on the core device. Bit of a misnomer?

@hartytp hartytp changed the title check device_setup is a kernel check device_setup matches run_once Jun 17, 2022
@hartytp
Copy link
Contributor Author

hartytp commented Jun 25, 2022

One thing that would have complicated the implementation of this check was dealing with Fragments which were never intended to be setup / torn down as part of the main experiment. Since 2f9e36f added an explicit way of handling that this is no longer an issue AFAICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant