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: D71488571 J
Jacob Stevens committed
c43d5ad213465a3f6f5a8fb9a6bbd05825da88bb
Parent: 9d243e9
Committed by GitHub <noreply@github.com>
on 3/26/2025, 5:39:37 PM