Does anyone know or has gotten the Nvidia OpenCL samples to run on AMD GPUs?
oclFDTD3d sample from Nvidia. Trying to run it on 5870 machine
I get a bug in the clCreateContext.. Type function call.
Ah, wrong question:
Should I be able to build their samples in AMD SDK?
i extracted cuda SDK and then run makefile on OpenCL directory. everything is compiled fine and most of samples works too.
I'm on Windows and I don't see a Makefile.
Also, the .exe in the bin folder don't run either.
Are you not able to recompile and run too?
What error are you getting? What about other samples?
edit : Noticed the error above. Are you able to run other samples?
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
on the line: context = clCreateContextFromType(0, CL_DEVICE_TYPE_GPU, NULL, NULL, &errnum);
It's a runtime error. The samples build/compile fine.
i am on linux. i tried cuda toolkit 3.0 samples.
and clCreateContextFromType(0, CL_DEVICE_TYPE_GPU, NULL, NULL, &errnum);
NULL is not valid platform anymore with ICD. you must specify platform id.
So you got the 3.0 samples to build and run fine?
yes. i have instaled my packages. then i download gpucomputingsdk_3.0_linux.run extract it into one director and it work like charm.
most samples run fine. even oclSimpleTexture3D works when i changed CL_R to CL_RGBA (and some other minor changes to use 4 channel textures).
I think it's a problem with ICD. Check this http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71
Originally posted by: ryta1203 Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. on the line: context = clCreateContextFromType(0, CL_DEVICE_TYPE_GPU, NULL, NULL, &errnum); It's a runtime error. The samples build/compile fine.
Are you using AMD SDK headers to compile? and you need to change code as per ICD.
I just downloaded gpucomputingsdk 3 and are unable to run the binary or compile the code. It comes up with the error
error PRJ0019: A tool returned an error code from "Compiling with CUDA Build Rule..."
Im guessing its compiling it against the nvidia sdk. How do i change it to use the ati sdk
Both the ATI and NVIDIA SDKs have their own build and demo systems with a hierarchy of Makefiles and common code (I am on Linux, don't know about Windows projects). This can be a little busy and difficult to figure out. It might be easier to create a new project somewhere else and lift the code out.
However, the basic difference is almost seamless. I can switch back and forth between ATI and NVIDIA with these Makefile macros:
ATI_SDK = $(ATISTREAMSDKROOT)ATI_CFLAGS = -I$(ATI_SDK)/includeATI_OPENCL_LDFLAGS = -L$(ATI_SDK)/lib/x86_64 -lOpenCLNVIDIA_SDK = $(NVIDIASDKROOT)NVIDIA_CFLAGS = NVIDIA_OPENCL_LDFLAGS = -lOpenCL
Note that ATI installs everything together in a separate location for the Stream SDK. NVIDIA installs into the system /usr directories. It may be analogous on Windows.
For instance, the default build rule I use when compiling against ATI is:
.cpp.o : $(GNU_CXX) -c $(GNU_CXXFLAGS) $(ATI_CFLAGS) $< -o $@
to compile against NVIDIA, this becomes:
.cpp.o : $(GNU_CXX) -c $(GNU_CXXFLAGS) $(NVIDIA_CFLAGS) $< -o $@
I have only ever found one OpenCL compile-time incompatibility between the ATI and NVIDIA SDKs which was a very minor signature difference. Otherwise, everything just worked out of the box (which still surprises me). Building between the two SDKs to target different GPUs is as little as switching the Makefile macros above.
Retrieving data ...