[torch] Address -Wreturn-type warning when compiling for AMD (#138951)

Summary: Yep yep see title

Test Plan: CI

Differential Revision: D64971115

Pull Request resolved: https://github.com/pytorch/pytorch/pull/138951
Approved by: https://github.com/cyyever, https://github.com/adamomainz
This commit is contained in:
Dan Zimmerman 2024-10-28 18:26:40 +00:00 committed by PyTorch MergeBot
parent 817e57f832
commit f466df63a9

View file

@ -59,6 +59,7 @@ __device__ __forceinline__ uint32_t
cas(uint32_t* addr, uint32_t compare, uint32_t val) {
#if defined(USE_ROCM) || (defined(__CUDA_ARCH__) && (__CUDA_ARCH__ < 800))
CUDA_KERNEL_ASSERT(false);
return 0;
#else
uint32_t old_val;
if constexpr (Sem == MemOpSem::Relaxed) {