Skip to content

Conversation

@majosm
Copy link
Collaborator

@majosm majosm commented Jan 14, 2026

WIP

cc @lukeolson

@majosm
Copy link
Collaborator Author

majosm commented Jan 14, 2026

@inducer I started looking through the loopy codegen code to try to figure out how to generate temporaries for the reduction bounds to avoid islpy errors (as is done in the loopy example), but I'm having some trouble figuring out how best to do that. Seems like I need to create the temporaries inside InlinedExpressionGenMapper.map_reduce() before adding the reduction domain to the kernel, but I'm not sure how to make sure the temporaries get the right scope, dependencies, inames, etc. Any suggestions on how I could approach this? Should I maybe be doing it inside CodeGenMapper.map_index_lambda by collecting the reduction info ahead of time and creating temporaries before calling the exprgen_mapper?

@inducer
Copy link
Owner

inducer commented Jan 14, 2026

Yes, working inside of CodeGenMapper.map_index_lambda seems like a possibly promising route. I'm not sur what info you would need to collect ahead of time though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants