Skip to content

emit programs with mutable buffers #2233

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
wants to merge 1 commit into from

Conversation

JacobSzwejbka
Copy link
Contributor

Summary:
Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

Reviewed By: tarun292

Differential Revision: D53713544

Copy link

pytorch-bot bot commented Mar 4, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 97279b7 with merge base e7197a1 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 4, 2024
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 4, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 5, 2024
Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

Summary:

Meaningful changes to the emitter logic here.

Before we would ignore the tensor spec passed in and try to decide if the placeholder was a constant and if it was we would create a new spec from the actual value for that constant. That drops meta data on the input spec which is not great. Now instead of that we just look up the storage of the concrete tensor and hook it up to the spec.

Also added some logic to seperate out behavior for mutable buffers specifically.

While working on this I also discovered a bug that memory planning is planning space for parameters and constant buffers if its told to allocate space for inputs which is really bad lol.

Oh one big assumption this diff makes is that the buffer does not have a meaningful initial state. I should probably throw out a warning during emission about this in the short term. Long term we will handle them properly.

bypass-github-export-checks

Reviewed By: tarun292

Differential Revision: D53713544
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in aef3a7c.

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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants