ROCR-Runtime icon indicating copy to clipboard operation
ROCR-Runtime copied to clipboard

os_linux: Support non-glibc pthread affinity

Open jpsamaroo opened this issue 3 years ago • 1 comments

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.

jpsamaroo avatar Jul 15 '22 11:07 jpsamaroo

Also, I don't do #ifdef _GNU_SOURCE because it seems to be defined even on musl.

jpsamaroo avatar Jul 15 '22 11:07 jpsamaroo

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

dayatsin-amd avatar Dec 01 '23 20:12 dayatsin-amd

Patch will be included in ROCm-6.1 release

dayatsin-amd avatar Dec 13 '23 22:12 dayatsin-amd