Commit c43d5ad
authored
Alternative approach to handling memory offset shift (#9406)
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: D714885711 parent 9d243e9 commit c43d5ad
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
0 commit comments