Frage

I try to launch at least empty kernel with a lot of parameters but I got memory access violation in function enqueueNDRangeKernel. Please check my code, maybe I missed something or just didn't know.

Host code: https://dl.dropboxusercontent.com/u/71256314/main.cpp At first goes some initialization, then I create buffers, then set arguments. No errors come out. It crashes on first enqueueNDRangeKernel function call.

Kernel code: https://dl.dropboxusercontent.com/u/71256314/baum_kernel.cl It doesn't work even though kernel is empty.

Some problems with buffers I guess, but no errors are returned.

Versions: AMD APP SDK v2.8 — AMD Catalyst™ 12.10 (9.002) GPU: ATI Mobility Radeon HD 5650

War es hilfreich?

Lösung

1) The problem was in line

err = kernel.setArg(11, Otr);   checkErr(err, "Kernel::setArg()11");

I was passing pointer to float Otr instead of passing the corresponding OpenCL buffer Otr_b to setArg function. OpenCL had been trying to copy the pointer to kernel which was expecting buffer. No doubt there was access violation error.


2) Another important point mentioned by DarkZeros: check your library linking and also version correspondence between ATI driver and AMD APP SDK. Here is link where drivers and SDKs compatibility is listed: Versions of AMD APP SDK. I my case I had AMD APP SDK v2.8.1 which was not compatible with 12.10 (9.002) driver. I installed v2.8.0 version eventually.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top