Skip to content

Conversation

BowenBao
Copy link
Collaborator

@BowenBao BowenBao commented Jul 1, 2023

Stack from ghstack (oldest at bottom):

Introduce ReductionTypePromotionRule and rename TypePromotionRule as
ElementwiseTypePromotionRule. Created base abstract class TypePromotionRule.
Reduction rules are manually curated because the total number of ops is low, yet
most of them require some special treatment. The list that are covered in our unittest is

- "all", done
- "amax", done
- "amin", done
- "any", done
- "cumsum", done
- "cumprod", no torchlib impl
- "mean", done
- "std", no torchlib impl
- "std_mean", no torchlib impl
- "sum", done
- "sum_to_size", no torchlib impl
- "prod", no torchlib impl
- "var", no torchlib impl
- "var_mean", tricky. Node has multiple outputs. Follow up in separate PR.

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 1, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/104491

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 27ea2f3:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: onnx torch.onnx related changes that should show up in the release notes label Jul 1, 2023
BowenBao added a commit that referenced this pull request Jul 1, 2023
@BowenBao BowenBao added the topic: improvements topic category label Jul 1, 2023
@thiagocrepaldi thiagocrepaldi added the module: onnx Related to torch.onnx label Jul 5, 2023
Introduce `ReductionTypePromotionRule` and rename `TypePromotionRule` as
`ElementwiseTypePromotionRule`. Created base abstract class `TypePromotionRule`.
Reduction rules are manually curated because the total number of ops is low, yet
most of them require some special treatment. The list that are covered in our unittest is

    - "all", done
    - "amax", done
    - "amin", done
    - "any", done
    - "cumsum", done
    - "cumprod", no torchlib impl
    - "mean", done
    - "std", no torchlib impl
    - "std_mean", no torchlib impl
    - "sum", done
    - "sum_to_size", no torchlib impl
    - "prod", no torchlib impl
    - "var", no torchlib impl
    - "var_mean", tricky. Node has multiple outputs. Follow up in separate PR.


[ghstack-poisoned]
…pePromo] Introduce ReductionTypePromotionRule"


Introduce `ReductionTypePromotionRule` and rename `TypePromotionRule` as
`ElementwiseTypePromotionRule`. Created base abstract class `TypePromotionRule`.
Reduction rules are manually curated because the total number of ops is low, yet
most of them require some special treatment. The list that are covered in our unittest is

    - "all", done
    - "amax", done
    - "amin", done
    - "any", done
    - "cumsum", done
    - "cumprod", no torchlib impl
    - "mean", done
    - "std", no torchlib impl
    - "std_mean", no torchlib impl
    - "sum", done
    - "sum_to_size", no torchlib impl
    - "prod", no torchlib impl
    - "var", no torchlib impl
    - "var_mean", tricky. Node has multiple outputs. Follow up in separate PR.


[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jul 6, 2023
…Introduce ReductionTypePromotionRule"


Introduce `ReductionTypePromotionRule` and rename `TypePromotionRule` as
`ElementwiseTypePromotionRule`. Created base abstract class `TypePromotionRule`.
Reduction rules are manually curated because the total number of ops is low, yet
most of them require some special treatment. The list that are covered in our unittest is

    - "all", done
    - "amax", done
    - "amin", done
    - "any", done
    - "cumsum", done
    - "cumprod", no torchlib impl
    - "mean", done
    - "std", no torchlib impl
    - "std_mean", no torchlib impl
    - "sum", done
    - "sum_to_size", no torchlib impl
    - "prod", no torchlib impl
    - "var", no torchlib impl
    - "var_mean", tricky. Node has multiple outputs. Follow up in separate PR.


[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jul 6, 2023
Introduce `ReductionTypePromotionRule` and rename `TypePromotionRule` as
`ElementwiseTypePromotionRule`. Created base abstract class `TypePromotionRule`.
Reduction rules are manually curated because the total number of ops is low, yet
most of them require some special treatment. The list that are covered in our unittest is

    - "all", done
    - "amax", done
    - "amin", done
    - "any", done
    - "cumsum", done
    - "cumprod", no torchlib impl
    - "mean", done
    - "std", no torchlib impl
    - "std_mean", no torchlib impl
    - "sum", done
    - "sum_to_size", no torchlib impl
    - "prod", no torchlib impl
    - "var", no torchlib impl
    - "var_mean", tricky. Node has multiple outputs. Follow up in separate PR.


[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jul 7, 2023
Introduce `ReductionTypePromotionRule` and rename `TypePromotionRule` as
`ElementwiseTypePromotionRule`. Created base abstract class `TypePromotionRule`.
Reduction rules are manually curated because the total number of ops is low, yet
most of them require some special treatment. The list that are covered in our unittest is

    - "all", done
    - "amax", done
    - "amin", done
    - "any", done
    - "cumsum", done
    - "cumprod", no torchlib impl
    - "mean", done
    - "std", no torchlib impl
    - "std_mean", no torchlib impl
    - "sum", done
    - "sum_to_size", no torchlib impl
    - "prod", no torchlib impl
    - "var", no torchlib impl
    - "var_mean", tricky. Node has multiple outputs. Follow up in separate PR.


[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jul 11, 2023
@BowenBao BowenBao marked this pull request as ready for review July 11, 2023 21:52
@BowenBao BowenBao added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 12, 2023
"unflatten",
# "var_mean", # Segfault during onnx shape inference. Need to bump onnx version.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a issue to track it? or at least add a TODO:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure #105073