Signed-off-by: Naveen Saini <[email protected]>
---
 documentation/dpcpp-compiler.md | 105 ++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 documentation/dpcpp-compiler.md

diff --git a/documentation/dpcpp-compiler.md b/documentation/dpcpp-compiler.md
new file mode 100644
index 00000000..2c699db8
--- /dev/null
+++ b/documentation/dpcpp-compiler.md
@@ -0,0 +1,105 @@
+How to Install Intel(R) oneAPI DPC++/C++ Compiler (ICX) toolchain in Image
+==========================================================================
+
+Document to build and install Intel oneAPI DPC++/C++ compiler toolchain
+
+https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html#
+
+
+Getting Started
+===============
+
+```
+git clone https://git.openembedded.org/openembedded-core
+git clone https://git.openembedded.org/bitbake
+git clone https://git.openembedded.org/meta-openembedded
+git clone https://github.com/kraj/meta-clang.git (checkout kirkstone)
+git clone https://git.yoctoproject.org/meta-intel
+
+$ source openembedded-core/oe-init-build-env
+
+$ bitbake-layers add-layer ../meta-openembedded/meta-oe/
+$ bitbake-layers add-layer ../meta-intel
+$ bitbake-layers add-layer ../meta-clang
+```
+
+DISTRO
+======
+
+Note that ICX compiler currently works with nodistro DISTRO only. So set 
following in local.conf
+
+```
+DISTRO ?= "nodistro"
+```
+
+MACHINE Configuration
+=====================
+
+```
+MACHINE ?= "intel-skylake-64"
+```
+
+Package Install
+===============
+
+```
+# To run sycl program, install required packages too
+IMAGE_INSTALL:append = " intel-compute-runtime intel-graphics-compiler clang"
+
+# To install only runtime libraries
+IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp-runtime 
intel-oneapi-dpcpp-cpp-runtime-dev "
+
+# To install icx toolchain
+IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev "
+```
+in local.conf, this would install above packages in Image.
+
+Building Image
+==============
+
+```
+$ bitbake core-image-minimal
+```
+
+Adding icx in generated SDK toolchain
+=====================================
+
+ICX compiler is not included into the generated SDK using bitbake 
meta-toolchain or bitbake -cpopulate_sdk <image> if icx is expected to be part 
of SDK, add ICXSDK = "1" in local.conf
+
+```
+ICXSDK = "1"
+```
+
+Geneate SDK
+```
+bitbake core-image-minimal -c populate_sdk
+```
+
+
+To setup PATH variables on Target
+=================================
+
+Once Image is booted successfully. Execute following in command line to setup 
path variables for icx toolchain.
+
+```
+$ source /opt/intel/oneapi/compiler/2022.1.0/env/vars.sh
+
+$ mkdir -p /lib64
+
+$ ln -sf /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
+```
+
+Build application and Run
+=========================
+
+To compile sample sycl application:
+
+```
+$ icpx --target=x86_64-oe-linux -fsycl simple-sycl-app.c -o simple-sycl-app
+```
+
+To run:
+
+```
+$ ./simple-sycl-app
+```
-- 
2.37.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7765): 
https://lists.yoctoproject.org/g/meta-intel/message/7765
Mute This Topic: https://lists.yoctoproject.org/mt/95191951/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to