Results 1 to 3 of 3

Thread: Predicate variable must be in register state space

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    1

    Predicate variable must be in register state space

    My call to clBuildProgram is failing and giving me the following error message in the build log:

    Using Device (NVIDIA Corporation : GeForce GTX 260)
    Failed to build program executable

    BUILD LOG:
    ptxas application ptx input, line 133; error : Predicate variable 'sampleKernel_param_6' must be in register state space
    : Retrieving binary for 'anonymous_jit_identity', for gpu='sm_13', usage mode=''

    My source file contains two kernels and two helper functions. I can provide some of the code if needed but I don't really even know what this error relates to. I tried for a while to search for this error online but couldn't find any information. The line number it is reporting the error at is a call to one of the helper functions but I'm not sure if it actually has anything to do with the error...

    Code :
    sample = complexAdd(sample, scattererContribution);

    Code :
    double2 complexAdd(double2 a, double2 b)
    {
    	double2 rv;
    	rv.x = a.x + b.x;
    	rv.y = a.y + b.y;
    	return rv;
    }

    I can provide more of my code if necessary but since I didn't know where to begin with this error I didn't know how to narrow down the portion of the code that was incorrect.

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Predicate variable must be in register state space

    It sounds like you are trying to pass in variables from different address spaces to a function that doesn't support that, but from your code I'm not sure what's going on. Take a look and see if any of the data is coming from constant or local memory, and if so, make sure the functions that use it support the right address spaces. Otherwise I'm not sure what's up.

  3. #3

    Re: Predicate variable must be in register state space

    BUILD LOG:
    ptxas application ptx input, line 133; error : Predicate variable 'sampleKernel_param_6' must be in register state space
    : Retrieving binary for 'anonymous_jit_identity', for gpu='sm_13', usage mode=''
    ptxas sounds like a program which is an assembler for PTX code, which is nvidia's low level representation code for their GPUs. On Mac OS there's a compiler which compiles from OpenCL to PTX, and then something else which goes from PTX to GPU specific code. It wouldn't surprise me if it was similar on other platforms too.

    This means that that line number doesn't refer to your code, but to a line in the PTX code which you don't have access too. It's basically useless information for you.

    What might be useful is the name 'sampleKernel_param_6'. I assume your kernel is called sampleKernel, and it looks like parameter number 6 is being used in a conditional statement, but it's stored in global or local space. Try copying parameter 6 into a private variable before using it.

    If that fails, I'm afraid you're down to commenting parts of your shader out until you find what's causing the problem.

    This sounds like a compiler bug to me, as the system shouldn't be generating PTX code that can't be built.

Similar Threads

  1. Reduce the number of register
    By howaidi in forum OpenCL
    Replies: 1
    Last Post: 03-20-2012, 04:17 PM
  2. Not able to register mad compenent ?
    By bshankarenc in forum OpenMAX IL
    Replies: 1
    Last Post: 03-25-2009, 06:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •