wenju-he wrote:

> Is an issue here perhaps that downstream users may have implemented (e.g.) 
> `get_global_offset` in their toolchains, but after this change they'll 
> suddenly see a definition of this function that they're not expecting?
> 
> I suppose they would have to implement CLC functions, like 
> `__clc_get_global_offset` to work with this approach. Or they could have 
> their libclc target not call into `__clc_get_global_offset`, or just not 
> provide a definition of `get_global_offset` as before. Either way this has 
> the potential to be a breaking change.
> 
> I'm not sure about leaving dangling CLC declarations in OpenCL libraries. It 
> feels like an implementation detail we're exposing to users.

thanks @frasercrmck. As to get_work_dim and above mentioned get_global_offset, 
I see there are amdgpu implementations 
https://github.com/llvm/llvm-project/blob/main/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl
 and 
https://github.com/llvm/llvm-project/blob/main/libclc/opencl/lib/r600/workitem/get_global_offset.cl.
 Moving them into clc should resolve the concern, but I don't know where is 
destination directory in clc. I don't know how to map `opencl/lib/amdgcn` and 
`opencl/lib/r600` to `clc/lib/amdgcn` and `clc/lib/amdgpu`. Do you have 
suggestions about the mapping?

As to clc_get_enqueued_num_sub_groups and clc_get_enqueued_local_size that 
there is definition in this repo, I'll delete them from this PR. The motivation 
of adding them in the first commit is to avoid adding them in the downstream 
only since they are shared code.

https://github.com/llvm/llvm-project/pull/144333
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to