Merge branch 'local'
Conflicts: SYCLStream.cpp
This commit is contained in:
commit
87b126f5ea
@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Changed
|
### Changed
|
||||||
- Use cl::sycl::id parameters instead of cl::sycl::item.
|
- Use cl::sycl::id parameters instead of cl::sycl::item.
|
||||||
- Update local copy of OpenCL C++ header file.
|
- Update local copy of OpenCL C++ header file.
|
||||||
|
- Ensure correct SYCL queue constructor with explicit async_handler.
|
||||||
|
- Use built in SYCL runtime device discovery.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Pre-building of kernels in SYCL version to ensure compatibility with SYCL 1.2.1.
|
- Pre-building of kernels in SYCL version to ensure compatibility with SYCL 1.2.1.
|
||||||
|
|||||||
@ -45,7 +45,7 @@ SYCLStream<T>::SYCLStream(const unsigned int ARRAY_SIZE, const int device_index)
|
|||||||
std::cout << "Driver: " << getDeviceDriver(device_index) << std::endl;
|
std::cout << "Driver: " << getDeviceDriver(device_index) << std::endl;
|
||||||
std::cout << "Reduction kernel config: " << dot_num_groups << " groups of size " << dot_wgsize << std::endl;
|
std::cout << "Reduction kernel config: " << dot_num_groups << " groups of size " << dot_wgsize << std::endl;
|
||||||
|
|
||||||
queue = new cl::sycl::queue(dev, [&](cl::sycl::exception_list l)
|
queue = new cl::sycl::queue(dev, cl::sycl::async_handler{[&](cl::sycl::exception_list l)
|
||||||
{
|
{
|
||||||
bool error = false;
|
bool error = false;
|
||||||
for(auto e: l)
|
for(auto e: l)
|
||||||
@ -64,7 +64,7 @@ SYCLStream<T>::SYCLStream(const unsigned int ARRAY_SIZE, const int device_index)
|
|||||||
{
|
{
|
||||||
throw std::runtime_error("SYCL errors detected");
|
throw std::runtime_error("SYCL errors detected");
|
||||||
}
|
}
|
||||||
}, {});
|
}});
|
||||||
|
|
||||||
// Create buffers
|
// Create buffers
|
||||||
d_a = new buffer<T>(array_size);
|
d_a = new buffer<T>(array_size);
|
||||||
@ -228,15 +228,8 @@ void SYCLStream<T>::read_arrays(std::vector<T>& a, std::vector<T>& b, std::vecto
|
|||||||
|
|
||||||
void getDeviceList(void)
|
void getDeviceList(void)
|
||||||
{
|
{
|
||||||
// Get list of platforms
|
// Ask SYCL runtime for all devices in system
|
||||||
std::vector<platform> platforms = platform::get_platforms();
|
devices = cl::sycl::device::get_devices();
|
||||||
|
|
||||||
// Enumerate devices
|
|
||||||
for (unsigned i = 0; i < platforms.size(); i++)
|
|
||||||
{
|
|
||||||
std::vector<device> plat_devices = platforms[i].get_devices();
|
|
||||||
devices.insert(devices.end(), plat_devices.begin(), plat_devices.end());
|
|
||||||
}
|
|
||||||
cached = true;
|
cached = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user