ivan-vasilev / neuralnetworks

java deep learning algorithms and deep neural networks with gpu acceleration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execution mode GPU failed: OpenCL execution seems to have failed (runKernelJNI returned -51) com.aparapi.internal.exception.AparapiException: OpenCL execution seems to have failed (runKernelJNI returned -51)

InonS opened this issue · comments

Hi @ivan-vasilev !

I've been trying to compare your package to my CPU backend TensorFlow. It seems that my puny GPUs can't handle the MNIST example (I have both an on-board Intel one as well as an AMD Radeon one). Running the MNIST example in your package with a CPU backend works without a problem, but when I require that AParAPI use the GPU backend I get the following warning (fallBackToNextDevice):

WARNING: Execution mode GPU failed for AparapiBackpropReLU, modes=[AUTO], current = GPU: OpenCL execution seems to have failed (runKernelJNI returned -51)
com.aparapi.internal.exception.AparapiException: OpenCL execution seems to have failed (runKernelJNI returned -51)
	at com.aparapi.internal.kernel.KernelRunner.executeOpenCL(KernelRunner.java:1058)
	at com.aparapi.internal.kernel.KernelRunner.executeInternalInner(KernelRunner.java:1519)
	at com.aparapi.internal.kernel.KernelRunner.executeInternalOuter(KernelRunner.java:1180)
	at com.aparapi.internal.kernel.KernelRunner.execute(KernelRunner.java:1170)
	at com.aparapi.Kernel.execute(Kernel.java:2439)
	at com.aparapi.Kernel.execute(Kernel.java:2396)
	at com.aparapi.Kernel.execute(Kernel.java:2371)
	at com.github.neuralnetworks.util.KernelExecutionStrategy$GPUKernelExecution.execute(KernelExecutionStrategy.java:42)
	at com.github.neuralnetworks.calculation.neuronfunctions.AparapiFullyConnected.calculate(AparapiFullyConnected.java:151)
	at com.github.neuralnetworks.training.backpropagation.BackPropagationConnectionCalculatorImpl.calculate(BackPropagationConnectionCalculatorImpl.java:73)
	at com.github.neuralnetworks.calculation.LayerCalculatorBase.calculate(LayerCalculatorBase.java:44)
	at com.github.neuralnetworks.training.backpropagation.BackPropagationLayerCalculatorImpl.backpropagate(BackPropagationLayerCalculatorImpl.java:33)
	at com.github.neuralnetworks.training.backpropagation.BackPropagationTrainer.learnInput(BackPropagationTrainer.java:78)
	at com.github.neuralnetworks.training.OneStepTrainer.train(OneStepTrainer.java:44)
	at ml.sharony.ann.tf.examples.sentiment.BenchmarkTFCPU.test(BenchmarkTFCPU.java:134)

What does runKernelJNI returned -51 mean?

You can find the source code I'm running on my fork of your repo, under the benchmark-tf-cpu branch.