Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1695 Discussions

(CL_DEVICE_NOT_FOUND) show when run app from console windows

waltermdq
Beginner
307 Views

Hello

 

the example run properly on release and debug inside of visual studio 2019, but not run when run from windows console. i test with gpu, cpu but not works outside of visual studio

 

#include <CL/sycl.hpp>
#include <iostream>

 


using namespace sycl;

//************************************
// Demonstrate vector add both in sequential on CPU and in parallel on device.
//************************************
int main(int argc, char* argv[]) {

// The default device selector will select the most performant device.
// default_selector d_selector;

 


try {
queue q{ cpu_selector{} };

// Print out the device information used for the kernel code.
std::cout << "Running on device: "
<< q.get_device().get_info<info::device::name>() << "\n";

} catch (exception const &e) {

std::cout << "An exception is caught for vector add.\n";
std::cerr << e.what();
std::terminate();
system("pause");
}

system("pause");
return 0;
}

0 Kudos
0 Replies
Reply