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

Don't support kwargs at runtime in aot_module_simplified #89664

Closed
wants to merge 3 commits into from

Commits on Nov 24, 2022

  1. Don't support kwargs at runtime in aot_module_simplified

    The preexisting logic here added in
    pytorch/functorch#970 was very peculiar: if top_kwargs
    was non-empty, then the inner compiled function supports kwargs.  Naively, this
    would leave you to expect that there is some sort of correlation between
    top_kwargs and kwargs.  But in fact, they're completely unrelated!  top_kwargs
    is the AOTAutograd configuration knobs (e.g., fw_compiler/bw_compiler), but
    kwargs is the RUNTIME kwargs that are to be passed to the compiled function.
    But (1) we don't support this (the function to be compiled only takes a list
    of tensors) and (2) even if we did support it, conditioning on whether or not
    you had passed AOTAutograd configuration kwargs to support kwargs at runtime
    is bonkers.
    
    So delete it.
    
    Signed-off-by: Edward Z. Yang <ezyang@fb.com>
    
    [ghstack-poisoned]
    ezyang committed Nov 24, 2022
    Copy the full SHA
    fd2bb3d View commit details
    Browse the repository at this point in the history
  2. Update on "Don't support kwargs at runtime in aot_module_simplified"

    The preexisting logic here added in
    pytorch/functorch#970 was very peculiar: if top_kwargs
    was non-empty, then the inner compiled function supports kwargs.  Naively, this
    would leave you to expect that there is some sort of correlation between
    top_kwargs and kwargs.  But in fact, they're completely unrelated!  top_kwargs
    is the AOTAutograd configuration knobs (e.g., fw_compiler/bw_compiler), but
    kwargs is the RUNTIME kwargs that are to be passed to the compiled function.
    But (1) we don't support this (the function to be compiled only takes a list
    of tensors) and (2) even if we did support it, conditioning on whether or not
    you had passed AOTAutograd configuration kwargs to support kwargs at runtime
    is bonkers.
    
    So delete it.
    
    Signed-off-by: Edward Z. Yang <ezyangfb.com>
    
    [ghstack-poisoned]
    ezyang committed Nov 24, 2022
    Copy the full SHA
    a85c751 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2022

  1. Update on "Don't support kwargs at runtime in aot_module_simplified"

    The preexisting logic here added in
    pytorch/functorch#970 was very peculiar: if top_kwargs
    was non-empty, then the inner compiled function supports kwargs.  Naively, this
    would leave you to expect that there is some sort of correlation between
    top_kwargs and kwargs.  But in fact, they're completely unrelated!  top_kwargs
    is the AOTAutograd configuration knobs (e.g., fw_compiler/bw_compiler), but
    kwargs is the RUNTIME kwargs that are to be passed to the compiled function.
    But (1) we don't support this (the function to be compiled only takes a list
    of tensors) and (2) even if we did support it, conditioning on whether or not
    you had passed AOTAutograd configuration kwargs to support kwargs at runtime
    is bonkers.
    
    So delete it.
    
    Signed-off-by: Edward Z. Yang <ezyangfb.com>
    
    [ghstack-poisoned]
    ezyang committed Nov 25, 2022
    Copy the full SHA
    58f1e5f View commit details
    Browse the repository at this point in the history