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
[FPGA][SYCL] Allow memory attributes applied on struct members of device_globals (#14414)
This commit addresses an issue where FPGA memory attributes applied to
struct member variables were not being propagated as global annotations
(@llvm.global.annotation) when a device_global is templated on that
struct.
As a result, these attributes were silently dropped, with no warning or
error provided to the user.
The fix ensures that when structs with memory attributes are used to
instantiate a device_global, the corresponding global annotations are
correctly added to the LLVM IR. This allows the FPGA backend to properly
recognize and utilize these attributes, aligning the behavior with that
of internal, kernel-scoped memory, where ptr.annotations are correctly
added.
Key changes include:
- Enhancing the addGlobalIntelFPGAAnnotation function to recursively
process struct fields and base classes, ensuring all relevant attributes
are captured and annotated in the global scope.
- Ensuring that annotations are not only applied to simple global
variables
but also to fields within structs that are used in device_global
templates.
This fix improves the robustness of the code generation process and
ensures that fpga memory attributes on structs are effectively
communicated to the backend.
Patch by: Mariya Podchishchaeva(mariya.podchishchaeva@intel.com) and
Soumi Manna (soumi.manna@intel.com)
---------
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
0 commit comments