Skip to content

[hplinpack][SYCL] Fix the use of deprecated namespace #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
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
18 changes: 9 additions & 9 deletions hplinpack/dpcpp/hpl-2.3/src/dpcpp/dpcpp_dgemm.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ class DeviceManager;
static DeviceManager *instance[2];

class DeviceManager{
cl::sycl::device *m_pDevice;
cl::sycl::queue queues[NUMBER_OF_STREAMS];
sycl::device *m_pDevice;
sycl::queue queues[NUMBER_OF_STREAMS];

DeviceManager(){
try{
m_pDevice = new cl::sycl::device(cl::sycl::default_selector());
m_pDevice = new sycl::device(sycl::default_selector());
}catch(...){
std::cout << "ERROR: failed to create sycl device.\n";
}

auto exception_handler = [] (cl::sycl::exception_list exceptions) {
auto exception_handler = [] (sycl::exception_list exceptions) {
for (std::exception_ptr const& e : exceptions) {
try {
std::rethrow_exception(e);
} catch(cl::sycl::exception const& e) {
} catch(sycl::exception const& e) {
std::cout << "Caught asynchronous SYCL exception during GEMM:\n"
<< e.what() << std::endl;
}
Expand All @@ -124,7 +124,7 @@ class DeviceManager{



queues[0] = cl::sycl::queue(*m_pDevice, exception_handler);
queues[0] = sycl::queue(*m_pDevice, exception_handler);
//DeviceManager::display_device_properties(*m_pDevice);
//std::cout << "Done\n";

Expand All @@ -149,9 +149,9 @@ class DeviceManager{
return instance[mpi_id];
}

cl::sycl::device &getDevice(){ return *m_pDevice;}
cl::sycl::queue *getQueues(){ return queues;}
sycl::device &getDevice(){ return *m_pDevice;}
sycl::queue *getQueues(){ return queues;}

static void display_device_properties(cl::sycl::device const &dev);
static void display_device_properties(sycl::device const &dev);
static void destroyAllInstances() {delete instance[0]; delete instance[1];}
};