Skip to content

Commit 15fae9c

Browse files
committed
[FIXME][cling] Add AdaptiveCpp
Add adaptiveCpp like how clad does, keep this for now for testing
1 parent d344699 commit 15fae9c

File tree

764 files changed

+125399
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

764 files changed

+125399
-0
lines changed

interpreter/cling/AdaptiveCpp/CMakeLists.txt

Lines changed: 781 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
*Thank you for your interest in contributing to AdaptiveCpp! Your PR will be highly appreciated* :-)
2+
3+
When in doubt about how to implement something or how to integrate with the overall project strategy, please just open an issue for discussion.
4+
5+
# Important branches in AdaptiveCpp
6+
7+
Please take note of the branch structure of the project. The following are important branches:
8+
9+
* `stable` - contains latest AdaptiveCpp release.
10+
* `develop` - contains latest development version.
11+
* `sycl/VERSION` - contains AdaptiveCpp code that targets a specific SYCL version.
12+
- `sycl/1.2.1` - contains latest AdaptiveCpp targeting SYCL 1.2.1. This branch is now mainly in maintenance mode and not updated anymore.
13+
- `sycl/2020` - contains latest AdaptiveCpp work targeting SYCL 2020, and any work that is not specific to earlier SYCL versions.
14+
15+
We periodically perform the following merges:
16+
* `develop` -> `sycl/<latest-version>` -> `stable`
17+
18+
19+
Please files PRs against the `develop` branch.
20+
21+
# Release schedule
22+
23+
AdaptiveCpp follows a regular release schedule with 4-month cadence:
24+
25+
* `year.02` (released at the end of February)
26+
* `year.06` (released at the end of June)
27+
* `year.10` (released at the end of October)
28+
29+
In the last week prior to release, no new features should be added and focus should be on bug fixes.
30+
In the last two weeks prior to release, new features should only be added for components of the stack that are still under heavy development (e.g. the SSCP compiler or stdpar support).
31+

interpreter/cling/AdaptiveCpp/LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Copyright The AdaptiveCpp Contributors
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
2. Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
![Project logo](/doc/img/logo/logo-color.png)
2+
3+
# AdaptiveCpp (formerly known as hipSYCL / Open SYCL)
4+
5+
**(Note: This project is currently in progress of changing its name to AdaptiveCpp due to external legal pressure. Documentation and code may still use the older name hipSYCL / Open SYCL)**
6+
7+
AdaptiveCpp is the independent, community-driven modern platform for C++-based heterogeneous programming models targeting CPUs and GPUs from all major vendors. AdaptiveCpp lets applications adapt themselves to all the hardware found in the system. This includes use cases where a single binary needs to be able to target all supported hardware, or utilize hardware from different vendors simultaneously.
8+
9+
It currently supports the following programming models:
10+
1. **SYCL**: At its core is a highly competitive and flexible SYCL implementation that supports many compilation flows.
11+
2. **C++ standard parallelism**: Additionally, AdaptiveCpp features experimental support for offloading C++ algorithms from the parallel STL. See [here](doc/stdpar.md) for details on which algorithms can be offloaded. **AdaptiveCpp is currently the only solution capable of demonstrating C++ standard parallelism performance across NVIDIA, AMD and Intel GPUs, and in most cases outperforms vendor compilers.**
12+
13+
AdaptiveCpp supports CPUs (including x86, arm and other LLVM-supported architectures) as well as GPUs from Intel, NVIDIA, and AMD. This includes the ability to generate a single binary that can offload to all supported devices.
14+
15+
AdaptiveCpp's compilation flows include
16+
1. A powerful, generic LLVM JIT compiler. This is AdaptiveCpp's default, most portable and usually most performant compilation flow. It is also the **world's only SYCL compiler that only needs to parse the source code a single time** across both host and device compilation.
17+
2. Compilation flows focused on providing interoperability at source code level with vendor programming models (including e.g. the ability to mix-and-match CUDA and SYCL in the same source file)
18+
3. Library-only compilation flows focused on deployment simplicity. These compilation flows allow utilizing third-party compilers, with AdaptiveCpp merely acting as a library.
19+
20+
A full list of its compilation capabilities can be found [here](doc/compilation.md).
21+
22+
Because a program compiled with AdaptiveCpp appears just like any other program written in vendor-supported programming models (like CUDA or HIP) to vendor-provided software, vendor tools such as profilers or debuggers also work with AdaptiveCpp.
23+
24+
An illustration on how the project fits into the SYCL ecosystem can be found ([here](doc/sycl-ecosystem.md)).
25+
26+
27+
## Performance & benchmarking
28+
29+
See the [AdaptiveCpp performance guide](doc/performance.md).
30+
31+
## Installing and using AdaptiveCpp
32+
* [Building & Installing](doc/installing.md)
33+
34+
In order to compile software with AdaptiveCpp, use `acpp`. `acpp` can be used like a regular compiler, i.e. you can use `acpp -o test test.cpp` to compile your application called `test.cpp` with AdaptiveCpp.
35+
36+
`acpp` accepts both command line arguments and environment variables to configure its behavior (e.g., to select the target to compile for). See `acpp --help` for a comprehensive list of options.
37+
38+
For details and instructions on using AdaptiveCpp in CMake projects, please see the documentation on [using AdaptiveCpp](doc/using-hipsycl.md).
39+
40+
41+
## About the project
42+
43+
Development of AdaptiveCpp is currently primarily led by Heidelberg University, with contributions from a growing community. We see AdaptiveCpp as a community-driven project, in contrast to the many vendor-driven heterogeneous compiler efforts.
44+
AdaptiveCpp not only serves as a research platform, but is also a solution used in production on machines of all scales, including some of the most powerful supercomputers.
45+
46+
### Getting in touch
47+
48+
Join us on [Discord](https://discord.gg/s2p7Vccwh3)!
49+
Alternatively, open a discussion or issue in this repository.
50+
51+
### Contributing to AdaptiveCpp
52+
53+
We encourage contributions and are looking forward to your pull request! Please have a look at [CONTRIBUTING.md](CONTRIBUTING.md). If you need any guidance, please just open an issue and we will get back to you shortly.
54+
55+
If your institution or organization is considering to support the AdaptiveCpp development in some official capacity, we are always happy to discuss collaborations and to broaden the developer community. Please do reach out :-)
56+
57+
If you are a student at Heidelberg University and wish to work on AdaptiveCpp, please get in touch with us. There are various options possible and we are happy to include you in the project :-)
58+
59+
### Citing AdaptiveCpp
60+
61+
AdaptiveCpp is a production platform for heterogeneous computing, but also a research project. As such, if you use AdaptiveCpp in your research, we kindly request that you cite one of the following publications, depending on your focus:
62+
63+
* A general overview, SYCL 2020, performance and the relationship with oneAPI: *Aksel Alpay, Bálint Soproni, Holger Wünsche, and Vincent Heuveline. 2022. Exploring the possibility of a hipSYCL-based implementation of oneAPI. In International Workshop on OpenCL (IWOCL'22). Association for Computing Machinery, New York, NY, USA, Article 10, 1–12. https://doi.org/10.1145/3529538.3530005*
64+
* C++ standard parallelism offloading support (stdpar): *Aksel Alpay and Vincent Heuveline. 2024. AdaptiveCpp Stdpar: C++ Standard Parallelism Integrated Into a SYCL Compiler. In Proceedings of the 12th International Workshop on OpenCL and SYCL (IWOCL '24). Association for Computing Machinery, New York, NY, USA, Article 5, 1–12. https://doi.org/10.1145/3648115.3648117*
65+
* The generic single-pass compiler: *Aksel Alpay and Vincent Heuveline. 2023. One Pass to Bind Them: The First Single-Pass SYCL Compiler with Unified Code Representation Across Backends. In Proceedings of the 2023 International Workshop on OpenCL (IWOCL '23). Association for Computing Machinery, New York, NY, USA, Article 7, 1–12. https://doi.org/10.1145/3585341.3585351*
66+
* Our CPU compiler: *Joachim Meyer, Aksel Alpay, Sebastian Hack, Holger Fröning, and Vincent Heuveline. 2023. Implementation Techniques for SPMD Kernels on CPUs. In Proceedings of the 2023 International Workshop on OpenCL (IWOCL '23). Association for Computing Machinery, New York, NY, USA, Article 1, 1–12. https://doi.org/10.1145/3585341.3585342*
67+
* The original talk and the idea of implementing SYCL on non-OpenCL backends: *Aksel Alpay and Vincent Heuveline. 2020. SYCL beyond OpenCL: The architecture, current state and future direction of hipSYCL. In Proceedings of the International Workshop on OpenCL (IWOCL ’20). Association for Computing Machinery, New York, NY, USA, Article 8, 1. DOI:https://doi.org/10.1145/3388333.3388658*
68+
69+
(The latter is a talk and available [online](https://www.youtube.com/watch?v=kYrY80J4ZAs). Note that some of the content in this talk is outdated by now)
70+
71+
### Acknowledgements
72+
73+
We gratefully acknowledge [contributions](https://github.com/illuhad/hipSYCL/graphs/contributors) from the community.
74+
75+
76+
## Documentation
77+
* AdaptiveCpp [design and architecture](doc/architecture.md)
78+
* AdaptiveCpp runtime [specification](doc/runtime-spec.md)
79+
* AdaptiveCpp [compilation model](doc/compilation.md)
80+
* How to use raw HIP/CUDA inside AdaptiveCpp code to create [optimized code paths](doc/hip-source-interop.md)
81+
* A simple SYCL example code for testing purposes can be found [here](doc/examples.md).
82+
* [SYCL Extensions implemented in AdaptiveCpp](doc/extensions.md)
83+
* [Macros used by AdaptiveCpp](doc/macros.md)
84+
* [Environment variables supported by AdaptiveCpp](doc/env_variables.md)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-dinky

0 commit comments

Comments
 (0)