Skip to content

[monarch] initial commit of tensor_engine submodule #458

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 2 commits into
base: gh/suo/51/base
Choose a base branch
from

Conversation

suo
Copy link
Contributor

@suo suo commented Jul 8, 2025

Stack from ghstack (oldest at bottom):

Now that the actor layer is place, time to refactor the tensor engine following the same principles:

  • Every symbol has at most two locations: a private location (which should be exactly the same as its location in the source tree), and optionally a public location in the user-facing API.
  • We discourage end-users from depending on private locations via underscores, per python convention.

In particular, we violate principle 2 in many places in the tensor engine—all of our top-level files/modules are visible if you do from monarch.foo import bar, and we are sloppy about the distinction of public and private.

So this refactor will be a little bit painful. I will approach it in parts. This diff defines the tensor_engine submodule and moves common to monarch.tensor_engine._common.

Differential Revision: D77847587

Now that the actor layer is place, time to refactor the tensor engine following the same principles:

- Every symbol has at most two locations: a private location (which should be exactly the same as its location in the source tree), and optionally a public location in the user-facing API.
- We discourage end-users from depending on private locations via underscores, per python convention.

In particular, we violate principle 2 in many places in the tensor engine—all of our top-level files/modules are visible if you do `from monarch.foo import bar`, and we are sloppy about the distinction of public and private.

So this refactor will be a little bit painful. I will approach it in parts. This diff defines the `tensor_engine` submodule and moves `common` to `monarch.tensor_engine._common`.

Differential Revision: [D77847587](https://our.internmc.facebook.com/intern/diff/D77847587/)

[ghstack-poisoned]
@suo suo mentioned this pull request Jul 8, 2025
suo added a commit that referenced this pull request Jul 8, 2025
Now that the actor layer is place, time to refactor the tensor engine following the same principles:

- Every symbol has at most two locations: a private location (which should be exactly the same as its location in the source tree), and optionally a public location in the user-facing API.
- We discourage end-users from depending on private locations via underscores, per python convention.

In particular, we violate principle 2 in many places in the tensor engine—all of our top-level files/modules are visible if you do `from monarch.foo import bar`, and we are sloppy about the distinction of public and private.

So this refactor will be a little bit painful. I will approach it in parts. This diff defines the `tensor_engine` submodule and moves `common` to `monarch.tensor_engine._common`.

Differential Revision: [D77847587](https://our.internmc.facebook.com/intern/diff/D77847587/)

ghstack-source-id: 294791348
Pull Request resolved: #458
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 8, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77847587

Now that the actor layer is place, time to refactor the tensor engine following the same principles:

- Every symbol has at most two locations: a private location (which should be exactly the same as its location in the source tree), and optionally a public location in the user-facing API.
- We discourage end-users from depending on private locations via underscores, per python convention.

In particular, we violate principle 2 in many places in the tensor engine—all of our top-level files/modules are visible if you do `from monarch.foo import bar`, and we are sloppy about the distinction of public and private.

So this refactor will be a little bit painful. I will approach it in parts. This diff defines the `tensor_engine` submodule and moves `common` to `monarch.tensor_engine._common`.

Differential Revision: [D77847587](https://our.internmc.facebook.com/intern/diff/D77847587/)

[ghstack-poisoned]
suo added a commit that referenced this pull request Jul 8, 2025
Pull Request resolved: #458

Now that the actor layer is place, time to refactor the tensor engine following the same principles:

- Every symbol has at most two locations: a private location (which should be exactly the same as its location in the source tree), and optionally a public location in the user-facing API.
- We discourage end-users from depending on private locations via underscores, per python convention.

In particular, we violate principle 2 in many places in the tensor engine—all of our top-level files/modules are visible if you do `from monarch.foo import bar`, and we are sloppy about the distinction of public and private.

So this refactor will be a little bit painful. I will approach it in parts. This diff defines the `tensor_engine` submodule and moves `common` to `monarch.tensor_engine._common`.

Differential Revision: [D77847587](https://our.internmc.facebook.com/intern/diff/D77847587/)
ghstack-source-id: 294872880
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77847587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants