Implements pytato.transform.lower_to_index_lambda.lower_to_index_lambda. - #375
Conversation
82f8c2b to
0d82c12
Compare
|
Do you think we should merge this despite the failing CI? |
|
I was initially thinking let's wait for #374. But.. it's not downgrading the current situation. So, I would be fine if we merge it. |
0d82c12 to
fc9693e
Compare
|
FWIW, I had neither reviewed nor OK'd this. Sorry if my communication was unclear. I'll take a look now. |
|
Oh fair. Sorry. Feel free to revert if anything's way out of line here and I'll propose another PR, if it's minor changes I can deal with that right away. |
|
I'm trying to consider the relative merits of your approach here vs. what I proposed. As a reminder, my proposal was to:
The way I see it, the relative merits are as follows: This PR:
By comparison, the approach I proposed imposes an additional cost of a call of a no-op Personally, I can stomach the extra cost on |
CodeGenPreprocessor does more that lowering to index lambda, like making placeholders from datawrappers, collecting the bound arguments, rename callee kernels). ToIndexLambdaLowerer would be a misnomer.
I did think about that, but then we typically use a
Lowering to an index lambda is a precise operation. Unless I'm not thinking quite ahead, I don't see good use cases for it. |
My thought was that bit could be extracted into a base class.
I fail to see the issue here. The outermost dispatch is
That part specifically puzzles me. Why go against all existing precedent?
IDK. We're talking about a variant of a preexisting to-index-lambda-lowerer, and you seem to be saying that you're confident that this is the last variant we'll ever need? Also, want to address the (multiple) cost aspects? |
Let me give this a shot. I'm not entirely sure if it will work, but I will propose a PR soon and we can iterate over there.
That I concede. :) |
There's almost no new code here. Moves implementation from PreprocessMapper to
fn lower_to_index_lambda(x: Array) -> IndexLambda;.