Skip to content

Include ATen/core/functional.h directly instead of torch/csrc/utils/functional.h.#16377

Closed
ZolotukhinM wants to merge 3 commits intopytorch:masterfrom
ZolotukhinM:inline-functional-h
Closed

Include ATen/core/functional.h directly instead of torch/csrc/utils/functional.h.#16377
ZolotukhinM wants to merge 3 commits intopytorch:masterfrom
ZolotukhinM:inline-functional-h

Conversation

@ZolotukhinM
Copy link
Copy Markdown

One more shim removed.

@ZolotukhinM ZolotukhinM requested review from bwasti, suo and zdevito January 25, 2019 19:28
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jan 25, 2019
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it could even be deleted now that it can use the c10 version directly. The copy was done originally to avoid including straight from csrc where all other includes were aten/c10. Feel free to ignore though, this is not critical.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It doesn't look like functional.h is moved to c10 yet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems weird to me. The other user declarations make sense because they are reexporting "IR" stuff in the torch namespace. But then why would some random functional combinators also come along for the ride?

However, I am guessing you added this, because you would have had to renamespace a bunch of other stuff if you didn't? Maybe this suggests that we should have a global using namespace c10 in torch...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Originally I put it here mostly to keep the changes mechanical (that's what we included with jit/functional.h anyway).

Now I removed using c10::filter from ir.h as it was used in only one place, but kept c10::fmap. Hopefully, it will keep annoying us so that we don't forget to cleanup this and unify namespaces.

Copy link
Copy Markdown
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

see comments, but I don't really want to bikeshed this too much

@ZolotukhinM ZolotukhinM force-pushed the inline-functional-h branch 2 times, most recently from 09d5c50 to b3be5ff Compare January 28, 2019 18:56
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ZolotukhinM is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang ezyang added the merged label Jun 25, 2019
@ZolotukhinM ZolotukhinM deleted the inline-functional-h branch April 1, 2020 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants