Hi,
I have this error by changing static value in the kernel by arg value :
Log = ptxas application ptx input, line 57; error : Argument 1 of instuction ‘selp’: must be register
ptxas application ptx input, line 57; error : Argument 2 of instuction ‘selp’: must be register
ptxas fatal : Ptx assembly aborted due to errors
error : Ptx compilation failed: gpu=‘sm_13’, device code=‘anonymous_jit_identity’
: Retrieving binary for ‘anonymous_jit_identity’, for gpu=‘sm_13’, usage mode=‘’
: Considering profile ‘compute_10’ for gpu=‘sm_13’ in ‘anonymous_jit_identity’
: Control flags for ‘anonymous_jit_identity’ disable search path
: Ptx binary found for ‘anonymous_jit_identity’, architecture=‘compute_10’
: Ptx compilation for ‘anonymous_jit_identity’, for gpu=‘sm_13’, ocg options=‘’
My kernel :
#define TYPE short
__kernel void threshold(__global const TYPE *inputBuffer, __global TYPE *outputBuffer, const TYPE insideValue, const TYPE outsideValue, const TYPE thresholdHighValue, const TYPE thresholdLowValue)
{
int location = get_global_id(0);
TYPE pixel ;
if(inputBuffer[location] < thresholdHighValue && inputBuffer[location] > thresholdLowValue)
{
pixel = insideValue; // works if pixel =1000
}
else
{
pixel = outsideValue;
}
outputBuffer[location] = pixel;
}
The following codes work if pixel value is static:
if(inputBuffer[location] < thresholdHighValue && inputBuffer[location] > thresholdLowValue)
{
pixel = 1000;
}
else
{
pixel = 0;
}
if(inputBuffer[location] < thresholdHighValue && inputBuffer[location] > thresholdLowValue)
{
pixel = insideValue;
}
else
{
pixel = 0;
}
if(inputBuffer[location] < thresholdHighValue && inputBuffer[location] > thresholdLowValue)
{
pixel = 1000;
}
else
{
pixel = outsideValue;
}
, but not with both, insideValue, outsideValue together.
Every part of code for “insideValue, outsideValue, thresholdHighValue, thresholdLowValue” are the same and all value are readed well before sending to GPU.
Did you have any idea on this issue.
Thanks.