diff --git a/tests/accessor/CMakeLists.txt b/tests/accessor/CMakeLists.txt deleted file mode 100644 index 82f462065..000000000 --- a/tests/accessor/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -file(GLOB test_cases_list *.cpp) - -add_cts_test(${test_cases_list}) diff --git a/tests/accessor/accessor_default_values_core.cpp b/tests/accessor/accessor_default_values_core.cpp deleted file mode 100644 index 562f3c301..000000000 --- a/tests/accessor/accessor_default_values_core.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor default values. -// -// This test provides verifications that template parameters has default values -// for generic accessor, host_accessor and local_accessor with generic types. -// -*******************************************************************************/ - -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" -#include "accessor_common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_default_values.h" - -using namespace accessor_default_values_test; -using namespace accessor_tests_common; -#endif - -namespace accessor_default_values_test_core { -using namespace sycl_cts; - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Accessors constructor default values test core types.", "[accessor]", - test_combinations)({ common_run_tests(); }); - -} // namespace accessor_default_values_test_core diff --git a/tests/accessor/accessor_default_values_fp16.cpp b/tests/accessor/accessor_default_values_fp16.cpp deleted file mode 100644 index ab65e80e0..000000000 --- a/tests/accessor/accessor_default_values_fp16.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor default values. -// -// This test provides verifications that template parameters has default values -// for generic accessor, host_accessor and local_accessor with sycl::half type. -// -*******************************************************************************/ - -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_default_values.h" - -using namespace accessor_default_values_test; -using namespace accessor_tests_common; -#endif - -namespace accessor_exceptions_test_fp16 { -using namespace sycl_cts; - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Accessors constructor default values test fp16 types.", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_tests{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace accessor_exceptions_test_fp16 diff --git a/tests/accessor/accessor_default_values_fp64.cpp b/tests/accessor/accessor_default_values_fp64.cpp deleted file mode 100644 index 94573a778..000000000 --- a/tests/accessor/accessor_default_values_fp64.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor default values. -// -// This test provides verifications that template parameters has default values -// for generic accessor, host_accessor and local_accessor with double type. -// -*******************************************************************************/ - -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_default_values.h" - -using namespace accessor_default_values_test; -using namespace accessor_tests_common; -#endif - -namespace accessor_default_values_test_fp64 { -using namespace sycl_cts; - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Accessors constructor default values test fp64 types.", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_tests{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace accessor_default_values_test_fp64 diff --git a/tests/accessor/accessor_exceptions_core.cpp b/tests/accessor/accessor_exceptions_core.cpp deleted file mode 100644 index f1d1a459a..000000000 --- a/tests/accessor/accessor_exceptions_core.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor exceptions. -// -// This test provides verifications that exception really has been thrown for -// generic accessor, host_accessor and local_accessor with generic types. -// -*******************************************************************************/ - -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_exceptions.h" - -using namespace accessor_exceptions_test; -using namespace accessor_tests_common; -#endif - -namespace accessor_exceptions_test_core { -using namespace sycl_cts; - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor constructor exceptions test. Core types.", - "[accessor]", test_combinations)({ - common_run_tests(); -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor constructor exceptions test. Core types.", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor constructor exceptions test. Core types.", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace accessor_exceptions_test_core diff --git a/tests/accessor/accessor_exceptions_fp16.cpp b/tests/accessor/accessor_exceptions_fp16.cpp deleted file mode 100644 index 835cc6349..000000000 --- a/tests/accessor/accessor_exceptions_fp16.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor exceptions. -// -// This test provides verifications that exception really has been thrown for -// generic accessor, host_accessor and local_accessor with sycl::half type. -// -*******************************************************************************/ -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_exceptions.h" - -using namespace accessor_exceptions_test; -using namespace accessor_tests_common; -#endif - -namespace accessor_exceptions_test_fp16 { -using namespace sycl_cts; - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor constructor exceptions. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_tests_with_types{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor constructor exceptions. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_tests_with_types{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor constructor exceptions. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_tests_with_types{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace accessor_exceptions_test_fp16 diff --git a/tests/accessor/accessor_exceptions_fp64.cpp b/tests/accessor/accessor_exceptions_fp64.cpp deleted file mode 100644 index c0366c6a6..000000000 --- a/tests/accessor/accessor_exceptions_fp64.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor exceptions. -// -// This test provides verifications that exception really has been thrown for -// generic accessor, host_accessor and local_accessor with double type. -// -*******************************************************************************/ -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_exceptions.h" - -using namespace accessor_exceptions_test; -using namespace accessor_tests_common; -#endif - -namespace accessor_exceptions_test_fp64 { -using namespace sycl_cts; - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor constructor exceptions. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_tests_with_types{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor constructor exceptions. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_tests_with_types{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor constructor exceptions. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_tests_with_types{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace accessor_exceptions_test_fp64 diff --git a/tests/accessor/accessor_implicit_conversions_core.cpp b/tests/accessor/accessor_implicit_conversions_core.cpp deleted file mode 100644 index a9bb12d92..000000000 --- a/tests/accessor/accessor_implicit_conversions_core.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor implicit conversions for core types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "accessor_implicit_conversions.h" - -namespace accessor_implicit_conversions_core { -using namespace accessor_implicit_conversions; -} // namespace accessor_implicit_conversions_core - -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace accessor_implicit_conversions_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor implicit conversion. core types", - "[accessor][generic_accessor][conversion][core]", generic_test_combinations)({ - common_run_tests(); -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("The sycl::local_accessor implicit conversion. core types", - "[accessor][local_accessor][conversion][core]", host_local_test_combinations)({ - common_run_tests(); -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("The sycl::host_accessor implicit conversion. core types", - "[accessor][host_accessor][conversion][core]", host_local_test_combinations)({ - common_run_tests(); -}); - -} // namespace accessor_implicit_conversions_core diff --git a/tests/accessor/accessor_implicit_conversions_fp16.cpp b/tests/accessor/accessor_implicit_conversions_fp16.cpp deleted file mode 100644 index cd5c75fba..000000000 --- a/tests/accessor/accessor_implicit_conversions_fp16.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor implicit conversions for the sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "accessor_implicit_conversions.h" - -namespace accessor_implicit_conversions_fp16 { -using namespace accessor_implicit_conversions; -} // namespace accessor_implicit_conversions_fp16 - -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace accessor_implicit_conversions_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor implicit conversion. fp16 type", - "[accessor][generic_accessor][conversion][fp16]", generic_test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN("Device does not support half precision floating point operations"); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - // TODO: implement factory functions for extending type packs and remove - // for_all_types/for_type_and_vectors/for_all_types_and_vectors/ - // for_type_vectors_marray/for_all_types_vectors_marray/ - // for_type_and_marrays/for_all_types_and_marrays/etc. - // As result, it would be possible to use for_all_combinations once per test - // with no wrappers at all, providing any combination of type coverage - // Specifically for this use case: - // - there would be no need in run_implicit_conversion_test wrapper - // - we could easily provide coverage for any additional fp16 type with no - // need in further wrappers - // - we could easily enable additional dependant types coverage with no - // need in further wrappers - // For example: - // enum class tcov : unsigned long long { ... - // - // const auto types = get_fp16_types(); - // for_all_combinations( - // types, targets, dimensions); - // - for_type_vectors_marray("sycl::half"); -#else - run_test_generic{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("The sycl::local_accessor implicit conversion. fp16 type", - "[accessor][local_accessor][conversion][fp16]", host_local_test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN("Device does not support half precision floating point operations"); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_test_local{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("The sycl::host_accessor implicit conversion. fp16 type", - "[accessor][host_accessor][conversion][fp16]", host_local_test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN("Device does not support half precision floating point operations"); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_test_host{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace accessor_implicit_conversions_fp16 diff --git a/tests/accessor/accessor_implicit_conversions_fp64.cpp b/tests/accessor/accessor_implicit_conversions_fp64.cpp deleted file mode 100644 index ab67df498..000000000 --- a/tests/accessor/accessor_implicit_conversions_fp64.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for accessor implicit conversions for the double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "accessor_implicit_conversions.h" - -namespace accessor_implicit_conversions_fp64 { -using namespace accessor_implicit_conversions; -} // namespace accessor_implicit_conversions_fp64 - -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace accessor_implicit_conversions_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor implicit conversion. fp64 type", - "[accessor][generic_accessor][conversion][fp64]", generic_test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN("Device does not support double precision floating point operations"); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_test_generic{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("The sycl::local_accessor implicit conversion. fp64 type", - "[accessor][local_accessor][conversion][fp64]", host_local_test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN("Device does not support double precision floating point operations"); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_test_local{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("The sycl::host_accessor implicit conversion. fp64 type", - "[accessor][host_accessor][conversion][fp64]", host_local_test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN("Device does not support double precision floating point operations"); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_test_host{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace accessor_implicit_conversions_fp64 diff --git a/tests/accessor/generic_accessor_api_core.cpp b/tests/accessor/generic_accessor_api_core.cpp deleted file mode 100644 index c1ad31dc3..000000000 --- a/tests/accessor/generic_accessor_api_core.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides generic sycl::accessor api test for generic types -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_api_common.h" - -using namespace generic_accessor_api_common; -#endif - -namespace generic_accessor_api_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor api. core types", "[accessor]", test_combinations)({ - using namespace generic_accessor_api_common; - common_run_tests(); -}); - -} // namespace generic_accessor_api_core diff --git a/tests/accessor/generic_accessor_api_fp16.cpp b/tests/accessor/generic_accessor_api_fp16.cpp deleted file mode 100644 index dea61c15c..000000000 --- a/tests/accessor/generic_accessor_api_fp16.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides generic sycl::accessor api test for the sycl::half type -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_api_common.h" - -using namespace generic_accessor_api_common; -#endif - -namespace generic_accessor_api_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor api. fp16 type", "[accessor]", test_combinations)({ - using namespace generic_accessor_api_common; - - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); -#else - run_generic_api_for_type{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace generic_accessor_api_fp16 diff --git a/tests/accessor/generic_accessor_api_fp64.cpp b/tests/accessor/generic_accessor_api_fp64.cpp deleted file mode 100644 index 0fe0d3ed6..000000000 --- a/tests/accessor/generic_accessor_api_fp64.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides generic sycl::accessor api test for the double type -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "generic_accessor_api_common.h" - -using namespace generic_accessor_api_common; -#endif - -namespace generic_accessor_api_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor api. fp64 type", "[accessor]", test_combinations)({ - using namespace generic_accessor_api_common; - - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_generic_api_for_type{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace generic_accessor_api_fp64 diff --git a/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp b/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp deleted file mode 100644 index e6cb84211..000000000 --- a/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor constructors with buffers test for generic -// types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "generic_accessor_common_buffer_constructors.h" - -using namespace generic_accessor_common_buffer_constructors; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_common_buffer_constructors_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor buffer constructors. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace generic_accessor_common_buffer_constructors_core diff --git a/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp b/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp deleted file mode 100644 index 80ce58d43..000000000 --- a/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor constructors with buffers test for double -// type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "generic_accessor_common_buffer_constructors.h" - -using namespace generic_accessor_common_buffer_constructors; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_common_buffer_constructors_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor buffer constructors. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_generic_common_buffer_constructors_test{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_common_buffer_constructors_fp64 diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp b/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp deleted file mode 100644 index 24c9c190b..000000000 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor constructors with buffer and tag test for -// generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "generic_accessor_common_buffer_tag_constructors.h" - -using namespace generic_accessor_common_buffer_tag_constructors; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_common_buffer_tag_constructors_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor buffer tag constructors. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace generic_accessor_common_buffer_tag_constructors_core diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp b/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp deleted file mode 100644 index 4ecb4fc52..000000000 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor constructors with buffer and tag test for -// sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "generic_accessor_common_buffer_tag_constructors.h" - -using namespace generic_accessor_common_buffer_tag_constructors; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_common_buffer_tag_constructors_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor buffer tag constructors. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_generic_common_buffer_tag_constructors_test{}( - "sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_common_buffer_tag_constructors_fp16 diff --git a/tests/accessor/generic_accessor_def_constructor_fp16.cpp b/tests/accessor/generic_accessor_def_constructor_fp16.cpp deleted file mode 100644 index b2a9edab7..000000000 --- a/tests/accessor/generic_accessor_def_constructor_fp16.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor def constructor test for sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_def_constructor.h" - -using namespace generic_accessor_def_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_def_constructor_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor def constructors. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_generic_def_constructor_test{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_def_constructor_fp16 diff --git a/tests/accessor/generic_accessor_def_constructor_fp64.cpp b/tests/accessor/generic_accessor_def_constructor_fp64.cpp deleted file mode 100644 index c90f194b6..000000000 --- a/tests/accessor/generic_accessor_def_constructor_fp64.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor def constructor test for double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_def_constructor.h" - -using namespace generic_accessor_def_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_def_constructor_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor def constructors. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_generic_def_constructor_test{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_def_constructor_fp64 diff --git a/tests/accessor/generic_accessor_linearization_fp16.cpp b/tests/accessor/generic_accessor_linearization_fp16.cpp deleted file mode 100644 index 68efecf06..000000000 --- a/tests/accessor/generic_accessor_linearization_fp16.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides tests for generic accessor linearization with sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_linearization.h" - -using namespace generic_accessor_linearization; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace generic_accessor_linearization_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor linearization test. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_generic_linearization_for_type{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace generic_accessor_linearization_fp16 diff --git a/tests/accessor/generic_accessor_linearization_fp64.cpp b/tests/accessor/generic_accessor_linearization_fp64.cpp deleted file mode 100644 index f6004deba..000000000 --- a/tests/accessor/generic_accessor_linearization_fp64.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides tests for generic accessor linearization with double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_linearization.h" - -using namespace generic_accessor_linearization; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace generic_accessor_linearization_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor linearization test. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_generic_linearization_for_type{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace generic_accessor_linearization_fp64 diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp deleted file mode 100644 index 6c018d155..000000000 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder buffer constructor test for -// generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_buffer_constructor.h" - -using namespace generic_accessor_placeholder_buffer_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_buffer_constructor_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder constructors. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace generic_accessor_placeholder_buffer_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp deleted file mode 100644 index d537492e0..000000000 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder buffer constructor test for -// double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_buffer_constructor.h" - -using namespace generic_accessor_placeholder_buffer_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_buffer_constructor_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer constructor. fp64 type", - "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_generic_placeholder_buffer_constructor_test{}( - "double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_placeholder_buffer_constructor_fp64 diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp deleted file mode 100644 index 3a80ef043..000000000 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder buffer range constructor test -// for generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_buffer_range_constructor.h" - -using namespace generic_accessor_placeholder_buffer_range_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_buffer_range_constructor_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer range constructor. core types", - "[accessor]", test_combinations)({ - common_run_tests(); -}); - -} // namespace generic_accessor_placeholder_buffer_range_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp deleted file mode 100644 index 00068aee1..000000000 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder buffer range constructor test -// for double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_buffer_range_constructor.h" - -using namespace generic_accessor_placeholder_buffer_range_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_buffer_range_constructor_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer range constructor. fp64 type", - "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray< - run_generic_placeholder_buffer_range_constructor_test, double, - TestType>("double"); -#else - run_generic_placeholder_buffer_range_constructor_test{}( - "double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_placeholder_buffer_range_constructor_fp64 diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp deleted file mode 100644 index 0d12fa443..000000000 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder buffer range offset constructor -// test for generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_buffer_range_offset_constructor.h" - -using namespace generic_accessor_placeholder_buffer_range_offset_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_buffer_range_offset_constructor_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer range offset constructor. core " - "types", - "[accessor]", test_combinations)({ - common_run_tests(); -}); - -} // namespace - // generic_accessor_placeholder_buffer_range_offset_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp deleted file mode 100644 index a73bcd223..000000000 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder buffer range offset constructor -// test for sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_buffer_range_offset_constructor.h" - -using namespace generic_accessor_placeholder_buffer_range_offset_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_buffer_range_offset_constructor_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer range offset constructor. fp16 " - "type", - "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray< - run_generic_placeholder_buffer_range_offset_constructor_test, - sycl::half, TestType>("sycl::half"); -#else - run_generic_placeholder_buffer_range_offset_constructor_test{}( - "sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); - -} // namespace - // generic_accessor_placeholder_buffer_range_offset_constructor_fp16 diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp deleted file mode 100644 index f4504e213..000000000 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder zero-length buffer constructor -// test for generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_zero_length_buffer_constructor.h" - -using namespace generic_accessor_placeholder_zero_length_buffer_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_zero_length_buffer_constructor_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer constructor. core " - "types", - "[accessor]", test_combinations)({ - common_run_tests(); -}); - -} // namespace generic_accessor_placeholder_zero_length_buffer_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp deleted file mode 100644 index a23c38d28..000000000 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder zero-length buffer constructor -// test for double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_zero_length_buffer_constructor.h" - -using namespace generic_accessor_placeholder_zero_length_buffer_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_zero_length_buffer_constructor_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer constructor. fp64 type", - "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray< - run_generic_placeholder_zero_length_buffer_constructor, double, - TestType>("double"); -#else - run_generic_placeholder_zero_length_buffer_constructor{}( - "double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_placeholder_zero_length_buffer_constructor_fp64 diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp deleted file mode 100644 index f6cf60296..000000000 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder zero-length buffer range -// constructor test for generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_zero_length_buffer_range_constructor.h" - -using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer range constructor. " - "core types", - "[accessor]", test_combinations)({ - common_run_tests< - run_generic_placeholder_zero_length_buffer_range_constructor_test, - TestType>(); -}); - -} // namespace - // generic_accessor_placeholder_zero_length_buffer_range_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp deleted file mode 100644 index c8e133415..000000000 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder zero-length buffer range -// constructor test for sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_zero_length_buffer_range_constructor.h" - -using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer range constructor. " - "fp16 type", - "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray< - run_generic_placeholder_zero_length_buffer_range_constructor_test, - sycl::half, TestType>("sycl::half"); -#else - run_generic_placeholder_zero_length_buffer_range_constructor_test< - sycl::half, TestType>{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); - -} // namespace - // generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16 diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp deleted file mode 100644 index 5a9c81f6c..000000000 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder zero-length buffer range offset -// constructor test for generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h" - -using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer range offset " - "constructor. core types", - "[accessor]", test_combinations)({ - common_run_tests< - run_generic_placeholder_zero_length_buffer_range_offset_constructor_test, - TestType>(); -}); - -} // namespace - // generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp deleted file mode 100644 index b35ef6783..000000000 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor placeholder zero-length buffer range offset -// constructor test for sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h" - -using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer range offset " - "constructor. fp16 type", - "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray< - run_generic_placeholder_zero_length_buffer_range_offset_constructor_test, - sycl::half, TestType>("sycl::half"); -#else - run_generic_placeholder_zero_length_buffer_range_offset_constructor_test< - sycl::half, TestType>{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); - -} // namespace - // generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16 diff --git a/tests/accessor/generic_accessor_properties_core.cpp b/tests/accessor/generic_accessor_properties_core.cpp deleted file mode 100644 index d8eedc0ea..000000000 --- a/tests/accessor/generic_accessor_properties_core.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for generic accessor properties with generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_properties.h" - -using namespace generic_accessor_properties; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace generic_accessor_properties_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor properties test. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace generic_accessor_properties_core diff --git a/tests/accessor/generic_accessor_properties_fp16.cpp b/tests/accessor/generic_accessor_properties_fp16.cpp deleted file mode 100644 index 939bae249..000000000 --- a/tests/accessor/generic_accessor_properties_fp16.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for generic accessor properties with sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_properties.h" - -using namespace generic_accessor_properties; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace generic_accessor_properties_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor properties test. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); -#else - run_generic_properties_tests{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace generic_accessor_properties_fp16 diff --git a/tests/accessor/generic_accessor_properties_fp64.cpp b/tests/accessor/generic_accessor_properties_fp64.cpp deleted file mode 100644 index acd4ceb46..000000000 --- a/tests/accessor/generic_accessor_properties_fp64.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for generic accessor properties with double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_properties.h" - -using namespace generic_accessor_properties; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace generic_accessor_properties_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor properties test. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_generic_properties_tests{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace generic_accessor_properties_fp64 diff --git a/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp b/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp deleted file mode 100644 index d251a5469..000000000 --- a/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor zero dimension constructor test for -// sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "generic_accessor_zero_dim_constructor.h" - -using namespace generic_accessor_zero_dim_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_zero_dim_constructor_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor zero-dim constructors. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_generic_zero_dim_constructor_test{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_zero_dim_constructor_fp16 diff --git a/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp b/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp deleted file mode 100644 index 6a2333a50..000000000 --- a/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides generic sycl::accessor zero dimension constructor test for double -// type -// -*******************************************************************************/ - -#include "../common/common.h" - -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "generic_accessor_zero_dim_constructor.h" - -using namespace generic_accessor_zero_dim_constructor; -#endif - -#include "../common/disabled_for_test_case.h" - -namespace generic_accessor_zero_dim_constructor_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor zero-dim constructors. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_generic_zero_dim_constructor_test{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); - -} // namespace generic_accessor_zero_dim_constructor_fp64 diff --git a/tests/accessor/host_accessor_api_core.cpp b/tests/accessor/host_accessor_api_core.cpp deleted file mode 100644 index 78efeb9f4..000000000 --- a/tests/accessor/host_accessor_api_core.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides sycl::host_accessor api test for generic types -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "host_accessor_api_common.h" - -using namespace host_accessor_api_common; -#endif - -namespace host_accessor_api_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor api. core types", "[accessor]", test_combinations)({ - common_run_tests(); -}); - -} // namespace host_accessor_api_core diff --git a/tests/accessor/host_accessor_api_fp16.cpp b/tests/accessor/host_accessor_api_fp16.cpp deleted file mode 100644 index 159cb73e1..000000000 --- a/tests/accessor/host_accessor_api_fp16.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides sycl::host_accessor api test for the sycl::half type -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "host_accessor_api_common.h" - -using namespace host_accessor_api_common; -#endif - -namespace host_accessor_api_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor api. fp16 type", "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); -#else - run_host_accessor_api_for_type{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace host_accessor_api_fp16 diff --git a/tests/accessor/host_accessor_api_fp64.cpp b/tests/accessor/host_accessor_api_fp64.cpp deleted file mode 100644 index 96c4a76b4..000000000 --- a/tests/accessor/host_accessor_api_fp64.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides sycl::host_accessor api test for the double type -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "host_accessor_api_common.h" - -using namespace host_accessor_api_common; -#endif - -namespace host_accessor_api_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor api. fp64 type", "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_host_accessor_api_for_type{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace host_accessor_api_fp64 diff --git a/tests/accessor/host_accessor_constructors_core.cpp b/tests/accessor/host_accessor_constructors_core.cpp deleted file mode 100644 index ed0cc2d6e..000000000 --- a/tests/accessor/host_accessor_constructors_core.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides host_accessor constructors test for generic types -// -*******************************************************************************/ - -#include "../common/common.h" -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "host_accessor_constructors.h" - -using namespace host_accessor_constructors; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_constructors_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor constructors. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace host_accessor_constructors_core diff --git a/tests/accessor/host_accessor_constructors_fp64.cpp b/tests/accessor/host_accessor_constructors_fp64.cpp deleted file mode 100644 index 9be0f2bad..000000000 --- a/tests/accessor/host_accessor_constructors_fp64.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides host_accessor constructors test for the double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "host_accessor_constructors.h" - -using namespace host_accessor_constructors; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_constructors_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor constructors. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_host_constructors_test{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace host_accessor_constructors_fp64 diff --git a/tests/accessor/host_accessor_linearization_fp16.cpp b/tests/accessor/host_accessor_linearization_fp16.cpp deleted file mode 100644 index ad315c5de..000000000 --- a/tests/accessor/host_accessor_linearization_fp16.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides tests for host_accessor linearization with sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "host_accessor_linearization.h" - -using namespace host_accessor_linearization; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_linearization_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor linearization test. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_host_linearization_for_type{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace host_accessor_linearization_fp16 diff --git a/tests/accessor/host_accessor_linearization_fp64.cpp b/tests/accessor/host_accessor_linearization_fp64.cpp deleted file mode 100644 index 78fb39b52..000000000 --- a/tests/accessor/host_accessor_linearization_fp64.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides tests for host_accessor linearization with double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "host_accessor_linearization.h" - -using namespace host_accessor_linearization; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_linearization_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor linearization test. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_host_linearization_for_type{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace host_accessor_linearization_fp64 diff --git a/tests/accessor/host_accessor_properties_core.cpp b/tests/accessor/host_accessor_properties_core.cpp deleted file mode 100644 index eda715c90..000000000 --- a/tests/accessor/host_accessor_properties_core.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for host_accessor properties with generic types -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "host_accessor_properties.h" - -using namespace host_accessor_properties; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_properties_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor properties. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace host_accessor_properties_core diff --git a/tests/accessor/host_accessor_properties_fp16.cpp b/tests/accessor/host_accessor_properties_fp16.cpp deleted file mode 100644 index 296ed21fd..000000000 --- a/tests/accessor/host_accessor_properties_fp16.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for host_accessor properties with sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "host_accessor_properties.h" - -using namespace host_accessor_properties; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_properties_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor properties. fp16 type", "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); -#else - run_host_properties_tests{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace host_accessor_properties_fp16 diff --git a/tests/accessor/host_accessor_properties_fp64.cpp b/tests/accessor/host_accessor_properties_fp64.cpp deleted file mode 100644 index 4a8f4f1f8..000000000 --- a/tests/accessor/host_accessor_properties_fp64.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for host_accessor properties with double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::host_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "host_accessor_properties.h" - -using namespace host_accessor_properties; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace host_accessor_properties_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor properties. fp64 type", "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_host_properties_tests{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace host_accessor_properties_fp64 diff --git a/tests/accessor/local_accessor_access_among_work_items_core.cpp b/tests/accessor/local_accessor_access_among_work_items_core.cpp deleted file mode 100644 index b0b31c214..000000000 --- a/tests/accessor/local_accessor_access_among_work_items_core.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for local_accessor. -// -// This test provides verifications that local_accessor can access the memory -// shared among work-items. For generic types. -// -*******************************************************************************/ - -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "local_accessor_access_among_work_items.h" - -using namespace local_accessor_access_among_work_items; -using namespace accessor_tests_common; -#endif - -namespace local_accessor_access_among_work_items_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor access among work items. core types", "[accessor]", - test_combinations)({ - common_run_tests(); -}); - -} // namespace local_accessor_access_among_work_items_core diff --git a/tests/accessor/local_accessor_access_among_work_items_fp16.cpp b/tests/accessor/local_accessor_access_among_work_items_fp16.cpp deleted file mode 100644 index 571ed7eb7..000000000 --- a/tests/accessor/local_accessor_access_among_work_items_fp16.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for local_accessor. -// -// This test provides verifications that local_accessor can access the memory -// shared among work-items. For the sycl::half type. -// -*******************************************************************************/ -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "local_accessor_access_among_work_items.h" - -using namespace local_accessor_access_among_work_items; -using namespace accessor_tests_common; -#endif - -namespace local_accessor_access_among_work_items_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor access among work items. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_local_accessor_access_among_work_items_tests{}( - "sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace local_accessor_access_among_work_items_fp16 diff --git a/tests/accessor/local_accessor_access_among_work_items_fp64.cpp b/tests/accessor/local_accessor_access_among_work_items_fp64.cpp deleted file mode 100644 index c0bc770b7..000000000 --- a/tests/accessor/local_accessor_access_among_work_items_fp64.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides tests for local_accessor. -// -// This test provides verifications that local_accessor can access the memory -// shared among work-items. For the double type. -// -*******************************************************************************/ -#include "../common/common.h" -#include "../common/disabled_for_test_case.h" - -// FIXME: re-enable when sycl::accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "local_accessor_access_among_work_items.h" - -using namespace local_accessor_access_among_work_items; -using namespace accessor_tests_common; -#endif - -namespace local_accessor_access_among_work_items_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor access among work items. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_local_accessor_access_among_work_items_tests{}( - "double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace local_accessor_access_among_work_items_fp64 diff --git a/tests/accessor/local_accessor_api_core.cpp b/tests/accessor/local_accessor_api_core.cpp deleted file mode 100644 index 1b883cde4..000000000 --- a/tests/accessor/local_accessor_api_core.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides sycl::local_accessor api test for generic types -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "local_accessor_api_common.h" - -using namespace local_accessor_api_common; -#endif - -namespace local_accessor_api_core { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor api. core types", "[accessor]", - test_combinations)({ common_run_tests(); }); - -} // namespace local_accessor_api_core diff --git a/tests/accessor/local_accessor_api_fp16.cpp b/tests/accessor/local_accessor_api_fp16.cpp deleted file mode 100644 index 60555a12e..000000000 --- a/tests/accessor/local_accessor_api_fp16.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides sycl::local_accessor api test for the sycl::half type -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "local_accessor_api_common.h" - -using namespace local_accessor_api_common; -#endif - -namespace local_accessor_api_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor api. fp16 type", "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); -#else - run_local_api_for_type{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace local_accessor_api_fp16 diff --git a/tests/accessor/local_accessor_api_fp64.cpp b/tests/accessor/local_accessor_api_fp64.cpp deleted file mode 100644 index 0f89b2329..000000000 --- a/tests/accessor/local_accessor_api_fp64.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Provides sycl::local_accessor api test for the double type -// -*******************************************************************************/ -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "local_accessor_api_common.h" - -using namespace local_accessor_api_common; -#endif - -namespace local_accessor_api_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor api. fp64 type", "[accessor]", test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); -#else - run_local_api_for_type{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); -} // namespace local_accessor_api_fp64 diff --git a/tests/accessor/local_accessor_constructors_fp16.cpp b/tests/accessor/local_accessor_constructors_fp16.cpp deleted file mode 100644 index fad6e170d..000000000 --- a/tests/accessor/local_accessor_constructors_fp16.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides sycl::local_accessor test for the sycl::half type -// -*******************************************************************************/ -#include "../common/common.h" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "local_accessor_constructors.h" - -using namespace local_accessor_constructors; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace local_accessor_constructors_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor constructors. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); -#else - run_local_constructors_test{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } -}); -} // namespace local_accessor_constructors_fp16 diff --git a/tests/accessor/local_accessor_constructors_fp64.cpp b/tests/accessor/local_accessor_constructors_fp64.cpp deleted file mode 100644 index 1eaf1118f..000000000 --- a/tests/accessor/local_accessor_constructors_fp64.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides sycl::local_accessor test for the double type -// -*******************************************************************************/ -#include "../common/common.h" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" -#include "local_accessor_constructors.h" - -using namespace local_accessor_constructors; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace local_accessor_constructors_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor constructors. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_local_constructors_test{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } -}); -} // namespace local_accessor_constructors_fp64 diff --git a/tests/accessor/local_accessor_linearization_fp16.cpp b/tests/accessor/local_accessor_linearization_fp16.cpp deleted file mode 100644 index 4059dd9e4..000000000 --- a/tests/accessor/local_accessor_linearization_fp16.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides tests for local_accessor linearization with sycl::half type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "local_accessor_linearization.h" - -using namespace local_accessor_linearization; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace local_accessor_linearization_fp16 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor linearization test. fp16 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); -#else - run_local_linearization_for_type{}("sycl::half"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace local_accessor_linearization_fp16 diff --git a/tests/accessor/local_accessor_linearization_fp64.cpp b/tests/accessor/local_accessor_linearization_fp64.cpp deleted file mode 100644 index a1b9ab06c..000000000 --- a/tests/accessor/local_accessor_linearization_fp64.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -// -// SYCL 2020 Conformance Test Suite -// -// Copyright (c) 2023 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides tests for local_accessor linearization with double type -// -*******************************************************************************/ - -#include "../common/common.h" - -// FIXME: re-enable when sycl::local_accessor is implemented -#if !SYCL_CTS_COMPILING_WITH_HIPSYCL - -#include "accessor_common.h" -#include "local_accessor_linearization.h" - -using namespace local_accessor_linearization; -#endif - -#include "../common/disabled_for_test_case.h" -#include "catch2/catch_test_macros.hpp" - -namespace local_accessor_linearization_fp64 { - -DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor linearization test. fp64 type", "[accessor]", - test_combinations)({ - auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp64)) { - WARN( - "Device does not support double precision floating point operations. " - "Skipping the test case."); - return; - } - -#if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); -#else - run_local_linearization_for_type{}("double"); -#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE -}); - -} // namespace local_accessor_linearization_fp64 diff --git a/tests/accessor_basic/CMakeLists.txt b/tests/accessor_basic/CMakeLists.txt new file mode 100644 index 000000000..ca68c6345 --- /dev/null +++ b/tests/accessor_basic/CMakeLists.txt @@ -0,0 +1,35 @@ +function(configure_test_case) + cmake_parse_arguments(CTS + "" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN}) + set(CTS_TYPE_NAME ${CTS_TYPE}) + configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME}) + list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}") + set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE) +endfunction() + +list(APPEND TEMPLATE_LIST + "accessor_default_values" + "accessor_exceptions" + "accessor_implicit_conversions" +) +set(TYPE_LIST "") +get_std_type(TYPE_LIST) +half_double_filter(TYPE_LIST) +list(APPEND TYPE_LIST "user_struct") + +file(GLOB test_cases_list *.cpp) + +foreach(TEMP IN LISTS TEMPLATE_LIST) + foreach(TY IN LISTS TYPE_LIST) + set(OUT_FILE "${TEMP}_${TY}.cpp") + STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE}) + STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE}) + configure_test_case( + TYPE "${TY}" + IN_FILENAME "${TEMP}.cpp.in" + OUT_FILENAME ${OUT_FILE} + TEST_LIST test_cases_list) + endforeach() +endforeach() + +add_cts_test(${test_cases_list}) diff --git a/tests/accessor/accessor_common.h b/tests/accessor_basic/accessor_common.h similarity index 100% rename from tests/accessor/accessor_common.h rename to tests/accessor_basic/accessor_common.h diff --git a/tests/accessor_basic/accessor_default_values.cpp.in b/tests/accessor_basic/accessor_default_values.cpp.in new file mode 100644 index 000000000..80441e823 --- /dev/null +++ b/tests/accessor_basic/accessor_default_values.cpp.in @@ -0,0 +1,59 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides tests for accessor default values. +// +// This test provides verifications that template parameters has default values +// for generic accessor, host_accessor and local_accessor with generic types. +// +*******************************************************************************/ + +#include "../common/common.h" +#include "../common/disabled_for_test_case.h" +#include "accessor_common.h" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL + +#include "accessor_default_values.h" + +using namespace accessor_default_values_test; +using namespace accessor_tests_common; +#endif + +namespace accessor_default_values_test_core { +using namespace sycl_cts; + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " Accessors constructor default values test", "[accessor]", + test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_tests{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_tests{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace accessor_default_values_test_core diff --git a/tests/accessor/accessor_default_values.h b/tests/accessor_basic/accessor_default_values.h similarity index 100% rename from tests/accessor/accessor_default_values.h rename to tests/accessor_basic/accessor_default_values.h diff --git a/tests/accessor_basic/accessor_exceptions.cpp.in b/tests/accessor_basic/accessor_exceptions.cpp.in new file mode 100644 index 000000000..d0f0dab08 --- /dev/null +++ b/tests/accessor_basic/accessor_exceptions.cpp.in @@ -0,0 +1,113 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides tests for accessor exceptions. +// +// This test provides verifications that exception really has been thrown for +// generic accessor, host_accessor and local_accessor with generic types. +// +*******************************************************************************/ + +#include "../common/common.h" +#include "../common/disabled_for_test_case.h" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL + +#include "accessor_exceptions.h" + +using namespace accessor_exceptions_test; +using namespace accessor_tests_common; +#endif + +namespace accessor_exceptions_test_core { +using namespace sycl_cts; + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " Generic sycl::accessor constructor exceptions test.", + "[accessor]", test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_tests_with_types{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_tests_with_types{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " sycl::local_accessor constructor exceptions test.", + "[accessor]", test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_tests_with_types{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_tests_with_types{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " sycl::host_accessor constructor exceptions test.", + "[accessor]", test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_tests_with_types{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_tests_with_types{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace accessor_exceptions_test_core diff --git a/tests/accessor/accessor_exceptions.h b/tests/accessor_basic/accessor_exceptions.h similarity index 100% rename from tests/accessor/accessor_exceptions.h rename to tests/accessor_basic/accessor_exceptions.h diff --git a/tests/accessor_basic/accessor_implicit_conversions.cpp.in b/tests/accessor_basic/accessor_implicit_conversions.cpp.in new file mode 100644 index 000000000..2358bcb4e --- /dev/null +++ b/tests/accessor_basic/accessor_implicit_conversions.cpp.in @@ -0,0 +1,111 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides tests for accessor implicit conversions for core types +// +*******************************************************************************/ + +#include "../common/common.h" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL + +#include "accessor_common.h" +#include "accessor_implicit_conversions.h" + +namespace accessor_implicit_conversions_core { +using namespace accessor_implicit_conversions; +} // namespace accessor_implicit_conversions_core + +#endif + +#include "../common/disabled_for_test_case.h" +#include "catch2/catch_test_macros.hpp" + +namespace accessor_implicit_conversions_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " Generic sycl::accessor implicit conversion.", + "[accessor][generic_accessor][conversion][core]", generic_test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_test_generic{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_test_generic{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " The sycl::local_accessor implicit conversion.", + "[accessor][local_accessor][conversion][core]", host_local_test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_test_local{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_test_local{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " The sycl::host_accessor implicit conversion.", + "[accessor][host_accessor][conversion][core]", host_local_test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_test_host{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_test_host{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace accessor_implicit_conversions_core diff --git a/tests/accessor/accessor_implicit_conversions.h b/tests/accessor_basic/accessor_implicit_conversions.h similarity index 100% rename from tests/accessor/accessor_implicit_conversions.h rename to tests/accessor_basic/accessor_implicit_conversions.h diff --git a/tests/accessor/accessor_iterator_requirement.cpp b/tests/accessor_basic/accessor_iterator_requirement.cpp similarity index 100% rename from tests/accessor/accessor_iterator_requirement.cpp rename to tests/accessor_basic/accessor_iterator_requirement.cpp diff --git a/tests/accessor/accessor_requisite_entire_buffer.cpp b/tests/accessor_basic/accessor_requisite_entire_buffer.cpp similarity index 100% rename from tests/accessor/accessor_requisite_entire_buffer.cpp rename to tests/accessor_basic/accessor_requisite_entire_buffer.cpp diff --git a/tests/accessor_generic/CMakeLists.txt b/tests/accessor_generic/CMakeLists.txt new file mode 100644 index 000000000..869e8de15 --- /dev/null +++ b/tests/accessor_generic/CMakeLists.txt @@ -0,0 +1,39 @@ +function(configure_test_case) + cmake_parse_arguments(CTS + "" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN}) + set(CTS_TYPE_NAME ${CTS_TYPE}) + configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME}) + list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}") + set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE) +endfunction() + +list(APPEND TEMPLATE_LIST + "generic_accessor_api" + "generic_accessor_common_buffer_constructors" + "generic_accessor_common_buffer_tag_constructors" + "generic_accessor_def_constructor" + "generic_accessor_linearization" + "generic_accessor_properties" + "generic_accessor_zero_dim_constructor" +) +set(TYPE_LIST "") +get_std_type(TYPE_LIST) +half_double_filter(TYPE_LIST) +list(APPEND TYPE_LIST "user_struct") + +file(GLOB test_cases_list *.cpp) + +foreach(TEMP IN LISTS TEMPLATE_LIST) + foreach(TY IN LISTS TYPE_LIST) + set(OUT_FILE "${TEMP}_${TY}.cpp") + STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE}) + STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE}) + configure_test_case( + TYPE "${TY}" + IN_FILENAME "${TEMP}.cpp.in" + OUT_FILENAME ${OUT_FILE} + TEST_LIST test_cases_list) + endforeach() +endforeach() + +add_cts_test(${test_cases_list}) diff --git a/tests/accessor_generic/generic_accessor_api.cpp.in b/tests/accessor_generic/generic_accessor_api.cpp.in new file mode 100644 index 000000000..a9d521115 --- /dev/null +++ b/tests/accessor_generic/generic_accessor_api.cpp.in @@ -0,0 +1,54 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides generic sycl::accessor api test for generic types +// +*******************************************************************************/ +#include "../common/disabled_for_test_case.h" +#include "catch2/catch_test_macros.hpp" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL + +#include "../accessor_basic/accessor_common.h" +#include "generic_accessor_api_common.h" + +using namespace generic_accessor_api_common; +#endif + +namespace generic_accessor_api_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " Generic sycl::accessor api.", "[accessor]", test_combinations)({ + using namespace generic_accessor_api_common; + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_api_for_type{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); +#else + run_generic_api_for_type{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace generic_accessor_api_core diff --git a/tests/accessor/generic_accessor_api_common.h b/tests/accessor_generic/generic_accessor_api_common.h similarity index 99% rename from tests/accessor/generic_accessor_api_common.h rename to tests/accessor_generic/generic_accessor_api_common.h index ed563c598..b8b27a45d 100644 --- a/tests/accessor/generic_accessor_api_common.h +++ b/tests/accessor_generic/generic_accessor_api_common.h @@ -20,7 +20,7 @@ #ifndef SYCL_CTS_GENERIC_ACCESSOR_API_COMMON_H #define SYCL_CTS_GENERIC_ACCESSOR_API_COMMON_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include namespace generic_accessor_api_common { diff --git a/tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp b/tests/accessor_generic/generic_accessor_common_buffer_constructors.cpp.in similarity index 55% rename from tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp rename to tests/accessor_generic/generic_accessor_common_buffer_constructors.cpp.in index e64001cf8..2b37807c4 100644 --- a/tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp +++ b/tests/accessor_generic/generic_accessor_common_buffer_constructors.cpp.in @@ -16,16 +16,21 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// Provides generic sycl::accessor constructors with buffers test for -// sycl::half type +// Provides generic sycl::accessor constructors with buffers test for generic +// types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_common_buffer_constructors.h" using namespace generic_accessor_common_buffer_constructors; @@ -33,24 +38,34 @@ using namespace generic_accessor_common_buffer_constructors; #include "../common/disabled_for_test_case.h" -namespace generic_accessor_common_buffer_constructors_fp16 { +namespace generic_accessor_common_buffer_constructors_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor buffer constructors. fp16 type", "[accessor]", +(CTS_TYPE_NAME + " Generic sycl::accessor buffer constructors.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_common_buffer_constructors_test{}( + CTS_TYPE_NAME); + else for_type_vectors_marray("sycl::half"); + CTS_TYPE, TestType>(CTS_TYPE_NAME); #else - run_generic_common_buffer_constructors_test{}( - "sycl::half"); + run_generic_common_buffer_constructors_test{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } }); -} // namespace generic_accessor_common_buffer_constructors_fp16 +} // namespace generic_accessor_common_buffer_constructors_core diff --git a/tests/accessor/generic_accessor_common_buffer_constructors.h b/tests/accessor_generic/generic_accessor_common_buffer_constructors.h similarity index 99% rename from tests/accessor/generic_accessor_common_buffer_constructors.h rename to tests/accessor_generic/generic_accessor_common_buffer_constructors.h index ba839c924..e877f601a 100644 --- a/tests/accessor/generic_accessor_common_buffer_constructors.h +++ b/tests/accessor_generic/generic_accessor_common_buffer_constructors.h @@ -21,7 +21,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_COMMON_BUFFER_CONSTRUCTORS_H #define SYCL_CTS_GENERIC_ACCESSOR_COMMON_BUFFER_CONSTRUCTORS_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp b/tests/accessor_generic/generic_accessor_common_buffer_tag_constructors.cpp.in similarity index 58% rename from tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp rename to tests/accessor_generic/generic_accessor_common_buffer_tag_constructors.cpp.in index 8f3b26ab8..e9a7437af 100644 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp +++ b/tests/accessor_generic/generic_accessor_common_buffer_tag_constructors.cpp.in @@ -17,15 +17,20 @@ // limitations under the License. // // Provides generic sycl::accessor constructors with buffer and tag test for -// double type +// generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_common_buffer_tag_constructors.h" using namespace generic_accessor_common_buffer_tag_constructors; @@ -33,24 +38,35 @@ using namespace generic_accessor_common_buffer_tag_constructors; #include "../common/disabled_for_test_case.h" -namespace generic_accessor_common_buffer_tag_constructors_fp64 { +namespace generic_accessor_common_buffer_tag_constructors_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor buffer tag constructors. fp64 type", "[accessor]", +(CTS_TYPE_NAME + " Generic sycl::accessor buffer tag constructors.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_common_buffer_tag_constructors_test{}( + CTS_TYPE_NAME); + else for_type_vectors_marray("double"); + CTS_TYPE, TestType>(CTS_TYPE_NAME); #else - run_generic_common_buffer_tag_constructors_test{}( - "double"); + run_generic_common_buffer_tag_constructors_test{}( + CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } }); -} // namespace generic_accessor_common_buffer_tag_constructors_fp64 +} // namespace generic_accessor_common_buffer_tag_constructors_core diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors.h b/tests/accessor_generic/generic_accessor_common_buffer_tag_constructors.h similarity index 99% rename from tests/accessor/generic_accessor_common_buffer_tag_constructors.h rename to tests/accessor_generic/generic_accessor_common_buffer_tag_constructors.h index 3b638a808..82b19ccbe 100644 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors.h +++ b/tests/accessor_generic/generic_accessor_common_buffer_tag_constructors.h @@ -21,7 +21,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_COMMON_BUFFER_TAG_CONSTRUCTORS_H #define SYCL_CTS_GENERIC_ACCESSOR_COMMON_BUFFER_TAG_CONSTRUCTORS_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_def_constructor_core.cpp b/tests/accessor_generic/generic_accessor_def_constructor.cpp.in similarity index 53% rename from tests/accessor/generic_accessor_def_constructor_core.cpp rename to tests/accessor_generic/generic_accessor_def_constructor.cpp.in index df6cca1e6..7b528b4c5 100644 --- a/tests/accessor/generic_accessor_def_constructor_core.cpp +++ b/tests/accessor_generic/generic_accessor_def_constructor.cpp.in @@ -22,9 +22,14 @@ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_def_constructor.h" using namespace generic_accessor_def_constructor; @@ -35,9 +40,30 @@ using namespace generic_accessor_def_constructor; namespace generic_accessor_def_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor def constructors. core types", "[accessor]", +(CTS_TYPE_NAME + " Generic sycl::accessor def constructors.", "[accessor]", test_combinations)({ - common_run_tests(); + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_def_constructor_test{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_generic_def_constructor_test{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace generic_accessor_def_constructor_core diff --git a/tests/accessor/generic_accessor_def_constructor.h b/tests/accessor_generic/generic_accessor_def_constructor.h similarity index 98% rename from tests/accessor/generic_accessor_def_constructor.h rename to tests/accessor_generic/generic_accessor_def_constructor.h index b6e2cea4a..f31d888cf 100644 --- a/tests/accessor/generic_accessor_def_constructor.h +++ b/tests/accessor_generic/generic_accessor_def_constructor.h @@ -21,7 +21,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_DEF_CONSTRUCTOR_H #define SYCL_CTS_GENERIC_ACCESSOR_DEF_CONSTRUCTOR_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_linearization_core.cpp b/tests/accessor_generic/generic_accessor_linearization.cpp.in similarity index 53% rename from tests/accessor/generic_accessor_linearization_core.cpp rename to tests/accessor_generic/generic_accessor_linearization.cpp.in index c0bac0f5d..5e56047cc 100644 --- a/tests/accessor/generic_accessor_linearization_core.cpp +++ b/tests/accessor_generic/generic_accessor_linearization.cpp.in @@ -22,10 +22,15 @@ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_linearization.h" using namespace generic_accessor_linearization; @@ -37,9 +42,30 @@ using namespace generic_accessor_linearization; namespace generic_accessor_linearization_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor linearization test. core types", "[accessor]", +(CTS_TYPE_NAME + " Generic sycl::accessor linearization test.", "[accessor]", test_combinations)({ - common_run_tests(); + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_linearization_for_type{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_generic_linearization_for_type{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace generic_accessor_linearization_core diff --git a/tests/accessor/generic_accessor_linearization.h b/tests/accessor_generic/generic_accessor_linearization.h similarity index 98% rename from tests/accessor/generic_accessor_linearization.h rename to tests/accessor_generic/generic_accessor_linearization.h index 7cbf632aa..432b1873a 100644 --- a/tests/accessor/generic_accessor_linearization.h +++ b/tests/accessor_generic/generic_accessor_linearization.h @@ -23,7 +23,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_LINEAR_COMMON_H #define SYCL_CTS_GENERIC_ACCESSOR_LINEAR_COMMON_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace generic_accessor_linearization { using namespace accessor_tests_common; diff --git a/tests/accessor_generic/generic_accessor_properties.cpp.in b/tests/accessor_generic/generic_accessor_properties.cpp.in new file mode 100644 index 000000000..61590a30c --- /dev/null +++ b/tests/accessor_generic/generic_accessor_properties.cpp.in @@ -0,0 +1,57 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides tests for generic accessor properties with generic types +// +*******************************************************************************/ + +#include "../common/common.h" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL + +#include "../accessor_basic/accessor_common.h" +#include "generic_accessor_properties.h" + +using namespace generic_accessor_properties; +#endif + +#include "../common/disabled_for_test_case.h" +#include "catch2/catch_test_macros.hpp" + +namespace generic_accessor_properties_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " Generic sycl::accessor properties test.", "[accessor]", + test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_properties_tests{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); +#else + run_generic_properties_tests{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace generic_accessor_properties_core diff --git a/tests/accessor/generic_accessor_properties.h b/tests/accessor_generic/generic_accessor_properties.h similarity index 99% rename from tests/accessor/generic_accessor_properties.h rename to tests/accessor_generic/generic_accessor_properties.h index fb70faae1..803e4da5a 100644 --- a/tests/accessor/generic_accessor_properties.h +++ b/tests/accessor_generic/generic_accessor_properties.h @@ -7,7 +7,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PROPERTIES_H #define SYCL_CTS_GENERIC_ACCESSOR_PROPERTIES_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace generic_accessor_properties { using namespace sycl_cts; diff --git a/tests/accessor/generic_accessor_semantics.cpp b/tests/accessor_generic/generic_accessor_semantics.cpp similarity index 100% rename from tests/accessor/generic_accessor_semantics.cpp rename to tests/accessor_generic/generic_accessor_semantics.cpp diff --git a/tests/accessor/generic_accessor_zero_dim_constructor_core.cpp b/tests/accessor_generic/generic_accessor_zero_dim_constructor.cpp.in similarity index 53% rename from tests/accessor/generic_accessor_zero_dim_constructor_core.cpp rename to tests/accessor_generic/generic_accessor_zero_dim_constructor.cpp.in index c77aa0ec5..9a062b453 100644 --- a/tests/accessor/generic_accessor_zero_dim_constructor_core.cpp +++ b/tests/accessor_generic/generic_accessor_zero_dim_constructor.cpp.in @@ -23,10 +23,15 @@ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_zero_dim_constructor.h" using namespace generic_accessor_zero_dim_constructor; @@ -37,9 +42,30 @@ using namespace generic_accessor_zero_dim_constructor; namespace generic_accessor_zero_dim_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor zero-dim constructors. core types", "[accessor]", +(CTS_TYPE_NAME + " Generic sycl::accessor zero-dim constructors.", "[accessor]", test_combinations)({ - common_run_tests(); + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_zero_dim_constructor_test{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_generic_zero_dim_constructor_test{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace generic_accessor_zero_dim_constructor_core diff --git a/tests/accessor/generic_accessor_zero_dim_constructor.h b/tests/accessor_generic/generic_accessor_zero_dim_constructor.h similarity index 98% rename from tests/accessor/generic_accessor_zero_dim_constructor.h rename to tests/accessor_generic/generic_accessor_zero_dim_constructor.h index 40c6a2bbf..da810392d 100644 --- a/tests/accessor/generic_accessor_zero_dim_constructor.h +++ b/tests/accessor_generic/generic_accessor_zero_dim_constructor.h @@ -21,7 +21,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_ZERO_DIM_CONSTRUCTOR_H #define SYCL_CTS_GENERIC_ACCESSOR_ZERO_DIM_CONSTRUCTOR_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor_placeholder/CMakeLists.txt b/tests/accessor_placeholder/CMakeLists.txt new file mode 100644 index 000000000..419b7e0b3 --- /dev/null +++ b/tests/accessor_placeholder/CMakeLists.txt @@ -0,0 +1,38 @@ +function(configure_test_case) + cmake_parse_arguments(CTS + "" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN}) + set(CTS_TYPE_NAME ${CTS_TYPE}) + configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME}) + list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}") + set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE) +endfunction() + +list(APPEND TEMPLATE_LIST + "generic_accessor_placeholder_buffer_constructor" + "generic_accessor_placeholder_buffer_range_constructor" + "generic_accessor_placeholder_buffer_range_offset_constructor" + "generic_accessor_placeholder_zero_length_buffer_constructor" + "generic_accessor_placeholder_zero_length_buffer_range_constructor" + "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor" +) +set(TYPE_LIST "") +get_std_type(TYPE_LIST) +half_double_filter(TYPE_LIST) +list(APPEND TYPE_LIST "user_struct") + +file(GLOB test_cases_list *.cpp) + +foreach(TEMP IN LISTS TEMPLATE_LIST) + foreach(TY IN LISTS TYPE_LIST) + set(OUT_FILE "${TEMP}_${TY}.cpp") + STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE}) + STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE}) + configure_test_case( + TYPE "${TY}" + IN_FILENAME "${TEMP}.cpp.in" + OUT_FILENAME ${OUT_FILE} + TEST_LIST test_cases_list) + endforeach() +endforeach() + +add_cts_test(${test_cases_list}) diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_constructor.cpp.in similarity index 57% rename from tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp rename to tests/accessor_placeholder/generic_accessor_placeholder_buffer_constructor.cpp.in index 3654404a7..4a665236e 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp +++ b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_constructor.cpp.in @@ -17,16 +17,21 @@ // limitations under the License. // // Provides generic sycl::accessor placeholder buffer constructor test for -// sycl::half type +// generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_placeholder_buffer_constructor.h" using namespace generic_accessor_placeholder_buffer_constructor; @@ -34,24 +39,34 @@ using namespace generic_accessor_placeholder_buffer_constructor; #include "../common/disabled_for_test_case.h" -namespace generic_accessor_placeholder_buffer_constructor_fp16 { +namespace generic_accessor_placeholder_buffer_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer constructor. fp16 type", - "[accessor]", test_combinations)({ +(CTS_TYPE_NAME + " Generic sycl::accessor placeholder constructors.", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_placeholder_buffer_constructor_test{}( + CTS_TYPE_NAME); + else for_type_vectors_marray("sycl::half"); + CTS_TYPE, TestType>(CTS_TYPE_NAME); #else - run_generic_placeholder_buffer_constructor_test{}( - "sycl::half"); + run_generic_placeholder_buffer_constructor_test{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } }); -} // namespace generic_accessor_placeholder_buffer_constructor_fp16 +} // namespace generic_accessor_placeholder_buffer_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor.h b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_constructor.h similarity index 99% rename from tests/accessor/generic_accessor_placeholder_buffer_constructor.h rename to tests/accessor_placeholder/generic_accessor_placeholder_buffer_constructor.h index e76e3d0bf..7b3f995eb 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor.h +++ b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_constructor.h @@ -21,7 +21,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_BUFFER_CONSTRUCTOR_H #define SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_BUFFER_CONSTRUCTOR_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_constructor.cpp.in similarity index 58% rename from tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp rename to tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_constructor.cpp.in index 7e85d5450..584968e9c 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp +++ b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_constructor.cpp.in @@ -17,16 +17,21 @@ // limitations under the License. // // Provides generic sycl::accessor placeholder buffer range constructor test -// for sycl::half type +// for generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_placeholder_buffer_range_constructor.h" using namespace generic_accessor_placeholder_buffer_range_constructor; @@ -34,26 +39,35 @@ using namespace generic_accessor_placeholder_buffer_range_constructor; #include "../common/disabled_for_test_case.h" -namespace generic_accessor_placeholder_buffer_range_constructor_fp16 { +namespace generic_accessor_placeholder_buffer_range_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer range constructor. fp16 type", +(CTS_TYPE_NAME + " Generic sycl::accessor placeholder buffer range constructor.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_placeholder_buffer_range_constructor_test{}( + CTS_TYPE_NAME); + else for_type_vectors_marray< - run_generic_placeholder_buffer_range_constructor_test, sycl::half, - TestType>("sycl::half"); + run_generic_placeholder_buffer_range_constructor_test, CTS_TYPE, + TestType>(CTS_TYPE_NAME); #else - run_generic_placeholder_buffer_range_constructor_test{}( - "sycl::half"); + run_generic_placeholder_buffer_range_constructor_test{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } }); -} // namespace generic_accessor_placeholder_buffer_range_constructor_fp16 +} // namespace generic_accessor_placeholder_buffer_range_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_constructor.h similarity index 99% rename from tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h rename to tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_constructor.h index 51b1b445a..d83d4f992 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h +++ b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_constructor.h @@ -22,7 +22,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_BUFFER_RANGE_CONSTRUCTOR_H #define SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_BUFFER_RANGE_CONSTRUCTOR_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_offset_constructor.cpp.in similarity index 64% rename from tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp rename to tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_offset_constructor.cpp.in index 1c413116c..e47ff1f64 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp +++ b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_offset_constructor.cpp.in @@ -17,16 +17,21 @@ // limitations under the License. // // Provides generic sycl::accessor placeholder buffer range offset constructor -// test for double type +// test for generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_placeholder_buffer_range_offset_constructor.h" using namespace generic_accessor_placeholder_buffer_range_offset_constructor; @@ -34,28 +39,37 @@ using namespace generic_accessor_placeholder_buffer_range_offset_constructor; #include "../common/disabled_for_test_case.h" -namespace generic_accessor_placeholder_buffer_range_offset_constructor_fp64 { +namespace generic_accessor_placeholder_buffer_range_offset_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder buffer range offset constructor. fp64 " - "type", +(CTS_TYPE_NAME + " Generic sycl::accessor placeholder buffer range offset constructor.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_placeholder_buffer_range_offset_constructor_test{}( + CTS_TYPE_NAME); + else for_type_vectors_marray< - run_generic_placeholder_buffer_range_offset_constructor_test, double, - TestType>("double"); + run_generic_placeholder_buffer_range_offset_constructor_test, CTS_TYPE, + TestType>(CTS_TYPE_NAME); #else - run_generic_placeholder_buffer_range_offset_constructor_test{}( - "double"); + run_generic_placeholder_buffer_range_offset_constructor_test{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } }); } // namespace - // generic_accessor_placeholder_buffer_range_offset_constructor_fp64 + // generic_accessor_placeholder_buffer_range_offset_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_offset_constructor.h similarity index 99% rename from tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h rename to tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_offset_constructor.h index ba0f8800f..b6d691e0d 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h +++ b/tests/accessor_placeholder/generic_accessor_placeholder_buffer_range_offset_constructor.h @@ -22,7 +22,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_BUFFER_RANFE_OFFSET_CONSTRUCTORS_H #define SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_BUFFER_RANFE_OFFSET_CONSTRUCTORS_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_constructor.cpp.in similarity index 62% rename from tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp rename to tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_constructor.cpp.in index 7d331a279..d6c46696c 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp +++ b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_constructor.cpp.in @@ -17,16 +17,21 @@ // limitations under the License. // // Provides generic sycl::accessor placeholder zero-length buffer constructor -// test for sycl::half type +// test for generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_constructor.h" using namespace generic_accessor_placeholder_zero_length_buffer_constructor; @@ -34,26 +39,36 @@ using namespace generic_accessor_placeholder_zero_length_buffer_constructor; #include "../common/disabled_for_test_case.h" -namespace generic_accessor_placeholder_zero_length_buffer_constructor_fp16 { +namespace generic_accessor_placeholder_zero_length_buffer_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer constructor. fp16 type", +(CTS_TYPE_NAME + " Generic sycl::accessor placeholder zero-length buffer constructor.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp16)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_placeholder_zero_length_buffer_constructor{}( + CTS_TYPE_NAME); + else for_type_vectors_marray< - run_generic_placeholder_zero_length_buffer_constructor, sycl::half, - TestType>("sycl::half"); + run_generic_placeholder_zero_length_buffer_constructor, CTS_TYPE, + TestType>(CTS_TYPE_NAME); #else - run_generic_placeholder_zero_length_buffer_constructor{}( - "sycl::half"); + run_generic_placeholder_zero_length_buffer_constructor{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support half precision floating point operations"); - return; - } }); -} // namespace generic_accessor_placeholder_zero_length_buffer_constructor_fp16 +} // namespace generic_accessor_placeholder_zero_length_buffer_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_constructor.h similarity index 99% rename from tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h rename to tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_constructor.h index 420583bca..51d4c9aa7 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h +++ b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_constructor.h @@ -22,7 +22,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_ZERO_LENGTH_BUFFER_CONSTRUCTOR_H #define SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_ZERO_LENGTH_BUFFER_CONSTRUCTOR_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_constructor.cpp.in similarity index 62% rename from tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp rename to tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_constructor.cpp.in index 3abeb2f7e..e2ad4ad2f 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp +++ b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_constructor.cpp.in @@ -17,16 +17,21 @@ // limitations under the License. // // Provides generic sycl::accessor placeholder zero-length buffer range -// constructor test for double type +// constructor test for generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_constructor.h" using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; @@ -34,27 +39,36 @@ using namespace generic_accessor_placeholder_zero_length_buffer_range_constructo #include "../common/disabled_for_test_case.h" -namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64 { +namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer range constructor. " - "fp64 type", +(CTS_TYPE_NAME + " Generic sycl::accessor placeholder zero-length buffer range constructor. ", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_placeholder_zero_length_buffer_range_constructor_test< + CTS_TYPE, TestType>{}(CTS_TYPE_NAME); + else for_type_vectors_marray< run_generic_placeholder_zero_length_buffer_range_constructor_test, - double, TestType>("double"); + CTS_TYPE, TestType>(CTS_TYPE_NAME); #else - run_generic_placeholder_zero_length_buffer_range_constructor_test< - double, TestType>{}("double"); + run_generic_placeholder_zero_length_buffer_range_constructor_test{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } }); } // namespace - // generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64 + // generic_accessor_placeholder_zero_length_buffer_range_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_constructor.h similarity index 99% rename from tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h rename to tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_constructor.h index ebe480778..d998dc645 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h +++ b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_constructor.h @@ -22,7 +22,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_ZERO_LENGTH_BUFFER_RANGE_CONSTRUCTORS_H #define SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_ZERO_LENGTH_BUFFER_RANGE_CONSTRUCTORS_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.cpp.in similarity index 62% rename from tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp rename to tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.cpp.in index 3c2fe20ce..36515912b 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp +++ b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.cpp.in @@ -17,16 +17,21 @@ // limitations under the License. // // Provides generic sycl::accessor placeholder zero-length buffer range offset -// constructor test for double type +// constructor test for generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h" using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; @@ -34,27 +39,38 @@ using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_con #include "../common/disabled_for_test_case.h" -namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64 { +namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("Generic sycl::accessor placeholder zero-length buffer range offset. fp64 " - "type", +(CTS_TYPE_NAME + " Generic sycl::accessor placeholder zero-length buffer range offset " + "constructor.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (queue.get_device().has(sycl::aspect::fp64)) { + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + #if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_generic_placeholder_zero_length_buffer_range_offset_constructor_test< + CTS_TYPE, TestType>{}(CTS_TYPE_NAME); + else for_type_vectors_marray< run_generic_placeholder_zero_length_buffer_range_offset_constructor_test, - double, TestType>("double"); + CTS_TYPE, TestType>(CTS_TYPE_NAME); #else - run_generic_placeholder_zero_length_buffer_range_offset_constructor_test< - double, TestType>{}("double"); + run_generic_placeholder_zero_length_buffer_range_offset_constructor_test< + CTS_TYPE, TestType>{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE - } else { - WARN("Device does not support double precision floating point operations"); - return; - } }); } // namespace - // generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64 + // generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h similarity index 99% rename from tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h rename to tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h index 60479ad4b..1b0f65a37 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h +++ b/tests/accessor_placeholder/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h @@ -22,7 +22,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_ZERO_LENGTH_BUFFER_RANGE_OFFSET_CONSTRUCTOR_H #define SYCL_CTS_GENERIC_ACCESSOR_PLACEHOLDER_ZERO_LENGTH_BUFFER_RANGE_OFFSET_CONSTRUCTOR_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "catch2/catch_test_macros.hpp" diff --git a/tests/host_accessor/CMakeLists.txt b/tests/host_accessor/CMakeLists.txt new file mode 100644 index 000000000..803a22346 --- /dev/null +++ b/tests/host_accessor/CMakeLists.txt @@ -0,0 +1,36 @@ +function(configure_test_case) + cmake_parse_arguments(CTS + "" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN}) + set(CTS_TYPE_NAME ${CTS_TYPE}) + configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME}) + list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}") + set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE) +endfunction() + +list(APPEND TEMPLATE_LIST + "host_accessor_api" + "host_accessor_constructors" + "host_accessor_linearization" + "host_accessor_properties" +) +set(TYPE_LIST "") +get_std_type(TYPE_LIST) +half_double_filter(TYPE_LIST) +list(APPEND TYPE_LIST "user_struct") + +file(GLOB test_cases_list *.cpp) + +foreach(TEMP IN LISTS TEMPLATE_LIST) + foreach(TY IN LISTS TYPE_LIST) + set(OUT_FILE "${TEMP}_${TY}.cpp") + STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE}) + STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE}) + configure_test_case( + TYPE "${TY}" + IN_FILENAME "${TEMP}.cpp.in" + OUT_FILENAME ${OUT_FILE} + TEST_LIST test_cases_list) + endforeach() +endforeach() + +add_cts_test(${test_cases_list}) diff --git a/tests/host_accessor/host_accessor_api.cpp.in b/tests/host_accessor/host_accessor_api.cpp.in new file mode 100644 index 000000000..ef6e41197 --- /dev/null +++ b/tests/host_accessor/host_accessor_api.cpp.in @@ -0,0 +1,52 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides sycl::host_accessor api test for generic types +// +*******************************************************************************/ +#include "../common/disabled_for_test_case.h" +#include "catch2/catch_test_macros.hpp" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::host_accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL +#include "../accessor_basic/accessor_common.h" +#include "host_accessor_api_common.h" + +using namespace host_accessor_api_common; +#endif + +namespace host_accessor_api_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " sycl::host_accessor api.", "[accessor]", test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_host_accessor_api_for_type{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); +#else + run_host_accessor_api_for_type{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace host_accessor_api_core diff --git a/tests/accessor/host_accessor_api_common.h b/tests/host_accessor/host_accessor_api_common.h similarity index 99% rename from tests/accessor/host_accessor_api_common.h rename to tests/host_accessor/host_accessor_api_common.h index 4872ebd9d..b54532a36 100644 --- a/tests/accessor/host_accessor_api_common.h +++ b/tests/host_accessor/host_accessor_api_common.h @@ -7,7 +7,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_HOST_ACCESSOR_API_COMMON_H #define SYCL_CTS_HOST_ACCESSOR_API_COMMON_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include namespace host_accessor_api_common { diff --git a/tests/accessor/host_accessor_constructors_fp16.cpp b/tests/host_accessor/host_accessor_constructors.cpp.in similarity index 54% rename from tests/accessor/host_accessor_constructors_fp16.cpp rename to tests/host_accessor/host_accessor_constructors.cpp.in index c1db11bea..c1feb363e 100644 --- a/tests/accessor/host_accessor_constructors_fp16.cpp +++ b/tests/host_accessor/host_accessor_constructors.cpp.in @@ -16,15 +16,20 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// Provides host_accessor constructors test for the sycl::half type +// Provides host_accessor constructors test for generic types // *******************************************************************************/ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::host_accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "host_accessor_constructors.h" using namespace host_accessor_constructors; @@ -33,24 +38,33 @@ using namespace host_accessor_constructors; #include "../common/disabled_for_test_case.h" #include "catch2/catch_test_macros.hpp" -namespace host_accessor_constructors_fp16 { +namespace host_accessor_constructors_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor constructors. fp16 type", "[accessor]", +(CTS_TYPE_NAME + " sycl::host_accessor constructors.", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); - if (!queue.get_device().has(sycl::aspect::fp16)) { - WARN( - "Device does not support half precision floating point operations. " - "Skipping the test case."); - return; + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + if constexpr (std::is_same_v) + run_host_constructors_test{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); #else - run_host_constructors_test{}("sycl::half"); + run_host_constructors_test{}(CTS_TYPE_NAME); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -} // namespace host_accessor_constructors_fp16 + +} // namespace host_accessor_constructors_core diff --git a/tests/accessor/host_accessor_constructors.h b/tests/host_accessor/host_accessor_constructors.h similarity index 99% rename from tests/accessor/host_accessor_constructors.h rename to tests/host_accessor/host_accessor_constructors.h index 7b86891a3..a9cf27155 100644 --- a/tests/accessor/host_accessor_constructors.h +++ b/tests/host_accessor/host_accessor_constructors.h @@ -23,7 +23,7 @@ #define SYCL_CTS_HOST_ACCESSOR_CONSTRUCTORS_H #include "catch2/catch_test_macros.hpp" -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace host_accessor_constructors { using namespace sycl_cts; diff --git a/tests/accessor/host_accessor_linearization_core.cpp b/tests/host_accessor/host_accessor_linearization.cpp.in similarity index 53% rename from tests/accessor/host_accessor_linearization_core.cpp rename to tests/host_accessor/host_accessor_linearization.cpp.in index 35809bc8c..1ae0bc474 100644 --- a/tests/accessor/host_accessor_linearization_core.cpp +++ b/tests/host_accessor/host_accessor_linearization.cpp.in @@ -22,10 +22,15 @@ #include "../common/disabled_for_test_case.h" #include "catch2/catch_test_macros.hpp" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::host_accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "host_accessor_linearization.h" using namespace host_accessor_linearization; @@ -34,9 +39,30 @@ using namespace host_accessor_linearization; namespace host_accessor_liniarization_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::host_accessor linearization. core types", "[accessor]", +(CTS_TYPE_NAME + " sycl::host_accessor linearization.", "[accessor]", test_combinations)({ - common_run_tests(); + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_host_linearization_for_type{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_host_linearization_for_type{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_liniarization_core diff --git a/tests/accessor/host_accessor_linearization.h b/tests/host_accessor/host_accessor_linearization.h similarity index 98% rename from tests/accessor/host_accessor_linearization.h rename to tests/host_accessor/host_accessor_linearization.h index 9490c28ed..d6fc2dbca 100644 --- a/tests/accessor/host_accessor_linearization.h +++ b/tests/host_accessor/host_accessor_linearization.h @@ -23,7 +23,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_HOST_ACCESSOR_LINEAR_COMMON_H #define SYCL_CTS_HOST_ACCESSOR_LINEAR_COMMON_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace host_accessor_linearization { using namespace accessor_tests_common; diff --git a/tests/host_accessor/host_accessor_properties.cpp.in b/tests/host_accessor/host_accessor_properties.cpp.in new file mode 100644 index 000000000..1ca34f2c1 --- /dev/null +++ b/tests/host_accessor/host_accessor_properties.cpp.in @@ -0,0 +1,55 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides tests for host_accessor properties with generic types +// +*******************************************************************************/ + +#include "../common/common.h" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::host_accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL +#include "../accessor_basic/accessor_common.h" +#include "host_accessor_properties.h" + +using namespace host_accessor_properties; +#endif + +#include "../common/disabled_for_test_case.h" +#include "catch2/catch_test_macros.hpp" + +namespace host_accessor_properties_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " sycl::host_accessor properties.", "[accessor]", test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_host_properties_tests{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); +#else + run_host_properties_tests{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace host_accessor_properties_core diff --git a/tests/accessor/host_accessor_properties.h b/tests/host_accessor/host_accessor_properties.h similarity index 99% rename from tests/accessor/host_accessor_properties.h rename to tests/host_accessor/host_accessor_properties.h index 4c82d635f..9b987147e 100644 --- a/tests/accessor/host_accessor_properties.h +++ b/tests/host_accessor/host_accessor_properties.h @@ -7,7 +7,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_HOST_ACCESSOR_PROPERTIES_H #define SYCL_CTS_HOST_ACCESSOR_PROPERTIES_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace host_accessor_properties { using namespace sycl_cts; diff --git a/tests/accessor/host_accessor_semantics.cpp b/tests/host_accessor/host_accessor_semantics.cpp similarity index 100% rename from tests/accessor/host_accessor_semantics.cpp rename to tests/host_accessor/host_accessor_semantics.cpp diff --git a/tests/local_accessor/CMakeLists.txt b/tests/local_accessor/CMakeLists.txt new file mode 100644 index 000000000..72419b3c5 --- /dev/null +++ b/tests/local_accessor/CMakeLists.txt @@ -0,0 +1,36 @@ +function(configure_test_case) + cmake_parse_arguments(CTS + "" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN}) + set(CTS_TYPE_NAME ${CTS_TYPE}) + configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME}) + list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}") + set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE) +endfunction() + +list(APPEND TEMPLATE_LIST + "local_accessor_access_among_work_items" + "local_accessor_api" + "local_accessor_constructors" + "local_accessor_linearization" +) +set(TYPE_LIST "") +get_std_type(TYPE_LIST) +half_double_filter(TYPE_LIST) +list(APPEND TYPE_LIST "user_struct") + +file(GLOB test_cases_list *.cpp) + +foreach(TEMP IN LISTS TEMPLATE_LIST) + foreach(TY IN LISTS TYPE_LIST) + set(OUT_FILE "${TEMP}_${TY}.cpp") + STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE}) + STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE}) + configure_test_case( + TYPE "${TY}" + IN_FILENAME "${TEMP}.cpp.in" + OUT_FILENAME ${OUT_FILE} + TEST_LIST test_cases_list) + endforeach() +endforeach() + +add_cts_test(${test_cases_list}) diff --git a/tests/local_accessor/local_accessor_access_among_work_items.cpp.in b/tests/local_accessor/local_accessor_access_among_work_items.cpp.in new file mode 100644 index 000000000..4aabe3136 --- /dev/null +++ b/tests/local_accessor/local_accessor_access_among_work_items.cpp.in @@ -0,0 +1,59 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides tests for local_accessor. +// +// This test provides verifications that local_accessor can access the memory +// shared among work-items. For generic types. +// +*******************************************************************************/ + +#include "../common/common.h" +#include "../common/disabled_for_test_case.h" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL + +#include "local_accessor_access_among_work_items.h" + +using namespace local_accessor_access_among_work_items; +using namespace accessor_tests_common; +#endif + +namespace local_accessor_access_among_work_items_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " sycl::local_accessor access among work items.", "[accessor]", + test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_local_accessor_access_among_work_items_tests{}( + CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_local_accessor_access_among_work_items_tests{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace local_accessor_access_among_work_items_core diff --git a/tests/accessor/local_accessor_access_among_work_items.h b/tests/local_accessor/local_accessor_access_among_work_items.h similarity index 99% rename from tests/accessor/local_accessor_access_among_work_items.h rename to tests/local_accessor/local_accessor_access_among_work_items.h index 8de62ab3f..3640c8f03 100644 --- a/tests/accessor/local_accessor_access_among_work_items.h +++ b/tests/local_accessor/local_accessor_access_among_work_items.h @@ -23,7 +23,7 @@ #ifndef SYCL_CTS_LOCAL_ACCESSOR_ACCESS_AMONG_WORK_ITEMS_H #define SYCL_CTS_LOCAL_ACCESSOR_ACCESS_AMONG_WORK_ITEMS_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace local_accessor_access_among_work_items { using namespace sycl_cts; diff --git a/tests/local_accessor/local_accessor_api.cpp.in b/tests/local_accessor/local_accessor_api.cpp.in new file mode 100644 index 000000000..345b55673 --- /dev/null +++ b/tests/local_accessor/local_accessor_api.cpp.in @@ -0,0 +1,53 @@ +/******************************************************************************* +// +// SYCL 2020 Conformance Test Suite +// +// Provides sycl::local_accessor api test for generic types +// +*******************************************************************************/ +#include "../common/disabled_for_test_case.h" +#include "catch2/catch_test_macros.hpp" + +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + +// FIXME: re-enable when sycl::local_accessor is implemented +#if !SYCL_CTS_COMPILING_WITH_HIPSYCL +#include "../accessor_basic/accessor_common.h" +#include "local_accessor_api_common.h" + +using namespace local_accessor_api_common; +#endif + +namespace local_accessor_api_core { + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) +(CTS_TYPE_NAME + " sycl::local_accessor api. core types", "[accessor]", + test_combinations)({ + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_local_api_for_type{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); +#else + run_local_api_for_type{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE +}); + +} // namespace local_accessor_api_core diff --git a/tests/accessor/local_accessor_api_common.h b/tests/local_accessor/local_accessor_api_common.h similarity index 99% rename from tests/accessor/local_accessor_api_common.h rename to tests/local_accessor/local_accessor_api_common.h index 92de78088..f05edf707 100644 --- a/tests/accessor/local_accessor_api_common.h +++ b/tests/local_accessor/local_accessor_api_common.h @@ -22,7 +22,7 @@ #ifndef SYCL_CTS_LOCAL_ACCESSOR_API_COMMON_H #define SYCL_CTS_LOCAL_ACCESSOR_API_COMMON_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace local_accessor_api_common { using namespace sycl_cts; diff --git a/tests/accessor/local_accessor_constructors_core.cpp b/tests/local_accessor/local_accessor_constructors.cpp.in similarity index 54% rename from tests/accessor/local_accessor_constructors_core.cpp rename to tests/local_accessor/local_accessor_constructors.cpp.in index 6e00c2fbb..a2a928805 100644 --- a/tests/accessor/local_accessor_constructors_core.cpp +++ b/tests/local_accessor/local_accessor_constructors.cpp.in @@ -22,10 +22,15 @@ #include "../common/common.h" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::local_accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "local_accessor_constructors.h" using namespace local_accessor_constructors; @@ -37,8 +42,29 @@ using namespace local_accessor_constructors; namespace local_accessor_constructors_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor constructors. core types", "[accessor]", +(CTS_TYPE_NAME + " sycl::local_accessor constructors.", "[accessor]", test_combinations)({ - common_run_tests(); + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_local_constructors_test{}(CTS_TYPE_NAME); + else + for_type_vectors_marray( + CTS_TYPE_NAME); +#else + run_local_constructors_test{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace local_accessor_constructors_core diff --git a/tests/accessor/local_accessor_constructors.h b/tests/local_accessor/local_accessor_constructors.h similarity index 99% rename from tests/accessor/local_accessor_constructors.h rename to tests/local_accessor/local_accessor_constructors.h index 095e0b7ba..e7d065d08 100644 --- a/tests/accessor/local_accessor_constructors.h +++ b/tests/local_accessor/local_accessor_constructors.h @@ -23,7 +23,7 @@ #define SYCL_CTS_LOCAL_ACCESSOR_H #include "catch2/catch_test_macros.hpp" -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace local_accessor_constructors { using namespace sycl_cts; diff --git a/tests/accessor/local_accessor_linearization_core.cpp b/tests/local_accessor/local_accessor_linearization.cpp.in similarity index 53% rename from tests/accessor/local_accessor_linearization_core.cpp rename to tests/local_accessor/local_accessor_linearization.cpp.in index 2b9ce6f6b..d6bef620b 100644 --- a/tests/accessor/local_accessor_linearization_core.cpp +++ b/tests/local_accessor/local_accessor_linearization.cpp.in @@ -22,10 +22,15 @@ #include "../common/disabled_for_test_case.h" #include "catch2/catch_test_macros.hpp" +// clang-format off +#cmakedefine CTS_TYPE @CTS_TYPE@ +#cmakedefine CTS_TYPE_NAME std::string("@CTS_TYPE_NAME@") +// clang-format on + // FIXME: re-enable when sycl::local_accessor is implemented #if !SYCL_CTS_COMPILING_WITH_HIPSYCL -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" #include "local_accessor_linearization.h" using namespace local_accessor_linearization; @@ -34,9 +39,30 @@ using namespace local_accessor_linearization; namespace local_accessor_liniarization_core { DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL) -("sycl::local_accessor linearization. core types", "[accessor]", +(CTS_TYPE_NAME + " sycl::local_accessor linearization.", "[accessor]", test_combinations)({ - common_run_tests(); + auto queue = sycl_cts::util::get_cts_object::queue(); + if constexpr (std::is_same_v, sycl::half>) { + if (!queue.get_device().has(sycl::aspect::fp16)) + SKIP( + "Device does not support half precision floating point " + "operations."); + } else if (std::is_same_v, double>) { + if (!queue.get_device().has(sycl::aspect::fp64)) + SKIP( + "Device does not support double precision floating point " + "operations."); + } + +#if SYCL_CTS_ENABLE_FULL_CONFORMANCE + if constexpr (std::is_same_v) + run_local_linearization_for_type{}(CTS_TYPE_NAME); + else + for_type_vectors_marray(CTS_TYPE_NAME); +#else + run_local_linearization_for_type{}(CTS_TYPE_NAME); +#endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace local_accessor_liniarization_core diff --git a/tests/accessor/local_accessor_linearization.h b/tests/local_accessor/local_accessor_linearization.h similarity index 98% rename from tests/accessor/local_accessor_linearization.h rename to tests/local_accessor/local_accessor_linearization.h index ffca555f2..04549736d 100644 --- a/tests/accessor/local_accessor_linearization.h +++ b/tests/local_accessor/local_accessor_linearization.h @@ -23,7 +23,7 @@ *******************************************************************************/ #ifndef SYCL_CTS_LOCAL_ACCESSOR_LINEAR_COMMON_H #define SYCL_CTS_LOCAL_ACCESSOR_LINEAR_COMMON_H -#include "accessor_common.h" +#include "../accessor_basic/accessor_common.h" namespace local_accessor_linearization { using namespace accessor_tests_common; diff --git a/tests/accessor/local_accessor_semantics.cpp b/tests/local_accessor/local_accessor_semantics.cpp similarity index 100% rename from tests/accessor/local_accessor_semantics.cpp rename to tests/local_accessor/local_accessor_semantics.cpp