[compute] 30/46: Skipping copy_svm_ptr test case on AMD devices
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Dec 21 18:28:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository compute.
commit 972a1a26e8e3833180451d52ef1d4c426c94f9c8
Author: Jakub Szuppe <j.szuppe at gmail.com>
Date: Thu Oct 29 12:31:30 2015 +0100
Skipping copy_svm_ptr test case on AMD devices
clEnqueueSVMMemcpy() operation does not work on AMD devices due to a bug
in drivers (https://community.amd.com/thread/190585). This affects copy()
algorithm (when SVM is used) and results in copy_svm_ptr failing. Now this
test case is skipped on AMD devices.
---
test/quirks.hpp | 11 ++++++++++-
test/test_copy.cpp | 6 ++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/test/quirks.hpp b/test/quirks.hpp
index 3de34ca..cc1b23a 100644
--- a/test/quirks.hpp
+++ b/test/quirks.hpp
@@ -28,12 +28,21 @@ inline bool is_pocl_device(const boost::compute::device &device)
// AMD platforms have a bug when using struct assignment. this affects
// algorithms like fill() when used with pairs/tuples.
//
-// see: http://devgurus.amd.com/thread/166622
+// see: https://community.amd.com/thread/166622
inline bool bug_in_struct_assignment(const boost::compute::device &device)
{
return boost::compute::detail::is_amd_device(device);
}
+// clEnqueueSVMMemcpy() operation does not work on AMD devices. This affects
+// copy() algorithm.
+//
+// see: https://community.amd.com/thread/190585
+inline bool bug_in_svmmemcpy(const boost::compute::device &device)
+{
+ return boost::compute::detail::is_amd_device(device);
+}
+
// returns true if the device supports image samplers.
inline bool supports_image_samplers(const boost::compute::device &device)
{
diff --git a/test/test_copy.cpp b/test/test_copy.cpp
index 307949f..f7b1ba5 100644
--- a/test/test_copy.cpp
+++ b/test/test_copy.cpp
@@ -29,6 +29,7 @@
#include <boost/compute/container/vector.hpp>
#include <boost/compute/iterator/detail/swizzle_iterator.hpp>
+#include "quirks.hpp"
#include "check_macros.hpp"
#include "context_setup.hpp"
@@ -285,6 +286,11 @@ BOOST_AUTO_TEST_CASE(copy_svm_ptr)
{
REQUIRES_OPENCL_VERSION(2, 0);
+ if(bug_in_svmmemcpy(device)){
+ std::cerr << "skipping copy_svm_ptr test case" << std::endl;
+ return;
+ }
+
int data[] = { 1, 3, 2, 4 };
compute::svm_ptr<int> ptr = compute::svm_alloc<int>(context, 4);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/compute.git
More information about the debian-science-commits
mailing list