Skip to content

[Doc] Readme update. #1701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@

Intel staging area for llvm.org contribution.
Home for Intel LLVM-based projects:
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on

* oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
oneAPI and DPC++ is available at
[https://www.oneapi.com/](https://www.oneapi.com/)
- [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)


* [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)

## License

See [LICENSE.txt](sycl/LICENSE.TXT) for details.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## Sub-projects Documentation
- oneAPI Data Parallel C++ compiler - See
[GetStartedGuide.md](sycl/doc/GetStartedGuide.md)

* oneAPI Data Parallel C++ compiler - See
[GetStartedGuide.md](sycl/doc/GetStartedGuide.md)

## DPC++ extensions

Expand All @@ -29,4 +31,3 @@ SYCL\* standards. DPC++ extends these standards with a number of extensions,
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.

\*Other names and brands may be claimed as the property of others.

40 changes: 25 additions & 15 deletions opencl-aot/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
# OpenCL ahead-of-time compilation tool (opencl-aot)

OpenCL ahead-of-time compilation tool (opencl-aot) is a tool which generates device-dependent OpenCL program
binary from SPIR-V binary primarily for Intel(R) processor devices.
OpenCL ahead-of-time compilation tool (`opencl-aot`) is a tool which generates
device-dependent OpenCL program binary from SPIR-V binary primarily for Intel(R)
processor devices.

## Prerequisites

To use opencl-aot tool, you must have:
* OpenCL runtime installed for the target device (see [Install low level runtime](../sycl/doc/GetStartedWithSYCLCompiler.md))
To use `opencl-aot` tool, you must have:

* OpenCL runtime installed for the target device (see
[Install low level runtime](../sycl/doc/GetStartedGuide.md#install-low-level-runtime))
* OpenCL ICD Loader installed with support of OpenCL 2.1 or higher

## How to use

opencl-aot tool is integrated with Clang. To use ahead-of-time compilation for SYCL application for
Intel(R) processor device, run Clang with `-fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice` option.
To enable optimizations for target CPU architecture, add `-Xsycl-target-backend "-march=<arch>"` option, where `<arch>`
could be `avx512`, `avx2`, `avx` or `sse4.2`.
`opencl-aot` tool is integrated with Clang. To use ahead-of-time compilation for
SYCL application for Intel(R) processor device, run Clang with
`-fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice` option.

To enable optimizations for target CPU architecture, add
`-Xsycl-target-backend "-march=<arch>"` option, where `<arch>` could be
`avx512`, `avx2`, `avx` or `sse4.2`.

To execute `opencl-aot` directly for Intel(R) processor device, run it with
`<spv> -o=<output> --device=cpu`, where `<spv>` is path to SPIR-V binary file,
`<output>` is path to created OpenCL program binary file.

To execute opencl-aot directly for Intel(R) processor device, run it with `<spv> -o=<output> --device=cpu`, where `<spv>` is
path to SPIR-V binary file, `<output>` is path to created OpenCL program binary file.
To generate SPIR-V binary file from OpenCL device kernel code, use Clang to generate LLVM IR and pass it to
[llvm-spirv](https://github.com/KhronosGroup/SPIRV-LLVM-Translator) tool. For more
information about generation LLVM IR from OpenCL device kernel code, see
[OpenCL Features](https://clang.llvm.org/docs/UsersManual.html#opencl-features) of Clang Compiler User's Manual.
To generate SPIR-V binary file from OpenCL device kernel code, use Clang to
generate LLVM IR and pass it to
[llvm-spirv](https://github.com/KhronosGroup/SPIRV-LLVM-Translator) tool. For
more information about generation LLVM IR from OpenCL device kernel code, see
[OpenCL Features](https://clang.llvm.org/docs/UsersManual.html#opencl-features)
of Clang Compiler User's Manual.

For more information about opencl-aot tool, execute it with `--help` option.
For more information about `opencl-aot` tool, execute it with `--help` option.