Closed
Description
The issue is described here: #1864 (comment)
#1864 adds two new aliases for multi_ptr class: device_ptr
and host_ptr
that are appropriately mapped on opencl_global_device
and opencl_global_host
address spaces added in #1704 .
So now it's possible for users to define two functions like this:
void foo(global_ptr<int>::pointer_t p) { [...] } void foo(device_ptr<int>::pointer_t p) { [...] }
For SPIR target it's okay, since the function can be overloaded due to different mangling for both of these versions. But for non-SPIR targets (for example for nvptx) the mangling will be the same, because there opencl_global_device
and opencl_global_host
are mapped on addressspace(1)
in LLVM IR.
There are two possible solutions for this problem:
- Change mangling rules;
- Driver one - we can defined a macro
_ENABLE_USM_ADDR_SPACES_
only for FPGA H/W and use this macro in the headers, defining__OPENCL_GLOBAL_DEVICE_AS__
as__OPENCL_GLOBAL_AS__
Metadata
Metadata
Assignees
Labels
No labels