From 2cfe8e6b15b03322704b6473bd44089f1a3905c3 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Sat, 11 Jan 2025 07:16:04 +0900 Subject: [PATCH] [SYCL][ESIMD][E2E] Split some atomic update tests (#16580) These are really slow so split them into two parts, we get like a 40 second speedup. Signed-off-by: Sarnie, Nick --- .../Inputs/atomic_update.hpp | 43 ++++++++++++------- .../Inputs/atomic_update_slm.hpp | 40 +++++++++++------ .../atomic_update_acc_dg2_pvc.cpp | 2 +- .../atomic_update_acc_dg2_pvc_2.cpp | 26 +++++++++++ .../atomic_update_acc_dg2_pvc_64_2.cpp | 17 ++++++++ .../atomic_update_acc_dg2_pvc_cmpxchg_2.cpp | 17 ++++++++ .../atomic_update_acc_dg2_pvc_stateless_2.cpp | 14 ++++++ .../atomic_update_slm_acc_pvc.cpp | 2 +- .../atomic_update_slm_acc_pvc_2.cpp | 26 +++++++++++ .../atomic_update_slm_acc_pvc_cmpxchg_2.cpp | 16 +++++++ .../atomic_update_slm_pvc.cpp | 2 +- .../atomic_update_slm_pvc_2.cpp | 26 +++++++++++ .../atomic_update_slm_pvc_cmpxchg_2.cpp | 16 +++++++ .../atomic_update_usm_dg2_pvc.cpp | 2 +- .../atomic_update_usm_dg2_pvc_2.cpp | 30 +++++++++++++ .../atomic_update_usm_dg2_pvc_64_2.cpp | 16 +++++++ .../atomic_update_usm_dg2_pvc_cmpxchg_2.cpp | 17 ++++++++ 17 files changed, 278 insertions(+), 34 deletions(-) create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_acc_dg2_pvc_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_acc_dg2_pvc_64_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_acc_dg2_pvc_cmpxchg_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_acc_dg2_pvc_stateless_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_slm_acc_pvc_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_slm_acc_pvc_cmpxchg_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_slm_pvc_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_slm_pvc_cmpxchg_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_usm_dg2_pvc_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_usm_dg2_pvc_64_2.cpp create mode 100644 sycl/test-e2e/ESIMD/unified_memory_api/atomic_update_usm_dg2_pvc_cmpxchg_2.cpp diff --git a/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update.hpp b/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update.hpp index cf2bccc166ac6..e31f5e923dcf6 100644 --- a/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update.hpp +++ b/sycl/test-e2e/ESIMD/unified_memory_api/Inputs/atomic_update.hpp @@ -118,7 +118,7 @@ bool verify(T *arr, const Config &cfg, size_t size) { template class ImplF, bool UseMask, bool UseProperties> -bool test_usm(queue q, const Config &cfg) { +bool test_usm(queue &q, const Config &cfg) { constexpr auto op = ImplF::atomic_op; using CurAtomicOpT = decltype(op); constexpr int n_args = ImplF::n_args; @@ -245,7 +245,7 @@ bool test_usm(queue q, const Config &cfg) { template class ImplF, bool UseMask, bool UseProperties> -bool test_acc(queue q, const Config &cfg) { +bool test_acc(queue &q, const Config &cfg) { constexpr auto op = ImplF::atomic_op; using CurAtomicOpT = decltype(op); constexpr int n_args = ImplF::n_args; @@ -615,7 +615,7 @@ struct ImplFcmpwr : ImplCmpxchgBase {}; template class ImplF, bool UseMask, bool UseLSCFeatures> -auto run_test(queue q, const Config &cfg) { +auto run_test(queue &q, const Config &cfg) { if constexpr (UseAcc) return test_acc(q, cfg); else @@ -624,7 +624,7 @@ auto run_test(queue q, const Config &cfg) { template class Op, bool UseMask, bool UseLSCFeatures, bool UseAcc, int SignMask = (Signed | Unsigned)> -bool test_int_types(queue q, const Config &cfg) { +bool test_int_types(queue &q, const Config &cfg) { bool passed = true; if constexpr (SignMask & Signed) { // Supported by LSC atomic: @@ -662,7 +662,7 @@ bool test_int_types(queue q, const Config &cfg) { template class Op, bool UseMask, bool UseLSCFeatures, bool UseAcc> -bool test_fp_types(queue q, const Config &cfg) { +bool test_fp_types(queue &q, const Config &cfg) { bool passed = true; // TODO: Enable FADD/FSUB on DG2/PVC when the error in GPU driver is resolved. if constexpr (UseLSCFeatures && @@ -685,7 +685,7 @@ bool test_fp_types(queue q, const Config &cfg) { template