Skip to content

Conversation

@kirklandsign
Copy link
Contributor

Stack from ghstack (oldest at bottom):

Context

This diff adds some API functions to ParamsBindList to make it easier to use, specifically

  1. Added default constructor
  2. Added overload for append that takes only one BufferBindInfo

The reason for these changes is to make the following pattern easier:

ParamsBindList ubo;
if (kernel1) {
  ubo.append(ubo1);
}
else {
  ubo.append(ubo2);
}

This pattern was not possible before because ubo could not be default constructed, and ubo1 and ubo2 had to be wrapped in an initializer list before being passed to append.

Differential Revision: D60930997

SS-JIA added 4 commits August 8, 2024 08:01
## Context

This diff adds some additional API functions to the `utils::vecN` family of classes. The following improvements were made:

1. Added overloaded assignment operator, allowing for `vec_instance = vec_instance_2`
2. Added overloaded indexing operator, allowing for `vec_instance[2]` instead of having to do `vec_instance.data[2]`

Note that the large number of changes are due to replacing `.data[` with `[` throughout the codebase.

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

[ghstack-poisoned]
…nd a single Binding Info"

## Context

This diff adds some API functions to `ParamsBindList` to make it easier to use, specifically

1. Added default constructor
2. Added overload for `append` that takes only one `BufferBindInfo`

The reason for these changes is to make the following pattern easier:

```
ParamsBindList ubo;
if (kernel1) {
  ubo.append(ubo1);
}
else {
  ubo.append(ubo2);
}
```

This pattern was not possible before because `ubo` could not be default constructed, and `ubo1` and `ubo2` had to be wrapped in an initializer list before being passed to `append`.

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

[ghstack-poisoned]
…nd a single Binding Info"

## Context

This diff adds some API functions to `ParamsBindList` to make it easier to use, specifically

1. Added default constructor
2. Added overload for `append` that takes only one `BufferBindInfo`

The reason for these changes is to make the following pattern easier:

```
ParamsBindList ubo;
if (kernel1) {
  ubo.append(ubo1);
}
else {
  ubo.append(ubo2);
}
```

This pattern was not possible before because `ubo` could not be default constructed, and `ubo1` and `ubo2` had to be wrapped in an initializer list before being passed to `append`.

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

[ghstack-poisoned]
Differential Revision: D60930997

Pull Request resolved: #4593
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 9, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit d879b91 with merge base 192d463 (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 Aug 9, 2024
@kirklandsign kirklandsign merged commit 0b1695f into main Aug 9, 2024
@SS-JIA SS-JIA deleted the gh/SS-JIA/53/base branch January 24, 2025 19:39
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants