Alternative approach to handling memory offset shift#9406
Alternative approach to handling memory offset shift#9406JakeStevens merged 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9406
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7cdc42b with merge base 7159650 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D71488571 |
|
this looks fine, but I'll be surprised if it continues to get rid of the warning |
|
@pytorchbot label "topic: not user facing" |
0583a8b to
65e5b87
Compare
Summary:
To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to:
```
memory_offset |= static_cast<size_t>(memory_offset_high)
<< (sizeof(size_t) - sizeof(uint32_t));
```
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
```
sizeof(size_t) > sizeof(uint32_t)
```
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, swolchok, dpalmasan
Differential Revision: D71488571
|
This pull request was exported from Phabricator. Differential Revision: D71488571 |
Summary: Pull Request resolved: pytorch#9406 To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to: ``` memory_offset |= static_cast<size_t>(memory_offset_high) << (sizeof(size_t) - sizeof(uint32_t)); ``` This fails for build of OSS qwen example however. Instead, we modify to add a check for ``` sizeof(size_t) > sizeof(uint32_t) ``` in the conditional instead of changing the computation. In our builds of interest, this compiles away the if branch Reviewed By: digantdesai, swolchok, dpalmasan Differential Revision: D71488571
c6c43b5 to
da6c3e3
Compare
Summary:
To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to:
```
memory_offset |= static_cast<size_t>(memory_offset_high)
<< (sizeof(size_t) - sizeof(uint32_t));
```
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
```
sizeof(size_t) > sizeof(uint32_t)
```
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, swolchok, dpalmasan
Differential Revision: D71488571
|
This pull request was exported from Phabricator. Differential Revision: D71488571 |
Summary: Pull Request resolved: pytorch#9406 To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to: ``` memory_offset |= static_cast<size_t>(memory_offset_high) << (sizeof(size_t) - sizeof(uint32_t)); ``` This fails for build of OSS qwen example however. Instead, we modify to add a check for ``` sizeof(size_t) > sizeof(uint32_t) ``` in the conditional instead of changing the computation. In our builds of interest, this compiles away the if branch Reviewed By: digantdesai, swolchok, dpalmasan Differential Revision: D71488571
da6c3e3 to
8dbe71f
Compare
Summary:
To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to:
```
memory_offset |= static_cast<size_t>(memory_offset_high)
<< (sizeof(size_t) - sizeof(uint32_t));
```
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
```
sizeof(size_t) > sizeof(uint32_t)
```
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, swolchok, dpalmasan
Differential Revision: D71488571
8dbe71f to
d6c9092
Compare
|
This pull request was exported from Phabricator. Differential Revision: D71488571 |
d6c9092 to
9f274c3
Compare
Summary:
To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to:
```
memory_offset |= static_cast<size_t>(memory_offset_high)
<< (sizeof(size_t) - sizeof(uint32_t));
```
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
```
sizeof(size_t) > sizeof(uint32_t)
```
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, swolchok, dpalmasan
Differential Revision: D71488571
|
This pull request was exported from Phabricator. Differential Revision: D71488571 |
Summary: Pull Request resolved: pytorch#9406 To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to: ``` memory_offset |= static_cast<size_t>(memory_offset_high) << (sizeof(size_t) - sizeof(uint32_t)); ``` This fails for build of OSS qwen example however. Instead, we modify to add a check for ``` sizeof(size_t) > sizeof(uint32_t) ``` in the conditional instead of changing the computation. In our builds of interest, this compiles away the if branch Reviewed By: digantdesai, swolchok, dpalmasan Differential Revision: D71488571
53db757 to
fc27c40
Compare
Summary:
To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to:
```
memory_offset |= static_cast<size_t>(memory_offset_high)
<< (sizeof(size_t) - sizeof(uint32_t));
```
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
```
sizeof(size_t) > sizeof(uint32_t)
```
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, swolchok, dpalmasan
Differential Revision: D71488571
Summary: Pull Request resolved: pytorch#9406 To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to: ``` memory_offset |= static_cast<size_t>(memory_offset_high) << (sizeof(size_t) - sizeof(uint32_t)); ``` This fails for build of OSS qwen example however. Instead, we modify to add a check for ``` sizeof(size_t) > sizeof(uint32_t) ``` in the conditional instead of changing the computation. In our builds of interest, this compiles away the if branch Reviewed By: digantdesai, swolchok, dpalmasan Differential Revision: D71488571
|
This pull request was exported from Phabricator. Differential Revision: D71488571 |
fc27c40 to
7cdc42b
Compare
Summary:
To support embedded system builds which threw an error on the warning
for left shift by 32 on a 32 bit dtype, the code was modified to:
```
memory_offset |= static_cast<size_t>(memory_offset_high)
<< (sizeof(size_t) - sizeof(uint32_t));
```
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
```
sizeof(size_t) > sizeof(uint32_t)
```
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, dpalmasan
Differential Revision: D71488571
Summary:
To support embedded system builds which threw an error on the warning for left shift by 32 on a 32 bit dtype, the code was modified to:
This fails for build of OSS qwen example however.
Instead, we modify to add a check for
in the conditional instead of changing the computation.
In our builds of interest, this compiles away the if branch
Reviewed By: digantdesai, dpalmasan
Differential Revision: D71488571