As of turning ck_sdpa on by default, builds for early architectures that do not support ck_sdpa have been broken. This is due to the link step only caring about USE_ROCM_CK_SDPA which is now on, but the ck_sdpa target depends on USE_FLASH_ATTENTION and USE_MEM_EFF_ATTENTION, both of which are off in the failing builds. This change makes the link step depend on whether the ck_sdpa target was ever created.
fixes ROCm/TheRock#5178
Pull Request resolved: #185250
Approved by: https://github.com/jeffdaily