[Openmp-commits] [openmp] e8679b9 - [OpenMP][test][VE] Limit the number of AFFINITY_MAX_CPUS for VE (#65872)
via Openmp-commits
openmp-commits at lists.llvm.org
Tue Sep 12 07:46:00 PDT 2023
Author: Kazushi Marukawa
Date: 2023-09-12T23:45:56+09:00
New Revision: e8679b93daa0db1e9b1838186f6309f59ad5cd0b
URL: https://github.com/llvm/llvm-project/commit/e8679b93daa0db1e9b1838186f6309f59ad5cd0b
DIFF: https://github.com/llvm/llvm-project/commit/e8679b93daa0db1e9b1838186f6309f59ad5cd0b.diff
LOG: [OpenMP][test][VE] Limit the number of AFFINITY_MAX_CPUS for VE (#65872)
Limit the number of AFFINITY_MAX_CPUS for VE because VE's
sched_getaffinity doesn't work correctly with large sized mask buffer.
Added:
Modified:
openmp/runtime/test/affinity/libomp_test_affinity.h
Removed:
################################################################################
diff --git a/openmp/runtime/test/affinity/libomp_test_affinity.h b/openmp/runtime/test/affinity/libomp_test_affinity.h
index 1464d9c41414192..fb9316a3ed2dc4e 100644
--- a/openmp/runtime/test/affinity/libomp_test_affinity.h
+++ b/openmp/runtime/test/affinity/libomp_test_affinity.h
@@ -13,7 +13,13 @@ typedef struct affinity_mask_t {
cpu_set_t *set;
} affinity_mask_t;
+#ifdef __ve__
+// VE's sched_getaffinity put garbage if the buffer is too big. 512 is
+// a good number to make all tests run correctly.
+#define AFFINITY_MAX_CPUS 512
+#else
#define AFFINITY_MAX_CPUS (32 * 64)
+#endif
// Operating system affinity mask API
static void affinity_mask_zero(affinity_mask_t *mask) {
More information about the Openmp-commits
mailing list