Skip to content
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

[Vulkan][Optimize for Mobile] Avoid dereferencing element [0] if the vector is empty #92918

Closed
wants to merge 1 commit into from

Conversation

salilsdesai
Copy link
Contributor

Summary:
Avoid dereferencing element [0] if the vector is empty.


In transferInputOutputBackends, one of the rewrite passes for Vulkan optimize_for_mobile, an out of bounds access happens when trying to insert a backend transfer for an input if that input's uses() is empty. This diff corrects that issue.

Test Plan:
Run tests


Phabricator + CI Tests

Reviewed By: SS-JIA

Differential Revision: D41296037

@pytorch-bot pytorch-bot bot added the release notes: vulkan release notes category label Jan 24, 2023
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 24, 2023

🔗 Helpful Links

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

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

❌ 6 Failures

As of commit 608ec0b:

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base 438f12d:

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

salilsdesai added a commit to salilsdesai/pytorch that referenced this pull request Jan 25, 2023
…vector is empty (pytorch#92918)

Summary:
Pull Request resolved: pytorch#92918

Avoid dereferencing element [0] if the vector is empty.
___

In ```transferInputOutputBackends```, one of the rewrite passes for Vulkan ```optimize_for_mobile```, an out of bounds access happens when trying to insert a backend transfer for an input if that input's ```uses()``` is empty. This diff corrects that issue.

Test Plan:
Run tests
___

Phabricator + CI Tests

Reviewed By: SS-JIA

Differential Revision: D41296037

fbshipit-source-id: 5e8219faf020104435734c1fb25af612d8408f5a
@facebook-github-bot
Copy link
Contributor

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

salilsdesai added a commit to salilsdesai/pytorch that referenced this pull request Jan 27, 2023
…vector is empty (pytorch#92918)

Summary:
Pull Request resolved: pytorch#92918

Avoid dereferencing element [0] if the vector is empty.
___

In ```transferInputOutputBackends```, one of the rewrite passes for Vulkan ```optimize_for_mobile```, an out of bounds access happens when trying to insert a backend transfer for an input if that input's ```uses()``` is empty. This diff corrects that issue.

Test Plan:
Run tests
___

Phabricator + CI Tests

Reviewed By: SS-JIA

Differential Revision: D41296037

fbshipit-source-id: 54b60872b1a8e4a02ddb60fa034ed75db2bf86f1
@facebook-github-bot
Copy link
Contributor

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

salilsdesai added a commit to salilsdesai/pytorch that referenced this pull request Jan 28, 2023
…vector is empty (pytorch#92918)

Summary:
Pull Request resolved: pytorch#92918

Avoid dereferencing element [0] if the vector is empty.
___

In ```transferInputOutputBackends```, one of the rewrite passes for Vulkan ```optimize_for_mobile```, an out of bounds access happens when trying to insert a backend transfer for an input if that input's ```uses()``` is empty. This diff corrects that issue.

Test Plan:
Run tests
___

Phabricator + CI Tests

Reviewed By: SS-JIA

Differential Revision: D41296037

fbshipit-source-id: 8abe599d7e26ed76622621ff64e4a4b50b8cf1bd
@facebook-github-bot
Copy link
Contributor

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

salilsdesai added a commit to salilsdesai/pytorch that referenced this pull request Jan 30, 2023
…vector is empty (pytorch#92918)

Summary:
Pull Request resolved: pytorch#92918

Avoid dereferencing element [0] if the vector is empty.
___

In ```transferInputOutputBackends```, one of the rewrite passes for Vulkan ```optimize_for_mobile```, an out of bounds access happens when trying to insert a backend transfer for an input if that input's ```uses()``` is empty. This diff corrects that issue.

Test Plan:
Run tests
___

Phabricator + CI Tests

Reviewed By: SS-JIA, dmm-fb

Differential Revision: D41296037

fbshipit-source-id: ec82cb7ea48425a59e44f3132e2e3f6baa442a24
…vector is empty (pytorch#92918)

Summary:
Pull Request resolved: pytorch#92918

Avoid dereferencing element [0] if the vector is empty.
___

In ```transferInputOutputBackends```, one of the rewrite passes for Vulkan ```optimize_for_mobile```, an out of bounds access happens when trying to insert a backend transfer for an input if that input's ```uses()``` is empty. This diff corrects that issue.

Test Plan:
Run tests
___

Phabricator + CI Tests

Reviewed By: SS-JIA, dmm-fb

Differential Revision: D41296037

fbshipit-source-id: b0b385bff829f1b74b6aa4a4c72c0220fc9450bf
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 1, 2023
@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/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: vulkan release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants