-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fusion arg reduction #602
Fusion arg reduction #602
Conversation
loopy/target/c/__init__.py
Outdated
idis = self.preprocess_idis( | ||
kernel, codegen_result.get_idis_for_subkernel(kernel, subkernel)) | ||
|
||
return FunctionDeclarationWrapper( | ||
FunctionDeclaration( | ||
name, | ||
[self.idi_to_cgen_declarator(codegen_state.kernel, idi) | ||
for idi in self.preprocess_idis( | ||
codegen_state.kernel, | ||
codegen_state.implemented_data_info)] | ||
[self.idi_to_cgen_declarator(kernel, idi) | ||
for idi in idis] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What difference does this make? If it's important, explain in a comment!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean - the previous code was incorrect (the arguments to preprocess_idis
). I restructured this a little to reduce the forest of parentheses ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. I see the change now. One thing that we may have to negotiate is that I find the "forest of parentheses" version easier to reason about. (The value is unbound and therefore I can tell that it won't be used/changed below.)
Looks like db00b36 is the net change here. @kaushikcfd, would it make sense for you to grab that change? |
Yep, I'll cherry-pick this! |
Co-authored-by: Matthias Diener <matthias.diener@gmail.com>
Co-authored-by: Matthias Diener <matthias.diener@gmail.com>
This combines the Fusion actx with #599
cc @kaushikcfd
This fails in the generated Python code: