Skip to content

Custom Generators don't work in JIT #36733

@smessmer

Description

@smessmer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions