Syncleus / aparapi

The New Official Aparapi: a framework for executing native Java and Scala code on the GPU.

Home Page:http://aparapi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nvidia mobile GPU

freemo opened this issue · comments

From @Oyatsumi on July 11, 2016 21:49

Currently having the following issue:

OpenCL 1.2 CUDA 8.0.0
!!!!!!! clCreateContextFromType() failed device not available
jul 11, 2016 3:20:10 AM com.amd.aparapi.internal.kernel.KernelRunner warnFallBackAndExecute
ADVERT╩NCIA: Reverting to Java Thread Pool (JTP) for class com.CopyKernel: initJNI failed to return a valid handle
!!!!!!! clCreateContextFromType() failed device not available
jul 11, 2016 3:20:10 AM com.amd.aparapi.internal.kernel.KernelRunner warnFallBackAndExecute
ADVERT╩NCIA: Reverting to Java Thread Pool (JTP) for class com.DilateKernel: initJNI failed to return a valid handle

I cant get Aparapi to run on my GTX 960M. I'm on a notebook.

It runs fine on my Intel processor, however.

I tried to recompile the code but the source have some missing headers.

Thank you so much in advance.

Copied from original issue: aparapi/aparapi#32

From @grfrost on July 12, 2016 1:12

You will need the OpenCL headers and libs for your platform. In your case
you will need them from NVidia. Usually comes with CUDA SDK (or used to).

The fact that Intel is working means you must have downloaded Intels's SDK
(header and lib) so your code can 'link'. But to run (on GPU) you will
need a working NVidia OpenCL runtime (dll and driver) on your laptop.

Towards the top of this page it shows you where to get the drivers

https://developer.nvidia.com/opencl

Which sends you to here.

http://www.nvidia.com/Download/index.aspx?lang=en-us

Good luck

Gary

On Mon, Jul 11, 2016 at 2:49 PM, Érick Oliveira Rodrigues <
notifications@github.com> wrote:

Currently having the following issue:

OpenCL 1.2 CUDA 8.0.0
!!!!!!! clCreateContextFromType() failed device not available
jul 11, 2016 3:20:10 AM com.amd.aparapi.internal.kernel.KernelRunner
warnFallBackAndExecute
ADVERT╩NCIA: Reverting to Java Thread Pool (JTP) for class com.CopyKernel:
initJNI failed to return a valid handle
!!!!!!! clCreateContextFromType() failed device not available
jul 11, 2016 3:20:10 AM com.amd.aparapi.internal.kernel.KernelRunner
warnFallBackAndExecute
ADVERT╩NCIA: Reverting to Java Thread Pool (JTP) for class
com.DilateKernel: initJNI failed to return a valid handle

I cant get Aparapi to run on my GTX 960M. I'm on a notebook.

It runs fine on my Intel processor, however.

I tried to recompile the code but the source have some missing headers.

Thank you so much in advance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
aparapi/aparapi#32, or mute the thread
https://github.com/notifications/unsubscribe/AEKiN2t0mZB3THxfmClZqUSu_Uz3mI3sks5qUrqFgaJpZM4JJ0XC
.

From @Oyatsumi on July 12, 2016 1:26

Dear grfrost,

Thanks for the reply.

I dont think it is a driver issue, please take a look at this post:
tigerneil/aparapi#147

My drivers and paths are set correctly.

Its the same problem. And I guess there is still no solution.

From @grfrost on July 12, 2016 3:57

So you can test. The C++ code (do you know C++/C?) is checking the
response from the driver to see if the driver supports specific versions of
OpenCL. It is checking for 1.1 at present just change the code to check
for 1.2 instead.

I think the thread you referenced indicates the file and possibly line # to
change.

Gary

On Mon, Jul 11, 2016 at 6:26 PM, Érick Oliveira Rodrigues <
notifications@github.com> wrote:

Dear grfrost,

Thanks for the reply.

I dont think it is a driver issue, please take a look at this post:
tigerneil/aparapi#147 tigerneil/aparapi#147

Its the same problem. And I guess there is still no solution.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
aparapi/aparapi#32 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEKiNyKvh3UMzmjuSYu6cN8_TzGgbC80ks5qUu00gaJpZM4JJ0XC
.

From @Oyatsumi on July 12, 2016 22:58

Dear Gary,

Thank you again for the response.

Yes, the thread does indicate that, but it does also indicate that the problem is solved on the source file.
Please take a look at that file and line, it is already there.

Let's see:

// fix this so OpenCL 1.3 or higher will not break!
if ( !strncmp(platformVersionName, "OpenCL 1.2", 10)
|| !strncmp(platformVersionName, "OpenCL 1.1", 10)
|| !strncmp(platformVersionName, "OpenCL 2.0", 10)
#ifdef APPLE
|| !strncmp(platformVersionName, "OpenCL 1.0", 10)
#endif
)

It is already there, my GPU returns OpenCL 1.2 CUDA 8.0.0

So it should have worked in theory, but it does not.

Besides, I cannot recompile the Aparapi code, I imported everything to visual studio, and when I try to compile it returns more than 50 errors.

I guess:

  1. The problem is not that.
  2. Or the binary provided here is an older version regarding the source code.

Thank you so much again.

From @grfrost on July 13, 2016 15:53

Are you building aparapi from source? Or using a pre-built binary?

Can you run OpenCL apps from the commandline?

I think you indicated two issues. 1) that your drivers were not installed
and 2) that aparapi could not locate a 1.2 OpenCL device.

Have you fixed 1) ;) because #2 will look like #1 ;)

Gary

On Tue, Jul 12, 2016 at 3:58 PM, Érick Oliveira Rodrigues <
notifications@github.com> wrote:

Dear Gary,

Thank you again for the response.

Yes, the thread does indicate that, but it does also indicate that the
problem is solved on the source file.
Please take a look at that file and line, it is already there.

Take a look at the file around this line:


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
aparapi/aparapi#32 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEKiNx1W6Z8PUska_T8zlMDTIj6UoYUAks5qVBwBgaJpZM4JJ0XC
.

From @Oyatsumi on July 13, 2016 23:18

Dear Gary,

I'm using the dlls provided in the Release tab here in github. I'm currently using the x64.

Yes, I do, please take a look:
image
I've compiled and run that: https://saintdako.github.io/blog/2015/07/09/windowsOpenCL/

And again, I cant run Aparapi with my Nvidia GPU.

Look at my folder and my cmd, I've also put everything in the same folder just in case.

image

Am I still missing something?

Here are my folders containing the opencl files (they are correctly added to the windows PATH variable):
image
image

Thank you again and sorry to bother you.

Yours sincerely,
Érick

From @grfrost on July 14, 2016 0:40

So my guess is that the fix you need is in the source, but the dll's do not
contain the fix.

If you have enough to build main.cpp as opencl app. Then with 'some
tweaking' you should be able to build libaparapi.so for your windows
machine.

Assuming you have the aparapi source (with the fix) from git hub, you
should be able to go to com.amd.aparapi.jni dir and build using 'ant'

Sorry I don't have a windows machine anymore... I do know that microsoft
seems to move their headers and libs around every single time they update
to a new version.

But the code should be close to working for most windows compiler setups.

You will have to probably change ant scripts to pickup the nvidia
libs/headers.

Gary

On Wed, Jul 13, 2016 at 4:18 PM, Érick Oliveira Rodrigues <
notifications@github.com> wrote:

Dear Gary,

I'm using the dlls provided in the Release tab here in github. I'm
currently using the x64.

Yes, I do, please take a look:
[image: image]
https://cloud.githubusercontent.com/assets/8701389/16822923/84c047fc-4936-11e6-9f1c-11734d78eea2.png
I've compiled and run that exactly:
https://saintdako.github.io/blog/2015/07/09/windowsOpenCL/

And again, I cant run Aparapi with my Nvidia GPU.

Look at my folder and my cmd, I've also put everything in the same folder
as the exec just in case.

[image: image]
https://cloud.githubusercontent.com/assets/8701389/16822958/bc8391bc-4936-11e6-9f68-b28cc99b910f.png

Am I still missing something?

Here are my folders containing the opencl files (they are correctly added
to the windows PATH variable):
[image: image]
https://cloud.githubusercontent.com/assets/8701389/16822980/e537c8b2-4936-11e6-9747-22cdfa368a2d.png
[image: image]
https://cloud.githubusercontent.com/assets/8701389/16822983/ebd4ba68-4936-11e6-83f7-672da820f254.png

Thank you again and sorry to bother you.

Yours sincerely,
Érick


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
aparapi/aparapi#32 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEKiNxrw1yOaByeiOClPf876hVIohenlks5qVXJJgaJpZM4JJ0XC
.

From @Oyatsumi on July 14, 2016 0:55

Thanks for the reply Gary.

Yep, that is also what I am suspecting.

I will try for sometime to fix this, but I think the effort will not be rewarding.

My idea was just to compare the performance of Aparapi on a task against CUDA and other CPU implementations. I really like the idea behind Aparapi, and I am a Java programmer for a long time.

So, probably I will end up ignoring Aparapi in my study.
But if by chance somebody fix this in the future and provide the binaries, then I would be interested.

Lets hope I can fix it in the next few days.

Thank you so much again.

Yousr sincerely,
Érick

From @grfrost on July 14, 2016 2:4

Yeah it's annoying. Building on windows is a pain (thanks to microsoft),
but the drivers on Windows are headily optimized. So Windows is a great
platform to run on, but awful to build for.

Linux and MacOSX just have all the tools you need, or make it easy to
build.

Good luck in your endeavour. Sorry I can't be more help.

Gary

On Wed, Jul 13, 2016 at 5:55 PM, Érick Oliveira Rodrigues <
notifications@github.com> wrote:

Thanks for the reply Gary.

Yep, that is also what I am suspecting.

I will try for sometime to fix this, but I think the effort will not be
rewarding.

My idea was just to compare the performance of Aparapi on a task against
CUDA and other CPU implementations. I really like the idea behind Aparapi,
and I am a Java programmer for a long time.

So, probably I will end up ignoring Aparapi in my study.
But if by chance somebody fix this in the future and provide the binaries,
then I would be interested.

Lets hope I can fix it in the next few days.

Thank you so much again.

Yousr sincerely,
Érick


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
aparapi/aparapi#32 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEKiN-45GLFTANVMBrBG12e2yxijWqI8ks5qVYkDgaJpZM4JJ0XC
.

This has since been resolved since we distribute the dlls ourselves now. Closing.