Skip to content
Snippets Groups Projects
  • Matt Wala's avatar
    e3bb8f37
    Add a make_tuple() function to loopy. · e3bb8f37
    Matt Wala authored
    This function does trivial things, but it's there to solve the problem
    that the reduction neutral element getters are not allowed to store
    dtypes (#80).
    
    The function mangler demands that a function knows its type based on
    its arguments. For the neutral element getters, this is impossible
    because they take zero arguments. The simplest fix I can think of is
    to change a call to neutral_element() to a call to make_tuple().
    
    Currently, the tuple code doesn't work yet due to pickling issues.  I
    think the root cause is somewhere in
    __hackily_ensure_multi_argument_functions_are_scoped_private().
    e3bb8f37
    History
    Add a make_tuple() function to loopy.
    Matt Wala authored
    This function does trivial things, but it's there to solve the problem
    that the reduction neutral element getters are not allowed to store
    dtypes (#80).
    
    The function mangler demands that a function knows its type based on
    its arguments. For the neutral element getters, this is impossible
    because they take zero arguments. The simplest fix I can think of is
    to change a call to neutral_element() to a call to make_tuple().
    
    Currently, the tuple code doesn't work yet due to pickling issues.  I
    think the root cause is somewhere in
    __hackily_ensure_multi_argument_functions_are_scoped_private().