Skip to content

Conversation

@SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Aug 8, 2024

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

## 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]
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 8, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1e3acf1 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 8, 2024
@facebook-github-bot
Copy link
Contributor

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

…ing 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]
@facebook-github-bot
Copy link
Contributor

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

…ing 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]
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit d879b91 into gh/SS-JIA/53/base Aug 9, 2024
5 checks passed
kirklandsign added a commit that referenced this pull request Aug 9, 2024
## 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

Pull Request resolved: #4593

---------

Co-authored-by: Stephen Jia <ssjia@meta.com>
@SS-JIA SS-JIA deleted the gh/SS-JIA/53/head 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. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants