Hi Sumit,

 > Thanks for the information. I have a second problem that has cropped up!
> a.) Apparently, I cannot copy a Row-Major Eigen matrix to a vcl matrix!
> It comes up with weird errors. I was using the default statements from
> the examples folder. The moment I changed it to Column Major eigen
> matrices the program compiled without any problem!

Our interface currently supports Eigen::MatrixXf and Eigen::MatrixXd, 
which seems like it does not cover the row-major case. I'll look into it 
and extend the interface if needed.


> b.) I have an AMD APU (CPU + GPU) and a discrete GPU. How do I force
> ViennaCl to default to the discrete GPU and not the GPU from the APU? I
> tried a kludge:
> /get all available devices
>    viennacl::ocl::platform pf;
>    std::cout << "Platform info: " << pf.info() << std::endl;
>    std::vector<viennacl::ocl::device> devices =
> pf.devices(CL_DEVICE_TYPE_GPU);// CL_DEVICE_TYPE_DEFAULT);
>    std::cout << devices[1].name() << std::endl;
>    std::cout << "Number of devices for custom context: " <<
> devices.size() << std::endl;
>
>    //set up context using all found devices:
>    int gSize = (int)devices.size();
>    for (int i = gSize-1; i >=0 ; --i)
>    {
>        device_id_array.push_back(devices[i].id());
>    }
>
>    std::cout << "Creating context..." << std::endl;
>    cl_int err;
>    cl_context my_context = clCreateContext(0,
> cl_uint(device_id_array.size()), &(device_id_array[0]), NULL, NULL, &err);
>
> and this made it work. However, is there a cleaner way of doing this?
> This code snippet is from "custom-context.cpp". If i tried
> &(device_id_array[1]), the program crashes !

http://viennacl.sourceforge.net/doc/manual-multi-device.html

Best regards,
Karli

------------------------------------------------------------------------------
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to