Quelle cxx11_tensor_device_sycl.cpp
Sprache: unbekannt
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2016 // Mehdi Goli Codeplay Software Ltd. // Ralph Potter Codeplay Software Ltd. // Luke Iwanski Codeplay Software Ltd. // Contact: <eigen@codeplay.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
template<typename DataType> void sycl_device_test_per_device(const cl::sycl::device& d){
std::cout << "Running on " << d.template get_info<cl::sycl::info::device::name>() << std::endl;
QueueInterface queueInterface(d); auto sycl_device = Eigen::SyclDevice(&queueInterface);
test_device_memory<DataType, RowMajor, int64_t>(sycl_device);
test_device_memory<DataType, ColMajor, int64_t>(sycl_device); /// this test throw an exception. enable it if you want to see the exception //test_device_exceptions<DataType, RowMajor>(sycl_device); /// this test throw an exception. enable it if you want to see the exception //test_device_exceptions<DataType, ColMajor>(sycl_device);
}
EIGEN_DECLARE_TEST(cxx11_tensor_device_sycl) { for (constauto& device :Eigen::get_sycl_supported_devices()) {
CALL_SUBTEST(sycl_device_test_per_device<float>(device));
}
}
[ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
]