Unboxed dispatch handles Generator, i.e. it looks at Generator arguments to make the dispatch decision, but boxed dispatch does not.
This means that custom PRNGs will work in eager mode currently, but they won't work in scripted models.
Potential ways of fixing this:
- Remove Generator from unboxed dispatch too and find a different way to handle Generators, for example
- make it a custom class and add overloads for different generator types
- or use an approach similar to BackendSelect
- or add support for Generator to boxed dispatch to make the current approach work with JIT (note that this might have a perf impact because the dispatch function gets larger and less likely to get inlined).
cc @suo @bhosmer @ezyang @pbelevich @dzhulgakov @zdevito
Unboxed dispatch handles Generator, i.e. it looks at Generator arguments to make the dispatch decision, but boxed dispatch does not.
This means that custom PRNGs will work in eager mode currently, but they won't work in scripted models.
Potential ways of fixing this:
cc @suo @bhosmer @ezyang @pbelevich @dzhulgakov @zdevito