Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/boost/compute/detail/vendor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ inline bool is_apple_platform_device(const device &device)
return is_apple_platform(device.platform());
}

// returns true if the device is an Intel GPU
inline bool is_intel_gpu(const device& device)
{
return device.name().find("Intel(R) HD Graphics") != std::string::npos;
}

} // end detail namespace
} // end compute namespace
} // end boost namespace
Expand Down
8 changes: 6 additions & 2 deletions test/quirks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@ inline bool bug_in_struct_assignment(const boost::compute::device &device)

// clEnqueueSVMMemcpy() operation does not work on AMD devices. This affects
// copy() algorithm. This bug was fixed in AMD drivers for Windows.
// Also it doesn't work on Intel GPUs
// (returns INVALID_VALUE for valid parameters).
//
// see: https://community.amd.com/thread/190585
// also: https://github.com/boostorg/compute/issues/818
inline bool bug_in_svmmemcpy(const boost::compute::device &device)
{
#ifdef _WIN32
return false;
return boost::compute::detail::is_intel_gpu(device);
#else
return boost::compute::detail::is_amd_device(device);
return boost::compute::detail::is_amd_device(device) ||
boost::compute::detail::is_intel_gpu(device);
#endif
}

Expand Down