[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The 2GiB problem? (Was: Enabling ROCm on Everything)



Hi Christian,

On 2023-05-07 05:04, Christian Kastner wrote:
On 2023-03-21 06:17, Cordell Bloor wrote:
Once the size of the shared library exceeds 2 GiB, it will become too large to use 32-bit relative offsets and the library will fail to link.
So assets, like the Whisper models, should not be affected.

To elaborate, this is because the default for clang is `-mcmodel=small`. In theory, you could just pass `-mcmodel=large` and the library would no longer be constrained to 2 GiB [1]. The last time I tried `-mcmodel=large`, it didn't seem to be respected when compiling for HIP. However, it has been a couple years since then and I suppose we should probably check if that's still true. It wouldn't be the first time I was mistaken; I was still telling everyone that -ftrapv was not supported in GPU code for over a year after it was added.

Sincerely,
Cory Bloor

[1]: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html


Reply to: