Open cdeterman opened 6 years ago
OpenCL kernels are compiled when needed. Thus, it indeed takes all the way until prod()
to compile compute kernels. All the data-setup can proceed without checking for double precision capabilities.
Regarding the error message itself: Is it incorrect (i.e. your device does support double precision)?
The device does, it just appears that the previously initialized contexts from a separate .so
file, that I load, are not shared with my new code. Something I didn't realize in that it appears with C++ the variables between libraries can't be shared. I will need to re-evaluate how I am approaching my current problem. Thanks.
@karlrupp I don't suppose you have come across that situation (contexts between two .so
files). I am trying to avoid rewriting all the same functions but I'm not sure if it will be feasible. Any thoughts would be appreciated.
It's possible that you are encountering the same issue as discussed here: https://sourceforge.net/p/viennacl/discussion/1143678/thread/81ef1cff/
(It's interesting to notice that this issue hasn't bubbled up for several years, and now it shows up twice within a few weeks)
I have the following code,
This compiles without an issue, however when I run it with
double
as opposed tofloat
I get the errorThis makes no sense as it is only thrown at the
prod
call. I am able to initialize the first two matrices without an issue. Why would this be happening?Another point, I tried addition in
viennacl::ocl::switch_context(1);
to make sure the correct context was in use with the device that has double (in this case a simple Intel CPU). I'm currently at a loss as to why this isn't working.