Skip to content

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Oct 15, 2024

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Oct 15, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 7156fa5 with merge base 60d1c71 (image):
💚 Looks good so far! There are no failures yet. 💚

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

ezyang added a commit that referenced this pull request Oct 15, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: deb2630
Pull Request resolved: #137980
@pytorch-bot pytorch-bot bot added ciflow/inductor module: cpu CPU specific problem (e.g., perf, algorithm) release notes: fx release notes category labels Oct 15, 2024
@ezyang ezyang added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 15, 2024
# These methods call the metaprogrammed methods, they're hand written
# here so we get good stack traces
def abs(self) -> "SymNode":
def abs(self) -> SymNode:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, I regret adding annotations to this file lol

Copy link
Collaborator

@Skylion007 Skylion007 Oct 15, 2024

Choose a reason for hiding this comment

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

@ezyang, just do typing_extensions Self instead? (It's also way more future proof and doesn't require future annotations


# Methods that are only for float
only_float_magic_methods = {"is_integer", "round", "sym_int"}
only_float_magic_methods = {"is_integer", "round", "sym_int", "sym_log2"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this and above only substantive changes

IsNonOverlappingAndDenseIndicator: "is_non_overlapping_and_dense_indicator",
RoundDecimal: "round_decimal",
# TODO: do the rest of the opaque unary functions...
OpaqueUnaryFn_log2: "log2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought someone had to do this and Sympy and they do for codegen: https://github.com/sympy/sympy/blob/b4ce69ad5d40e4e545614b6c76ca9b0be0b98f0b/sympy/codegen/cfunctions.py#L224-L281 Not sure if it's useful here though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want to use the sympy functions because they are too smart and try to do simplifications but I don't want simplifications I want my float functions as is NO fancypants

if a is -int_oo:
a = -sympy.oo
if name == "log2":
return sympy.log(a, 2)
Copy link
Collaborator

@Skylion007 Skylion007 Oct 15, 2024

Choose a reason for hiding this comment

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

Can we generalize this to any standard log base?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess... lol

@ezyang
Copy link
Contributor Author

ezyang commented Oct 24, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 25, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: f42c750
Pull Request resolved: #137980
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: a421922
Pull Request resolved: #137980
@ezyang
Copy link
Contributor Author

ezyang commented Oct 28, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@jeanschmidt
Copy link
Contributor

@pytorchbot revert -m "lint broke from this onwards on main" -c landrace

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

@ezyang your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Oct 28, 2024
This reverts commit 5d450d7.

Reverted #137980 on behalf of https://github.com/jeanschmidt due to lint broke from this onwards on main ([comment](#137980 (comment)))
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 28, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 84cb174
Pull Request resolved: #137980
@ezyang
Copy link
Contributor Author

ezyang commented Oct 28, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

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

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) release notes: fx release notes category Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants