[llvm] [SYCL][LLVM] Adding property set I/O library for SYCL (PR #110771)
Arvind Sudarsanam via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 10:53:25 PDT 2024
asudarsa wrote:
Hi @llvm-beanz
Thanks so much for guiding this code review process. I have tried to answer your questions here.
> 1. Is this text format part of the SYCL specification, or is it an implementation detail?
This text format is not part of the SYCL specification. It is used to represent SYCL properties which is part of the SYCL specification, but the format itself is more of an implementation detail.
> 2. If it is an implementation detail, can it be changed to a standard defined textual format (YAML, JSON, XML)? I ask this specifically because custom serialization formats are often great targets for security vulnerabilities, so using a standardized and defined format is preferable to making your own. Obviously if this is a required part of the SYCL specification that has different considerations.
One of my colleagues had tried to switch to YAML some time ago, but that effort got stuck pretty quickly. The main problem that we encountered with switching to YAML was lack of flexibility: we don't know how many SYCL properties there will be and SYCL properties within a single set (which could have been represented as an array) may have different types (which makes it hard to represent them as an array).
> 3. How is this used during the compiler? Specifically, where are they generated, and where are they consumed?
Here is a concise sequence of steps done during SYCL device code linking.
```
clang: .cpp -> .bc
llvm-link: .bc (multiple) -> .bc (single)
sycl-post-link: .bc (single) -> .bc + .prop (**Generation of data in PropertySetIO format**)
device-compiler/spirv-llvm-translator here to transform device code: .bc -> .image
clang-offload-wrapper: .image + .prop -> .bc (later linked with host code) (**Consumption of data in PropertySetIO format**)
```
Hope this gives a better picture of why we need SYCLPropertySetIO and how it is used.
Thanks
Sincerely
https://github.com/llvm/llvm-project/pull/110771
More information about the llvm-commits
mailing list