[PATCH] D99488: [SYCL][Doc] Add address space handling section to SYCL documentation

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 29 09:02:01 PDT 2021


aaron.ballman added a comment.

Mostly grammar related review comments, nothing substantive.



================
Comment at: clang/docs/SYCLSupport.md:816
 
+### Address spaces handling
+
----------------



================
Comment at: clang/docs/SYCLSupport.md:818
+
+SYCL specification uses C++ classes to represent pointers to disjoint memory
+regions on an accelerator to enable compilation with standard C++ toolchain and
----------------



================
Comment at: clang/docs/SYCLSupport.md:819
+SYCL specification uses C++ classes to represent pointers to disjoint memory
+regions on an accelerator to enable compilation with standard C++ toolchain and
+SYCL compiler toolchain. Section 3.8.2 of SYCL 2020 specification defines
----------------



================
Comment at: clang/docs/SYCLSupport.md:825
+
+The main address space semantic difference of SYCL mode from OpenCL is that
+SYCL doesn't perform address space qualifier inference detailed in
----------------



================
Comment at: clang/docs/SYCLSupport.md:826
+The main address space semantic difference of SYCL mode from OpenCL is that
+SYCL doesn't perform address space qualifier inference detailed in
+[OpenCL C v3.0 s6.7.8](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#addr-spaces-inference).
----------------



================
Comment at: clang/docs/SYCLSupport.md:827
+SYCL doesn't perform address space qualifier inference detailed in
+[OpenCL C v3.0 s6.7.8](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#addr-spaces-inference).
+
----------------



================
Comment at: clang/docs/SYCLSupport.md:831
+OpenMP/CUDA/HIP, SYCL uses clang's "default" address space for types with no
+address space attributes. This design has two important features: keeps the type system consistent with C++ on one hand and enable tools for emitting device code aligned with SPIR memory model (and other GPU targets).
+
----------------
You should also re-wrap for 80 col (whenever we finish talking about what words to add).


================
Comment at: clang/docs/SYCLSupport.md:839
+
+SYCL device compiler turns into
+
----------------



================
Comment at: clang/docs/SYCLSupport.md:845
+
+OpenCL compiler turn into
+
----------------



================
Comment at: clang/docs/SYCLSupport.md:851
+
+Changing variable type has massive and destructive effect in C++. For instance
+this does not compile in C++ for OpenCL mode:
----------------



================
Comment at: clang/docs/SYCLSupport.md:899-900
+
+Depending on the compiler mode `multi_ptr` will either decorate internal data
+with address space attribute or not.
+
----------------



================
Comment at: clang/docs/SYCLSupport.md:902
+
+To utilize existing clang's functionality, we re-use following OpenCL address
+space attributes for decoration pointers implementation:
----------------



================
Comment at: clang/docs/SYCLSupport.md:903
+To utilize existing clang's functionality, we re-use following OpenCL address
+space attributes for decoration pointers implementation:
+
----------------



================
Comment at: clang/docs/SYCLSupport.md:914
+
+Default address space represents "Generic-memory", which is a virtual address
+space which overlaps the global, local and private address spaces. SYCL mode
----------------



================
Comment at: clang/docs/SYCLSupport.md:915
+Default address space represents "Generic-memory", which is a virtual address
+space which overlaps the global, local and private address spaces. SYCL mode
+enables conversion to/from default address space from/to address space
----------------



================
Comment at: clang/docs/SYCLSupport.md:916
+space which overlaps the global, local and private address spaces. SYCL mode
+enables conversion to/from default address space from/to address space
+attributed type.
----------------



================
Comment at: clang/docs/SYCLSupport.md:919
+
+SPIR target allocates SYCL namespace scope variables in global address space.
+
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99488/new/

https://reviews.llvm.org/D99488



More information about the cfe-commits mailing list