You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I leverage the new CLOC toolchain, I am struggled to make a kernel that has a struct in the argument work.
Consider the following simple kernel code
typedef struct SimpleStruct
{
int a;
int b;
} SimpleStruct;
__kernel void struct_copy(SimpleStruct a, global SimpleStruct *b)
{
int i = get_global_id(0);
b[i] = a;
}
The host side may have the following kernel argument structure
In the older hlc 3.2, after doing some survey on the semantic of the hsail code, I put the pass-by-value struct in the global memory and successfully copy the content to b on the GPU. It works.
However, in the new toolchain, it seems that the way that work in the older toolchain now doesn't work. Maybe the assumption that I made in the older toolchain is changed. The content of b isn't correct. How do I set the content of a now? How do I make such cases work in the CLOC toolchain?
Any advice or hint would be appreciated. Thanks.
The text was updated successfully, but these errors were encountered:
Hi developer,
When I leverage the new CLOC toolchain, I am struggled to make a kernel that has a struct in the argument work.
Consider the following simple kernel code
The host side may have the following kernel argument structure
In the older hlc 3.2, after doing some survey on the semantic of the hsail code, I put the pass-by-value struct in the global memory and successfully copy the content to b on the GPU. It works.
However, in the new toolchain, it seems that the way that work in the older toolchain now doesn't work. Maybe the assumption that I made in the older toolchain is changed. The content of b isn't correct. How do I set the content of a now? How do I make such cases work in the CLOC toolchain?
Any advice or hint would be appreciated. Thanks.
The text was updated successfully, but these errors were encountered: