Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FPGA][SYCL] Allow memory attributes applied on struct members of dev…
…ice_globals (intel#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>
- Loading branch information