OpenCL __constant oddities

I am currently experimenting with OpenCL for an optimization problem, and I wrote the following kernel, which does compile correctly but it raises a CLOUT_OFRESOURCES error when executed.
++__kernel cost(__global int *out, __constant int *vertices, __constant int *edges, __global int *coloring, int k, int total) {++
++int i = getglobalid(0);++
++int color = i % k;++
++int v = i / k;++
++if (i < total) {++
++out = 0;++
++for (int j = vertices[v]; j < vertices[v + 1]; j+)+
+{+
++int w = edges[j];++
++if (color == coloring[w])++
+out++;+
+}+
+}+
+}+
I found out that the problem is declaring more than one __constant argument, i.e., the same kernel with the following signature
__kernel cost(__global int *out, __constant int *vertices, __global int *edges, __global int *coloring, int k, int total)
does compile and does not issue any error during its execution.
Is it something wrong with Apple implementation of OpenCL or is something more subtle with __constantness that I did not understand?
Thanks in advance for your help.
Luca

Luca DG wrote:
Is it something wrong with Apple implementation of OpenCL or is something more subtle with __constantness that I did not understand?
It appears to be a known bug in NVIDIA's compiler that Apple apparently uses - or so they say in the internet.

Similar Messages

  • AME takes a long time to start encoding when using GPU Acceleration (OpenCL)

    Have had this issue for a while not (current update as well as at least the previous one).
    I switched to using GPU Hardware Acceleration over Software Only rendering. The speed for the actual encoding on my Mac is much faster that software only rendering. However, more often than not, the encoding process seems to stick at 0% waiting to start for a long time, say anywhere from 1 minute to several minutes. Then it will eventually start.
    Can't seem to find what is causing this. Doesn't seem related to any particular project, codec, output format or anything else I can see. I'd like to keep using GPU Acceleration but it's pointless if it takes 5 times as long to even start as rendering by software-only would. It doesn't even pass any elapsed time while it's hanging or waiting. Says at 0 until it starts. Like I said, once it starts, it's a much faster render than what the software would take. Any suggestions? Thanks.
    using an iMac, 3.4Ghz, 24GB RAM, AMD Radeon HD 6970M 2048 MB

    Actually, I just discovered it doesn't seem to have anything to do with OpenCL. I just put the rendering back to software only and it is doing the same thing. hangs for a long time before it starts to run. Activity monitor shows it running 85-95% CPU, 17 threads and about 615 MB of memory. Activity Monitor doesn't say its not responding, it just seems kind of idle. It took almost 7 minutes for it to start rendering.
    1- Running version 7.2.2.29 of Media Encoder,
    version 7.2.2 (33) of Premiere.
    2- Yes, a premiere project of HD 1080 source shot with Canon 60D, output to H.264 YouTube 720, fps 23.976
    not sure what you are referring to by native rendering. The rendering setting i tried now is Mercury Playback Engine Software Only if that is what you are referring to. But OpenCL gives me the same issue now.
    3- H.264 YouTube 720, 23,976 - seems to happen on multiple output types
    4- In Premiere, I have my project timeline window selected. Command-M, selected the output location I wanted and what output codec, selected submit to Queue. Media Encoder comes up, the project loads and I select the run icon. It preps and shows the encoding process setup in the "Encoding" window, then just sits there with no "Elapsed" time occurring until almost 5-6 minutes later, then it kicks in.

  • Does OpenCL Work With ATI Radeon HD 4670?

    Some of the new iMacs have an ATI Radeon HD 4670 graphics card.
    On Apple's Snow Leopard technical specifications page, they list all of the graphics card that work with OpenCL. The ATI Radeon HD 4670 isn't one of them!
    What does this mean? Have Apple simply not updated the page, or do the new iMacs not support OpenCL?

    The answer is not clear.
    Other people (e.g., me) want to know THE answer also.
    I did some poking around and it appears that AMD is working on it. Note that I wrote "it appears".
    If you really want OpenCL support AND you must buy today AND you want that support guaranteed, then you must buy the $1999 iMac.

  • Will Mid-2011 Macbook Air support OpenCL?

    Does anyone here know if the Mid 2011 MBA support OpenCL? BTW, where I could find the more information? Thanks.

    I have the same issue but did a little research and found out why our mid 2011 won't work.  Go to your Apple Icon and system report and look for Bluetooth.  Look at the LMP Version (on my Mac it is 4.0) and it must be 6.0 to work for Handoff.  I am now trying to find out if there is any way to upgrade this on my Mac because it seems a little crazy to buy a new Mac for just this when I still have extended warranty on my existing Mac.  Does anyone know if it is possible to upgrade Bluetooth?

  • Hanging start up and other oddities

    Hanging Startup and other oddities
    I'm not especially proficient with the upkeep and terminology that comes with the programming aspect of Macs, so, if you do help, if you could please put whatever advice you have in lay terms, it would really help me out.
    I've had my laptop computer for going on three years now, and I've never had a problem like this before. My machine started to really slow down yesterday morning, and generally when ever it does that, I just do a quick restart, and everything is back at normal. Well, not so yesterday.
    To begin with, it took me to the grey screen, and it just stayed there for about ten minuets. It didn't change, didn't move to load the apple insignia, nothing. So I gave it a forced restart, and it did it again, except it load the apple logo.
    Third time, it got me to blue screen. On restart #4 (force restart #3), it finally loads into my desk top, but the slow processing remained. I tried to go in and repair disk permissions, but then it froze up, and I forced a restart. This time, back to the grey screen.
    I lost count as to how many time I restarted, but I finally went and rooted out my OS disks, and did a restart with disk 1 in, holding down PR+CtrlApple (It was my understanding that this would zap the P-Ram, and would at lest sort of help with whatever my problem was). Well, it took me to grey screen, but now a small folder is in the center of my screen. going from the finder icon to a "?" in the middle of the folder.
    Did a restart holding down the "C" key, and it went into the install screen that launches from the disk. I was able to click through to select the drive I wanted, then my hard drive didn't show up as a possible selection. Yet ANOTHER C key restart, and this time it showed up.
    Went through the first loading screen, where it is checking permissions, and everything's fine, but when I get to the installation process, it tells me there is an error with my perimeters, and I should restart and try again. Did this again, and I had to start over from square one.
    I tried just a normal restart after three or four attempts at an installation, and now, whenever I load it without C depressed, a grey box shows up in the middle of my screen with an image of the globe on it, and it flashes. Nothing else loads until I do a restart.
    It's my impression this, obviously, isn't a good sign and I should get in contact with someone who knows what they're doing and can walk me through it and get my computer running again. I thought I'd run it by you guys here before I called Apple, and, hopefully, you guys can help me out/help me better describe my problem. Any help you can give - links to other threads, experiences, what something means, what to tell a technician that I'm looking at/going through, anything at all, will help me tremendously.
    Thanks for your help and time,
    Brittany
    Powerbook G4   Mac OS X (10.3.9)   Owned Since April, 2004

    Hey Gary, thanks for the welcome!
    By the time I was able to pull your suggestions off of the form, I had already done a few things to my computer, as per recommended by the Apple site. This article is what I was pulling my steps off of.
    I started at step 4 (Selecting the "Connect automatically when starting TCP/IP applications") and went through to step 8, semi-step i.
    1 - I tried to start up in safe mode (Shift+Restart) and I logged several kernal panic screens before I even got to the apple insignia on a grey screen.
    2 - I ran Disk Utility several times, and would come up with an error and a notice that the utility had quit. The first time I ran it, I noticed that it had found a lot of Oprhaned indirect iNodes, and by the second time the utility was ran, they no longer showed up in the right pane of the box. The fifth time it ran, it took roughly two hours to complete, and actually went all the way through.
    3 - Still would not load past the grey screen, so I went through and did fsck check a couple of times, and it told me that my machine appeared to be ok. I got all the way through the step where it tells you to run a fsck, then type in a mv Preferences Preferences_old, then did a reboot and let my computer load.
    When it finally did load (the actual boot up and load took about ten minuets, which is about seven minuets slower than normal), it took forever to do any commands that I issued. I went through and backed up all of my files onto my external, and then I went to go follow the rest of the step, and my computer froze up. I decided to save the rest of the procedure for today, when I can find some time.
    The basic thing that I'm concerned about now is that the machine is running exceptionally slow. It loaded Safari and a couple of other applications I'm always in, but it took roughly ten times longer than normal to do anything.
    Since it's recignising the machine and loading into my desktop, I was going to see if I can now do a safe restart and see if I can follow any of the steps that are dictated by the site, but I'm still not certian if that will work. Last time I tried it, I got a kernal panic screen.
    Anything I should try?
    Powerbook G4   Mac OS X (10.3.9)   Since 2004

  • How to deal with OpenCL grey out issue.

    First off, I'm not native english speaker.
    I have Nvidia GeForce 550 Ti video card, and its support OpenCL v1.1.
    I'm also face a "random" OpenCL grey out issue like other people here, but I found the "issue" and how to deal with.
    open a command windows (using WinKey + R, and type cmd <enter>)
    type "cd C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)" <enter>
    type "sniffer_gpu" <enter>  -->> to check your GPU has OpenCL in Photoshop?
    When GPU is in power-saving mode (core running in 51Mhz, using MSI Afterburner monitor), I running sniffer_gpu, got this report
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>sniffer_gpu
    Device: 0000000000328D68 has video RAM(MB): 1023
    Vendor string:    NVIDIA Corporation
    Renderer string:  GeForce GTX 550 Ti/PCIe/SSE2
    Version string:   3.0.0
    OpenGL version as determined by Extensionator...
    OpenGL Version 3.0
    Has NPOT support: TRUE
    Has Framebuffer Object Extension support: TRUE
    OpenGL ok
    Return code: 1
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>
    No OpenCL support
    Then, I switch GPU back to normal status (core running at 900Mhz)
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>sniffer_gpu
    Device: 00000000001F8D68 has video RAM(MB): 1023
    Vendor string:    NVIDIA Corporation
    Renderer string:  GeForce GTX 550 Ti/PCIe/SSE2
    Version string:   3.0.0
    OpenGL version as determined by Extensionator...
    OpenGL Version 3.0
    Has NPOT support: TRUE
    Has Framebuffer Object Extension support: TRUE
    OpenGL ok
    OpenCL ok, version=1.1 CUDA 4.2.1
    Return code: 3
    C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)>
    OpenCL support !!
    Nowadays, most of new GPUs were support power-saving, but when sniffer_gpu running at GPU power-saving state, the OpenCL computing report maybe "time-out", cause the detector "guess" the GPU does not support OpenCL. This is why many people says "OpenCL" sometimes work, sometimes grey-out.
    I hope this bug can be fixed, or at least people can understand how to "enable OpenCL everytime when you launch photoshop".
    Bye.

    Do check the following link
    http://blogs.oracle.com/soabpm/2010/01/soa_suite_11g_weblogictransact.html

  • OpenCL problems on macbook pro

    Hi everyone,
    I'm really excited about OpenCL but there are some problems which really get on my nerves. One problem is that most of the code my colleague wrote (which works perfectly on his NVIDIA card with linux) doesn't work on my machine. This wouldn't be such a problem if there were nice error messages. But the only thing I get is:
    cvmsErrorCompilerFailure: LLVM compiler has failed to compile a function.
    If I look at the log it tells me:
    Running pass 'AMDIL DAG->DAG Pattern Instruction Selection' on function '@test_kernel'
    abort() called
    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   libSystem.B.dylib             0x00007fff85d1b5d6 __kill + 10
    1   libSystem.B.dylib             0x00007fff85dbbc7f __abort + 103
    2   libSystem.B.dylib             0x00007fff85dbbced abort_report_np + 0
    3   AMDil.dylib                   0x000000010273b660 (anonymous namespace)::AMDILDAGToDAGISel::Select_ISD_SRL_v2i64(llvm::SDValue const& + 0
    4   AMDil.dylib                   0x000000010274bc96 (anonymous namespace)::AMDILDAGToDAGISel::SelectCode(llvm::SDValue) + 742
    5   AMDil.dylib                   0x00000001027526d2 (anonymous namespace)::AMDILDAGToDAGISel::InstructionSelect() + 210
    Is it just one of many "known bugs" and if yes is there any way to get a newer version of the AMD driver on to my macbook? Or do I have to wait untill apple fixes it??
    Thanks,
    Nicholas

    With the Finder active, press the following key combinations, in this order:
    Shift-Command-H
    Command-3
    Command-I
    The Info window for your home folder will open. Click the lock icon to authenticate. In the Sharing & Permissions section, you should have read & write access. If not, make it so. Select "Apply to enclosed items" from the action (gear icon) menu.

  • How do I know if I have Mercury Playback Engine GPU Acceleration (OpenCL)?

    To anyone who can help,
    BACKGROUND
    I am new to Premiere Pro and just started my first project on CC 2014.  A tutorial recommended I select 'Mercury Playback Engine GPU Acceleration (OpenCL)' over 'Mercury Playback Engine Software Only' in the VIDEO AND RENDERING section of the PROJECT SETTINGS window.  Since the former option isn't grayed out, I'm assuming I have both to choose from, however, when I select 'Mercury Playback Engine GPU Acceleration (OpenCL), only the audio will play back in my source window; the video no longer plays back.
    HARDWARE
    I am on an (early 2008) Mac Pro desktop with two 2.8 GHz Quad-Core Intel Xeon processors, and two ATI Radeon HD 5770 graphics cards.
    I am running OS X 10.9.5.
    QUESTIONS
    1.  Is there a way to figure out if I actually have this 'Mercury Playback Engine GPU Acceleration (OpenCL)' thing?
    2.  Is opting for 'Mercury Playback Engine GPU Acceleration (OpenCL)' over 'Mercury Playback Engine Software Only' (the default) really even going to make a noticeable difference in how my 1080p 24 fps movie is rendered?
    Thanks in advance to any advice offered!
    Shaun

    I am not realy a mac person but Premiere can only use one graphics card. Can you disable one of the cards.
    Might want to read this on how MPE works:
    CUDA, Mercury Playback Engine, and Adobe Premiere Pro « Premiere Pro work area

  • Premiere Pro CC Crashes While Rendering With Mercury OpenCL

    Hi guys!
    Every time I try to render a ~2 min video in H.264 using the OpenCL renderer which is fully supported on my 7970 (2x Crossfire) the program crashes while rendering. (Usually around 28%)
    If I switch to Mercury Software renderer, it renders perfectly.
    I am currently using AMD 13.6beta2 drivers, and PPCC is fully updated, any suggestions?
    Additionally, for the half minute that it tries to render with OpenCL before crashing, by checking the GPU utilization % in AMD catalyst overdrive, it seems to not be utilizing the gpu at all... And then promtly crashes of course...
    I hope I can fix this problem soon... Really dissapointed with this adobe product.
    Thanks a lot!

    Rendering without any effects ----------> Still Crashes
    Disabling Crossfire ----------------------- > Still Crashes
    Reinstalling Premiere ---------------------> Still Crashes
    Physically Removing the 2nd GPU -----> Works
    So, is there any way I can get this to work while having both GPUs physically installed in the computer?
    It would be quite a hastle to remove the 2nd one each time I need to use PP!
    One odd thing also is that from watching the gpu utilization while rendering H.264 1080p, the GPU is only being used to about 30%, and very intermittently.... I would imagine things would accelerate quite a lot if it actually utilized the whole GPU!
    Thank you very much guys!

  • Photoshop CC on MacBook pro  OS X 10.9.4 has 8GB Ram 2.4 GHz Intel Core i5 and 512 MB VRam OpenCL still not working

    Hi
    I have a Macbook Pro 13 inch Late 2011 have upgrade my Ram to 8 GB so that the VRAM is now 512 MB, and running OS X 10.9.4 but still no OpenCL
    Help ?

    Hi
    I have a Macbook Pro 13 inch Late 2011 have upgrade my Ram to 8 GB so that the VRAM is now 512 MB, and running OS X 10.9.4 but still no OpenCL
    Help ?

  • I can't open obj files in Ps even if I click on OpenCL in preference.

    I enabled openCL in the preference bar. But when I tried to open obj file, it says Could not complete your request because 3D functionality is currently disabled due to OpenGL being disabled.

    What is your hardware spec?  What video card, and is the driver up to date (from card maker's web site)?
    Check the GPU FAQ
    Photoshop CS6 GPU FAQ

  • External monitoring oddities in Motion 3, anyone?

    Hi all,
    I do a lot of NTSC DV projects, and I'm seeing some weird things happen with Motion 3 external monitoring.
    - First, the image looks squeezed ("skinny"), with black bars on the sides.
    - Second, Motion now applies the "Correct to Aspect Ratio" option to the external monitor (why??), which makes it even more squeezed!!
    - Third, moving the canvas with the hand tool moves the image around on the monitor. What does external monitoring have to do with where the canvas is in the canvas pane?
    I never had any of these problems in Motion 2. Is there some way to make it act like it used to?
    I'm using Firewire NTSC output to DV deck, connected to the monitor.

    I don't use FW for external monitoring, but - no, I haven't experienced any oddities since the upgrade...
    Patrick

  • Trying to install opencl-catalyst

    Hi I am trying to get GPU BTC/LTC mining working on my box. It looks like I need to install opencl-catalyst (I have an ATI card), but that conflicts with xorg-server 1.14. I tried downgrading to 1.11, but it looks like I would have to downgrade a great deal of things. Should I just bite the bullet and start downgrading everything that is necessary, or does anyone know of a nicer way?

    Thanks for the input Arthurlock,
    This is such a bummer. You guys aren't alone in your disappointment. I was extremely excited too. Thank you two for posting. I finally found a relevant post after 5 hrs and change. I couldn't figure out how to resolve this same problem, and I was too stubborn to give in. All I needed was a simple answer, as Arthur stated.
    That said, what are our options? I've been running around in circles trying to figure what my next steps should be? ... Any input is welcome. I really don't want to purchase another computer to be able to use the new adobe software. I guess I didn't realize my computer was turning into such a dinosaur...
    "Sorry Mac Daddy, no more Christmas Flash Catalyst for you... "
    Running on:
    imac 1.6GHz PowerPC G5
    OSX 10.5.8
    Thanks,
    Brandi

  • Why Apple don't systematically support the latest version of OpenGL and OpenCL with a new OS release?

    Why Apple don't systematically support the latest version of OpenGL and OpenCL with a new OS release?

    Maybe because it's necessary to build on a version that's been out long enough to be stable before releasing? Who knows?
    Are there specific features you're missing?

  • OpenCL How to use both GPUs in battery saving mode

    Hello everyone,
    Currently I'm developing a software using OpenCL under OS X 10.6.4.
    The galaxies (n-body) application provided by Apple is able to query and use both the 9400M and 9600M GT of my Macbook Pro. The interesting thing is, it can even do so in battery saving mode i.e. when the 9400M is the display device and the 9600 should be turned off. Looking at the XCode project and source code it just does:
    return_value = clGetDeviceIDs(NULL, CLDEVICE_TYPEGPU, 4, mdeviceid, &count);
    To get a device count of 2.
    My Makefile based project also links with -framework OpenCL. Executing the same line of code yields just the 9400M though.
    Since the NVidia samples show the same behaviour I guess there is a difference in the way the XCode project is set up.
    Thanks in advance for any hints!
    Kai

    Just found out the following:
    It is possible to utilise the 9600 in battery saving mode for calculation purposes.
    All you need to do is to create an OpenGL context and iterate over the virtual screens like so:
    GLint i = 0;
    CGLContextObj ctx = CGLGetCurrentContext();
    while(CGLSetVirtualScreen(ctx, i) == kCGLNoError) {
    i++;
    After doing that, a call to clGetDeviceIDs yields two gpu devices:
    unsigned int count = 0;
    cldeviceid mdeviceid[32];
    clGetDeviceIDs(NULL, CLDEVICE_TYPEGPU, 32, mdeviceid, &count);
    printf("Found %d GPU devices...\n", count);
    Test environment:
    Macbook Pro (first unibody, w. 9400M + 9600M GT).
    OS X 10.6.4
    Explicitly settings the pixel format attribute to allow for offline renderers wasn't necessary in my case.
    Unfortunately this solution sounds rather like a bug than feature, so Apple might 'fix' it in the future.
    What is more, being required to carry around an OpenGL context might is not possible in every case.
    Would be nice if we could just decide which card is used for display purposes in high performance mode, then there would be no reason to fallback to these kind of workarounds...
    Kai

Maybe you are looking for

  • Mac OS X 10.6.8 software updates quites unexpectedly, any idea??

    Mac OS X 10.6.8 software updates quites unexpectedly, any idea?? Process:         Software Update [15049] Path:            /System/Library/CoreServices/Software Update.app/Contents/MacOS/Software Update Identifier:      com.apple.SoftwareUpdate Versi

  • [SOLVED] can't get flash to work

    First i tried copying the flashplayer.so to /usr/lib/mozilla/plugins dir, but it didnt exists yet, so i did a searh and i found. This http://wiki.archlinux.org/index.php/Ins - bit_System  tried installing nspluginwrapper but it didnt work after resta

  • OES Client causes XML Parser Issue with Spring 3 Framework WAR

    Dear All, OES Client has been installed in the linux OS and configured JAVA SM in it. Have executed the sample webpage in the tomcat server which contains the 'PepResponse' of getting the authorization value (TRUE / FALSE) and it works fine. Code sni

  • Buying music from other itunes stores

    I live in the Uk and want to buy some songs that are are only available in the US store but i'm not allowed to. Why? is there any way i can get around it

  • WAD - PDF, is it possible?

    Hi All! I have a Template (created by Web Application Designer). This template contains 20 querys, images (Mime) and CSS styles. To allow a correct printing, the idea would be able to generate from Template a PDF file. Without Broadcasting. The user