8000 Add support for adding tuple outputs in the configure() method by abadams · Pull Request #8649 · halide/Halide · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for adding tuple outputs in the configure() method #8649

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

abadams
Copy link
Member
@abadams abadams commented Jun 12, 2025

We also weren't asserting that the names used in add_output weren't already taken, which resulted in some confusing internal errors when I made that mistake.

Fixes #8643

@ongjunjie
Copy link
Contributor

Thanks for the patch. I want to point out that the new set_type function opens the possibility of setting inputs to Tuple types, which is in conflict with the comment here

Halide/src/Generator.h

Lines 1433 to 1435 in 16fde03

* A GIOBase can have multiple Types, in which case it represents a Tuple.
* (Note that Tuples are currently only supported for GeneratorOutput, but
* it is likely that GeneratorInput will be extended to support Tuple as well.)

I'm not familiar enough with the compilation pipeline to say if it'll lead to undefined behaviour. It might be better to declare the new set_type signature as protected and only expose it as public in the output class.

@abadams
Copy link
Member Author
abadams commented Jun 13, 2025

Good call, I'll move it to the generator output subclass.

@steven-johnson steven-johnson self-requested a review June 13, 2025 17:56
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.

No method for adding output that returns Tuple dynamically
4 participants
0