SWDEV-285388 - Allow fallback to asm when builtin not available
Change-Id: Ifeee7f3ad1be9ce9b79cf26008b75102153143a5
This commit is contained in:
@@ -30,11 +30,17 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include "hip/amd_detail/host_defines.h"
|
#include "hip/amd_detail/host_defines.h"
|
||||||
|
|
||||||
|
#if __has_builtin(__builtin_amdgcn_groupstaticsize)
|
||||||
__device__
|
__device__
|
||||||
inline
|
inline
|
||||||
unsigned __llvm_amdgcn_groupstaticsize() {
|
unsigned __llvm_amdgcn_groupstaticsize() {
|
||||||
return __builtin_amdgcn_groupstaticsize();
|
return __builtin_amdgcn_groupstaticsize();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// FIXME: This should be removed once the above builtin is available.
|
||||||
|
__device__
|
||||||
|
unsigned __llvm_amdgcn_groupstaticsize() __asm("llvm.amdgcn.groupstaticsize");
|
||||||
|
#endif
|
||||||
|
|
||||||
template<typename __T>
|
template<typename __T>
|
||||||
__device__
|
__device__
|
||||||
|
|||||||
Reference in New Issue
Block a user