ROCR-Runtime
ROCR-Runtime copied to clipboard
os_linux: Support non-glibc pthread affinity
musl doesn't have pthread_attr_setaffinity_np, so we need to use pthread_setaffinity_np on thread after pthread_create.
Note: This is not yet tested on master; it was cherry-picked from my 4.5.2 branch, hence why this is a draft PR.
Also, I don't do #ifdef _GNU_SOURCE because it seems to be defined even on musl.
Thanks for the patch. It seems I can use pthread_setaffinity_np so I removed the old calls to pthread_attr_setaffinity_np.
The patch will be part of ROCm 6.1
Patch will be included in ROCm-6.1 release