2 Commits

Author SHA1 Message Date
Alex Voicu
e203a67f4c
[cuda][HIP] __constant__ should imply constant (#110182)
Currently, `__constant__` variables do not get unconditionally marked as
`constant` in IR, which seems a bit odd given their definition. This is
generally inconsequential for NVPTX/AMDGPU, since said variables get
emitted in the constant address space for those BEs. However, it is
potentially significant for e.g. HIP-on-SPIR-V cases, as SPIR-V does not
allow casts to/from the constant AS (`UniformConstant`), which forces
`__constant__` variables to be emitted in the global AS, thus making IR
constness meaningful.
2024-09-29 01:22:52 +01:00
Yaxun (Sam) Liu
77fd30f7ce
[CUDA][HIP] Fix template static member (#98580)
Should check host/device attributes before emitting static member of
template instantiation.

Fixes: https://github.com/llvm/llvm-project/issues/98151
2024-07-12 10:08:34 -04:00