Andrew Stubbs wrote:
+ if { [libgomp_check_effective_target_offload_target "amdgcn"] } { + if [check_runtime_nocache usm_available_ {...
...
I was not happy with this either. I've rewritten it to just test if omp_alloc works, although now the reasoning is somewhat circular (test managed memory works if managed memory works). Ideally it would check the HSA_AMD_SVM_* flags directly, but I'm too lazy to write that into libgomp.exp (can we scan GCN_DEBUG output easily?).
Obviously there are checks for output – like dg-output, but I am not aware that those can be easily be used. For the compiler output, there are greps. I wonder whether we should use '|| USM' once Thomas' check_effective_target patch lands? Based on the idea that it should always work with USM to reduce the false negative effective target. * * *
I've attached a v2 patch.
LGTM. Thanks! Tobias
