Quantcast
Channel: Community : All Content - OpenCL

clCreateKernel SIGSEGVs if used with binary image in openCL 1.2

$
0
0

Problem happens only when used with binary kernel image compiled for the same device. Building from kernel sources works fine.

My program uses the FFT_Kernels.cl from your samples. Binary image was saved and loaded using your code in CLUtils.cpp,

however, converted to C.

 

Running it through the debugger, gdb, shows:

.

.

.

setupCL () at dsp.c:252

252        fft_kernel = clCreateKernel(prog, "fft", &err);

(gdb)

 

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff3bc71fc in ?? () from /opt/AMDAPPSDK-2.9-1/lib/x86_64/libamdocl64.so

(gdb) where

#0  0x00007ffff3bc71fc in ?? ()

   from /opt/AMDAPPSDK-2.9-1/lib/x86_64/libamdocl64.so

#1  0x00007ffff3baa8de in clCreateKernel ()

   from /opt/AMDAPPSDK-2.9-1/lib/x86_64/libamdocl64.so

#2  0x000000000040e0da in setupCL () at dsp.c:252

#3  0x000000000040a29f in main (argc=1, argv=0x7fffffffdd30) at sdmp.l:2097

(gdb) p prog

$6 = (cl_program) 0xdeacd0

 

Using fglrx-14.501.1003 in Ubuntu 14.04 x64, with SDK 2.9.1 (opencl 1.2)

Video card R9 200 Saphire, codename Pitcairn. CPU AMD FX(tm)-8320 Eight-Core Processor


Mistake in AMD GCN 3 ISA Reference (VOP_SDWA, VOP_DPP)

$
0
0

Hi, I am amateur.

 

I found mistake in AMD GCN3 ISA Reference in VOP2, VOP1 and VOPC encoding format. In these places manual describes values in SRC0 field and

describes 249 and 250 values as reserved. This is mistake because these values indicates respectively VOP_SDWA and VOP_DPP additional dwords whose were described in VOP_SDWA and VOP_DPP sections.

Dear AMD engineers. Can you fix GCN3 ISA Refman and provide correct reference?

Is global synchronization in OpenCL possible?

$
0
0

Hello everyone!

 

As well known OpenCL barrier() function works only for single workgroup, and there is no direct possibility to synchronize workgroups. If it possible what's best approach for global synchronization today? Using atomics, OpenCL 2.0 features, etc.?

Device queues

$
0
0

I don't mean to hijack your thread, but I'm having problems w/ clCreateCommandQueueWithProperties.  Anytime I pass ANY properties through, the function returns CL_INVALID_QUEUE_PROPERTIES.  I would really like to turn on out of order queues.


I am using a Radeon 290.

I'm using the 3.0-0 Beta SDK

I've tried all the newest drivers including beta.

 

I am running into other problems as well with kernel errors that arn't supposed to exist in OpenCL 2.0 such as it doesn't know what the ndrange_1D(...) function is... this might be related.

 

Any help would be greatly appreciated!

Catalyst 14.12 OpenCL problems

$
0
0

Hey AMD Devs,

 

I'm not sure if you know about the problems that were introduced with Catalyst 14.12 (compared to 14.9). I was able to track down at least one of them (the most important one) and wanted to let you know so that you might be able to find the problem more easy or to fix it in a later catalyst release. First of all, here are my observeration so far: https://hashcat.net/forum/thread-3915.html

 

What I am talking here is the problem that the first GPU always seem to be slower than all the other ones. In oclHashcat, there is a seperate thread for each GPU from which the kernels are queued. That's important as oclHashcat supports having GPU's of different speed and therefore it has to do the synchronization on its own. Each GPU has its own context and its own command queue.

 

I played a bit with the GPU_* variables found in /usr/lib/libamdocl64.so and then, by luck, I found a workaround for the first-gpu-is-slow problem: Set GPU_NUM_COMPUTE_RINGS to 1

 

--

Jens

BSOD / hang-up for OpenCL program

$
0
0

Hi,

 

I have a work-station with three 7970Ghz Tahitis on which OpenCL simulations (self-written) run. After weeks without problems for simulation #1 now for simulation # 2 (most parts are identical, but #2 has several extensions) this night a Blue Screen of Death has occurred. I restarted today, and after ~ 9 hours I noticed that both programs run concurrently on the first Tahiti were hung-up (at the same time). GPU-Z showed no GPU activitiy for that Tahiti, not even any memory allocated on the device, so it appears there was a complete OpenCL driver disconnection. The other two Tahitis were running fine. The hung-up did not occur at the same calculation stage as the overnight BSOD.

OS is Windows 7 64-bit Professional, on each Tahiti two simulations (exactly the same OpenCL code and host binary) were run concurrently. Each simulation uses several command-queues for interlaced data transfer and kernel invocations (called from a single host thread though). Driver is Catalyst 13.9 -> deliberately, because that was working for all tests conducted and hence no upgrade to a newer driver version has ever been tried out. Simulation # 2 has been running fine for weeks last year (in nearly identical OpenCLcode manner, however the input was completely different - much larger and hence e.g. between kernel invocations much more time passed by).

Any ideas what is most likely the root of the problem, i.e. hardware defect, driver problem, or ev. an issue in my program that could cause this? Any specific hints for further testing?

In case the driver might be it, any information on a particularly stable OpenCL driver version released since? If I dare a driver upgrade, would it be possible to _completely_ unroll to 13.9, i.e. remove absolutely everything from a newer driver version tried out?

I cannot disclose the code here, sorry.

 

thanks,

Thomas

Two S9150s, only one showing up in clGetDeviceIDs()

$
0
0

Hello,

 

I have two S9150 GPUs and when I execute clGetDeviceIDs() I only see two devices: one Hawaii device and one CPU device. However, when I run "clinfo", it shows that I have three devices: two Hawaii GPUs and one CPU. I am running on RedHat 6.5. I have AMD APP 2.9.1.

 

Does anyone have any thoughts on what the issue could be?

 

Thanks,

 

Chris

OpenCL optimization: removing conditional assignments

$
0
0
Here is a quote from the AMD OpenCL optimization guide:

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Optimizing Kernels for Southern Island GPUs

Remove Conditional Assignments

A conditional of the form “if-then-else” generates branching. Use the select() function to replace these structures with conditional assignments that do not cause branching. For example:

if(x==1) r=0.5;
if(x==2) r=1.0;

becomes

r = select(r, 0.5, x==1);
r = select(r, 1.0, x==2);

Note that if the body of the if statement contains an I/O, the if statement cannot be eliminated.

 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

I am confused about the last statement:

 

If the body of the if statement contains an I/O, the if statement cannot be eliminated.

 

Can someone please explain?


2D array using clSVMAlloc ?

$
0
0

Hi ,

 

I can write a 2D dynamic array as follow :

"""

int size = 256 ;

int *temp[5] ;

temp[0] = (int *)malloc(sizeof(int) * size);

"""

 

But when I want to dynamic create a 2D array by using clSVMAlloc as previously said , how could I do this ?

 

Thanks : D

CPU device openCL c version issue

$
0
0

hi all,

        I installed the latest AMD driver to support OpenCL  2.0. The samples work fine. However, when I check the clinfo, I found that my CPU device OpenCL C version is 1.2, while OpenCL 2.0 for my GPU.  Does anything go wrong or it is normal? 

        As OpenCL support SVM, so I expect CPU and GPU to have same global memory size, however in clinfo, they don't. Is this caused by different OpenCL C version?





Latest Images