Skip to content

Default values for inputs? #1006

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

Closed
justinchuby opened this issue Aug 11, 2023 · 1 comment
Closed

Default values for inputs? #1006

justinchuby opened this issue Aug 11, 2023 · 1 comment
Labels
module: torchlib Related to the torch/aten function lib in development topic: discussion For discussion
Milestone

Comments

@justinchuby
Copy link
Collaborator

justinchuby commented Aug 11, 2023

Sometimes we would like to have default values for inputs (e.g. baddbmm alpha), or dynamic attributes.

We could make them optional, but support for static optional in functions isn’t mature yet when they are involved in logic.

I wonder if we can store the default when we parse the function definition and add it as a constant in the graph if the input isn’t provided by the caller.

cc @titaiwangms @BowenBao

@justinchuby justinchuby added module: torchlib Related to the torch/aten function lib in development topic: discussion For discussion labels Aug 11, 2023
@justinchuby justinchuby added this to the 0.2 milestone Aug 29, 2023
@justinchuby justinchuby modified the milestones: 0.2, 0.3 Feb 14, 2025
@justinchuby justinchuby closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2025
@justinchuby justinchuby modified the milestones: 0.3, 0.2 Feb 14, 2025
@justinchuby
Copy link
Collaborator Author

Will support naturally with eager mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: torchlib Related to the torch/aten function lib in development topic: discussion For discussion
Projects
None yet
Development

No branches or pull requests

1 participant