cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

AndreasStahl
Journeyman III

Two .cl files that consistently cause a Stack Overflow when compiled for HD 5770

Problems with const float3 parameter.

The first file is attached to this message. It crashes both in my code and in the Stream Kernel Analyzer. I can't find any fault in it (besides it being ugly due to opencl not supporting types that well).

I hope this helps you (AMD devs) to find what's wrong.

Platform is Windows 7 x64, HD 5770 with latest drivers (via Steam), Stream/OpenCL SDK 2.2

If you need additional info, let me know. I'd like to hear from other people too, could you please confirm if this code causes the stream kernel analyzer to panic?

 

Second file in the message below

 

EDIT: Superflous code removed. See reduction two posts below.

0 Likes
6 Replies
AndreasStahl
Journeyman III

Second file. Does the same thing, both in code and in the kernel analyzer.

EDIT: Superflous code removed. See reduction in the post below.

0 Likes

Okay, I could reduce it somewhat, it seems the compiler crashes on the constant float3 parameter.

 

 

// compiles __kernel void select_dot_float3( const __global float3 * first, const float4 second, // a waste of precious parameter memory! 😉 __global float * result, const uint count ) { uint tid = get_global_id(0); if(tid >= count) return; result[tid] = dot(first[tid], second.xyz); } // crashes __kernel void select_dot_float3( const __global float3 * first, const float3 second, // look here for error! __global float * result, const uint count ) { uint tid = get_global_id(0); if(tid >= count) return; result[tid] = dot(first[tid], second); }

0 Likes

This seems to be a bug alright, but I think that current OpenCL implementations of float3 in local memory and buffers actually occupies the space of a float4, thus not saving any memory at all...

0 Likes

Originally posted by: douglas125 This seems to be a bug alright, but I think that current OpenCL implementations of float3 in local memory and buffers actually occupies the space of a float4, thus not saving any memory at all...

 

yes, I read that in the spec. Hence the winking smiley! 🙂 I wonder if this will be changed down the road.

@Micah thanks! I really like the quickness of support in this forum. Can you give an ETA on the release?

0 Likes

AndreasStahl,
This compiles fine with our upcoming release.
0 Likes

The ETA is soon. Before Christmas most likely.
0 Likes