Closed Xianguang-Zhou closed 5 years ago
I have met the same problem, do you have any idea to solve this problem yet?
@Xianguang-Zhou Are you running your code from inside an IDE, or from command line? Can you try to recompile aparapi, aparapi-native, aparapi-jni from sources. At least try recompiling aparapi. The code you are showing does not contain the aparapi Kernel, so I have no idea if there is a problem in it.
@vonlippmann, I am trying to use JOCL instead of Aparapi.
Hello @CoreRasurae , the Aparapi kernels are here: https://github.com/Xianguang-Zhou/light_neural_network/tree/master/java/src/main/java/org/zxg/ai/lnn/tensor The test code is used for testing my neural network library. Aparapi is used for accelerating tensor computations in my neural network library. My neural network library is here: https://github.com/Xianguang-Zhou/light_neural_network/tree/master/java
Hi @Xianguang-Zhou, I am unable to reproduce the instability you're experiencing, I've run your test code 15 times one after the other, and it always ran until the end. I've ran from the command line, like this:
java -cp light-neural-network-0.0.1-SNAPSHOT.jar:aparapi-jni-1.4.1.jar:aparapi-1.10.0.jar:bcel-6.3.jar:. DotGradTest
Tested with NVIDIA proprietary driver on Linux with a GTX 1050Ti and openjdk 11.
Please check if it is a problem with your AMD driver, can you try with a different driver, or GPU?
@CoreRasurae, I only installed cuda10. Do I still need install Opencl sdk?it seems opencl sdk for nvidia is included in cuda
@vonlippmann For opencl on windows, it normally suffices to install the nvidia driver itself. You can look for clinfo command line utility which can be downloaded from the internet. You can also try gpu-z (https://www.techpowerup.com/gpuz/). Those utilities can check if OpenCL is working or not.
@CoreRasurae , thank you for your help. I have replaced Aparapi with JOCL, and the JVM does not crash.
I know you have closed this, but the reason for Aparapi not working is
Tensor t1 = new Tensor(s1);
Aparapi cannot allocate in OpenCL.
I am writing a neural network library with Aparapi, but when I test the code, the JVM crashes irregularly.
Here is the error message:
Here is the test code: