Skip to content

Conversation

@tarun292
Copy link
Contributor

@tarun292 tarun292 commented Apr 1, 2024

Summary:
This diff does a couple of things:

  • Makes make_tensor a public function so that we can create temporary intermediate tensors in operators that need to do so. (Such as NMS that is implemented above in this stack)
  • Renames free_broadcast_tensor to a more generic name free_tensor

Differential Revision: D55577026

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 1, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit af92d4e with merge base 9c38cf7 (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 Apr 1, 2024
@facebook-github-bot
Copy link
Contributor

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

facebook-github-bot pushed a commit that referenced this pull request Apr 1, 2024
…ast_tensor (#2785)

Summary:

This diff does a couple of things:
- Makes `make_tensor` a public function so that we can create temporary intermediate tensors in operators that need to do so. (Such as NMS that is implemented above in this stack)
- Renames `free_broadcast_tensor` to a more generic name `free_tensor`

Differential Revision: D55577026
tarun292 added a commit that referenced this pull request Apr 1, 2024
…ast_tensor (#2785)

Summary:

This diff does a couple of things:
- Makes `make_tensor` a public function so that we can create temporary intermediate tensors in operators that need to do so. (Such as NMS that is implemented above in this stack)
- Renames `free_broadcast_tensor` to a more generic name `free_tensor`

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

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

facebook-github-bot pushed a commit that referenced this pull request Apr 1, 2024
…ast_tensor (#2785)

Summary:

This diff does a couple of things:
- Makes `make_tensor` a public function so that we can create temporary intermediate tensors in operators that need to do so. (Such as NMS that is implemented above in this stack)
- Renames `free_broadcast_tensor` to a more generic name `free_tensor`

Differential Revision: D55577026
}

namespace {

Copy link
Contributor

Choose a reason for hiding this comment

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

It's interesting that malloc is used in this function but I don't see how the malloced pointer is freed. @SS-JIA @manuelcandales , could you provide more context that I miss? cc @dbort

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a corresponding function called free_tensor that when passed in the tensor created via this function free's it up.

Copy link
Contributor

Choose a reason for hiding this comment

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

@tarun292 These functions are not being used in the portable kernels. I believe you introduced these utils back in January 2023, and maybe they were being used at that time, but not anymore. They should be moved out of the portable lib utils.

tarun292 added a commit that referenced this pull request Apr 1, 2024
…ast_tensor (#2785)

Summary:

This diff does a couple of things:
- Makes `make_tensor` a public function so that we can create temporary intermediate tensors in operators that need to do so. (Such as NMS that is implemented above in this stack)
- Renames `free_broadcast_tensor` to a more generic name `free_tensor`

Differential Revision: D55577026
tarun292 and others added 2 commits September 27, 2024 00:00
Differential Revision: D55577025
…ast_tensor (#2785)

Summary:
Pull Request resolved: #2785

This diff does a couple of things:
- Makes `make_tensor` a public function so that we can create temporary intermediate tensors in operators that need to do so. (Such as NMS that is implemented above in this stack)
- Renames `free_broadcast_tensor` to a more generic name `free_tensor`

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

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants