Skip to content

Commit 21b3dfc

Browse files
authored
Intel(R) SHMEM (ISHMEM) 1.5.0 (#11)
Signed-off-by: sys_shmem <sys_shmem@intel.com>
1 parent ba647f0 commit 21b3dfc

101 files changed

Lines changed: 2336 additions & 1148 deletions

File tree

Some content is hidden

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

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set(PROJECT_NAME "ishmem")
1212
set(PROJECT_FULL_NAME "Intel® SHMEM")
1313

1414
set(ISHMEM_MAJOR_VERSION "1")
15-
set(ISHMEM_MINOR_VERSION "4")
15+
set(ISHMEM_MINOR_VERSION "5")
1616
set(ISHMEM_PATCH_VERSION "0")
1717
set(PROJECT_VERSION "${ISHMEM_MAJOR_VERSION}.${ISHMEM_MINOR_VERSION}.${ISHMEM_PATCH_VERSION}")
1818

@@ -40,7 +40,9 @@ option(ENABLE_AOT_COMPILATION "Enables AOT compilation for GPU kernels" TRUE)
4040

4141
# Set default device type(s) for AOT compilation
4242
if (NOT ISHMEM_AOT_DEVICE_TYPES)
43-
set(ISHMEM_AOT_DEVICE_TYPES "pvc")
43+
# xe-hpc: Intel(R) Data Center GPU Max Series
44+
# xe2: Intel(R) Arc(TM) B-Series GPU Family
45+
set(ISHMEM_AOT_DEVICE_TYPES "xe-hpc,xe2")
4446
endif()
4547

4648
# -------------------------------------------------------------------
@@ -87,6 +89,7 @@ if (ENABLE_AOT_COMPILATION)
8789
endif()
8890
message(STATUS "Enable OpenSHMEM support: ${ENABLE_OPENSHMEM}")
8991
message(STATUS "Enable MPI support: ${ENABLE_MPI}")
92+
message(STATUS "Default Runtime: ${ISHMEM_DEFAULT_RUNTIME_STR}")
9093
message(STATUS "===================================\n")
9194

9295
# -------------------------------------------------------------------
@@ -116,7 +119,7 @@ set(ISHMEM_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/src")
116119

117120
# -------------------------------------------------------------------
118121
# Generate and install files
119-
configure_file(${PROJECT_SOURCE_DIR}/src/ishmem_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/ishmem/config.h)
122+
configure_file(${PROJECT_SOURCE_DIR}/src/ishmem_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/ishmem/config.h @ONLY)
120123
configure_file(${PROJECT_SOURCE_DIR}/cmake/ishmem ${CMAKE_CURRENT_BINARY_DIR}/ishmem @ONLY)
121124
configure_file(${PROJECT_SOURCE_DIR}/cmake/vars.sh.in ${CMAKE_CURRENT_BINARY_DIR}/vars.sh @ONLY)
122125
configure_file(${PROJECT_SOURCE_DIR}/pkgconfig/ishmem.pc.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/ishmem.pc @ONLY)

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ Contributed code must be:
3434

3535
### Coding style
3636

37-
The code style and consistency is maintained using `clang-format`. When submitting a contribution, please make sure that it adheres to the existing coding style by using the following command:
37+
The code style and consistency is maintained using `clang-format`. When submitting a contribution, please ensure it adheres to the existing coding style by using the following command from the top-level directory of the repository:
3838

3939
```
4040
clang-format -style=file -i <FILE>
4141
```
4242

43-
This will format the code using the `.clang-format` file found in the top-level directory of this repository.
44-
4543
### Unit tests
4644

4745
Be sure to extend the existing tests when fixing an issue.
@@ -90,7 +88,9 @@ By making a contribution to this project, I certify that:
9088

9189
Then add a line to every git commit message:
9290

93-
Signed-off-by: Kris Smith <kris.smith@email.com>
91+
```
92+
Signed-off-by: Kris Smith <kris.smith@email.com>
93+
```
9494

9595
**Note**: Use your real name.
9696

LICENSE

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2024 Intel Corporation.
1+
Copyright (c) 2025 Intel Corporation.
22

33
Redistribution and use in source and binary forms, with or without
44
modification, are permitted provided that the following conditions are
@@ -7,24 +7,24 @@ met:
77
1. Redistributions of source code must retain the above copyright
88
notice, this list of conditions and the following disclaimer.
99

10-
2. Redistributions in binary form must reproduce the above copyright
11-
notice, this list of conditions and the following disclaimer in the
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
1212
documentation and/or other materials provided with the distribution.
1313

14-
3. Neither the name of the copyright holder nor the names of its
15-
contributors may be used to endorse or promote products derived from
14+
3. Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived from
1616
this software without specific prior written permission.
1717

18-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19-
“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929

3030
SPDX-License-Identifier: BSD-3-Clause

README.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Intel® SHMEM provides an efficient implementation of GPU-initiated communicatio
1717
## Prerequisites
1818

1919
- Linux OS
20-
- Intel® oneAPI DPC++/C++ Compiler 2024.0 or higher.
20+
- Intel® oneAPI DPC++/C++ Compiler 2025.0 or higher.
2121

2222
### SYCL support <!-- omit in toc -->
2323
Intel® oneAPI DPC++/C++ Compiler with Level Zero support.
@@ -34,7 +34,7 @@ To install, download the oneAPI Level Zero from the repository.
3434
git clone https://github.com/oneapi-src/level-zero.git
3535
```
3636

37-
Build Level Zero following instructions below.
37+
Build Level Zero following instructions below.
3838

3939
```
4040
cd level-zero
@@ -44,16 +44,16 @@ cmake -DCMAKE_INSTALL_PREFIX=<level_zero_dir> ..
4444
make -j
4545
make install
4646
```
47-
### The Host Back-End Library
48-
Intel® SHMEM requires a host OpenSHMEM or MPI back-end to be used for host-sided operations support. In particular, the OpenSHMEM back-end relies on a collection of extension APIs (`shmemx_heap_create`, `shmemx_heap_preinit`, and `shmemx_heap_postinit`) to coordinate the Intel® SHMEM and OpenSHMEM heaps. We recommend [Sandia OpenSHMEM v1.5.3rc1](https://github.com/Sandia-OpenSHMEM/SOS/releases/tag/v1.5.3rc1) or newer for this purpose. A [work-in-progress branch](https://github.com/davidozog/oshmpi/tree/wip/ishmem) of [OSHMPI](https://github.com/pmodels/oshmpi.git) is also supported but is currently considered experimental. See the [Building OSHMPI](#building-oshmpi-optional-and-experimental) section before for more details.
47+
### The Host Backend Library
48+
Intel® SHMEM requires a host OpenSHMEM or MPI backend to be used for scale-out communication. In particular, the OpenSHMEM backend relies on a collection of extension APIs (`shmemx_heap_create`, `shmemx_heap_preinit`, and `shmemx_heap_postinit`) to coordinate the Intel® SHMEM and OpenSHMEM heaps. We recommend [Sandia OpenSHMEM v1.5.3](https://github.com/Sandia-OpenSHMEM/SOS/releases/tag/v1.5.3) or newer for this purpose. A [work-in-progress branch](https://github.com/davidozog/oshmpi/tree/wip/ishmem) of [OSHMPI](https://github.com/pmodels/oshmpi.git) is also supported but is currently considered experimental. See the [Building OSHMPI](#building-oshmpi-optional-and-experimental) section before for more details.
4949

50-
We recommend the Intel® MPI Library as the MPI back-end option for the current version of Intel® SHMEM. See the [Building Intel® SHMEM](#building-intel-shmem) section below for more details.
50+
We recommend the Intel® MPI Library as the MPI backend option for the current version of Intel® SHMEM. See the [Building Intel® SHMEM](#building-intel-shmem) section below for more details.
5151

5252
### Building Sandia OpenSHMEM (SOS)
53-
Download the SOS repo to be configured as a back-end for Intel® SHMEM.
53+
Download the SOS repo to be configured as a backend for Intel® SHMEM.
5454

5555
```
56-
git clone --recurse-submodules https://github.com/Sandia-OpenSHMEM/SOS.git SOS
56+
git clone -b v1.5.3 --recurse-submodules https://github.com/Sandia-OpenSHMEM/SOS.git SOS
5757
```
5858

5959
Build SOS following instructions below. `FI_HMEM` support in the provider is required for use with Intel® SHMEM. To enable `FI_HMEM` with a supported provider, we recommend a specific set of config flags. Below are two examples for configuring and building SOS with two providers supporting `FI_HMEM`. To configure SOS with the `verbs;ofi_rxm` provider, use the following instructions:
@@ -93,8 +93,7 @@ To download the OSHMPI repository:
9393
```
9494
git clone -b wip/ishmem --recurse-submodules https://github.com/davidozog/oshmpi.git oshmpi
9595
```
96-
After ensuring Intel® MPI Library is enabled (for example, by sourcing the `/opt/intel/oneapi/setvars.sh` script),
97-
please build OSHMPI following the instructions below.
96+
After ensuring the Intel® MPI Library is present in the environment, please build OSHMPI following the instructions below.
9897

9998
```
10099
cd oshmpi
@@ -107,57 +106,48 @@ make install
107106
### Building Intel® SHMEM
108107
Check that the SOS build process has successfully created a `<shmem_dir>` directory with `include` and `lib` as subdirectories. Please find `shmem.h` and `shmemx.h` in `include`.
109108

110-
Build Intel® SHMEM with an OpenSHMEM back-end using the following instructions:
109+
Build Intel® SHMEM with an OpenSHMEM backend using the following instructions:
111110

112111
```
113112
cd ishmem
114113
mkdir build
115114
cd build
116-
CC=icx CXX=icpx cmake .. -DENABLE_OPENSHMEM=ON -DSHMEM_DIR=<shmem_dir> -DCMAKE_INSTALL_PREFIX=<ishmem_install_dir>
115+
cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DENABLE_OPENSHMEM=ON -DSHMEM_DIR=<shmem_dir> -DCMAKE_INSTALL_PREFIX=<ishmem_install_dir>
117116
make -j
118117
```
119-
Alternatively, Intel® SHMEM can be built by enabling an Intel® MPI Library back-end.
118+
Alternatively, Intel® SHMEM can be built by enabling an Intel® MPI Library backend.
120119
Here is information on how to [Get Started with Intel® MPI Library on Linux](https://www.intel.com/content/www/us/en/docs/mpi-library/get-started-guide-linux/2021-11/overview.html).
121120

122121
```
123-
CC=icx CXX=icpx cmake .. -DENABLE_OPENSHMEM=OFF -DENABLE_MPI=ON -DMPI_DIR=<impi_dir> -DCMAKE_INSTALL_PREFIX=<ishmem_install_dir>
122+
cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DENABLE_MPI=ON -DMPI_DIR=<impi_dir> -DCMAKE_INSTALL_PREFIX=<ishmem_install_dir>
124123
```
125124
where `<impi_dir>` is the path to the Intel® MPI Library installation.
126125

127-
Enabling both the OpenSHMEM and MPI back-ends is also supported. In this case,
128-
the desired backend can be selected via the environment variable,
129-
`ISHMEM_RUNTIME`, which can be set to either "OpenSHMEM" or "MPI".
130-
The default value for `ISHMEM_RUNTIME` is "OpenSHMEM".
126+
Enabling both the OpenSHMEM and MPI backends is also supported. You may specify the default runtime at configure time with `-DISHMEM_DEFAULT_RUNTIME=<backend>` where `<backend>` is `MPI` or `OPENSHMEM` (case-insensitive). Furthermore, the desired backend can be selected at runtime via the environment variable `ISHMEM_RUNTIME=<backend>` where is `MPI` or `OPENSHMEM` (case-insensitive). If a default runtime is not specified, it will be automatically selected from the enabled backends in the following order: `OPENSHMEM` then `MPI`.
131127

132128
## Usage
133129

134130
### Launching Example Application
135131

136132
Validate that Intel® SHMEM was built correctly by running an example program.
137133

138-
1. Add the path for the back-end library to the environment, for example:
134+
1. Add the path for the backend library to the environment, for example:
139135

140136
```
141137
export LD_LIBRARY_PATH=<shmem_dir>/lib:$LD_LIBRARY_PATH
138+
source <impi_dir>/env/vars.sh
142139
```
143140

144-
When enabling only the Intel® MPI Library back-end, simply source the appropriate
145-
`setvars.sh` script. When enabling both OpenSHMEM and MPI back-ends, first
146-
source the `setvars.sh` script, then configure the dynamic linker to load the
147-
OpenSHMEM library (for example by prepending `<shmem_dir>/lib` to
148-
`LD_LIBRARY_PATH`).
149-
150141
2. Run the example program or test on an allocated node using a process launcher:
151142

152143
```
153-
ISHMEM_RUNTIME=<back-end> mpiexec.hydra -n 2 -hosts <allocated_node_id> ./scripts/ishmrun ./test/unit/int_get_device
144+
ISHMEM_RUNTIME=<backend> mpiexec.hydra -n 2 -hosts <allocated_node_id> ./scripts/ishmrun ./test/unit/int_get_device
154145
```
155-
where `<back-end>` is the selected host back-end library.
156146

157147
- *Note:* Current supported launchers include: MPI process launchers (i.e. `mpiexec`, `mpiexec.hydra`, `mpirun`, etc.), Slurm (i.e. `srun`, `salloc`, etc.), and PBS (i.e. `qsub`).
158148

159-
- *Note:* Intel® SHMEM execution model requires applications to use a 1:1 mapping between PEs and GPU devices. Attempting to run an application without the ishmrun launch script may result in undefined behavior if this mapping is not maintained.
160-
- For further details on the device selection, please see [the ONEAPI_DEVICE_SELECTOR](https://github.com/intel/llvm/blob/sycl/sycl/doc/EnvironmentVariables.md#oneapi_device_selector).
149+
- *Note:* Intel® SHMEM execution model requires applications to use a 1:1 mapping between PEs and GPU devices. Attempting to run an application without the `ishmrun` launch script may result in failure if this mapping is not maintained.
150+
- For further details on device selection, please see [the ONEAPI_DEVICE_SELECTOR](https://github.com/intel/llvm/blob/sycl/sycl/doc/EnvironmentVariables.md#oneapi_device_selector).
161151

162152
3. Validate the application ran successfully; example output:
163153

@@ -211,6 +201,18 @@ The following values may be assigned to `CTEST_LAUNCHER` at configure-time (ex.
211201
```
212202
export JOB_QUEUE=<queue>
213203
```
204+
### Hardware-specific Environment Settings
205+
The following environment settings are either **required** or *recommended* when running Intel® SHMEM on the specified hardware. For GPU-specific environment settings, the launch script `ishmrun` will automatically detect and set the appropriate environment. For interconnect-specific environment settings, it is up to the user to ensure the appropriate environment is set:
206+
207+
- HPE Slingshot Interconnect
208+
- `FI_CXI_OPTIMIZED_MRS=0` is **required** when running with an OpenSHMEM backend.
209+
- `FI_CXI_DEFAULT_CQ_SIZE=131072` is *recommended* for all backends.
210+
- Mellanox ConnectX® Interconnects
211+
- `MLX5_SCATTER_TO_CQE=0` is **required** when running with an OpenSHMEM backend.
212+
- Intel® Data Center GPU Max Series
213+
- `EnableImplicitScaling=0` is **required**. *Note:* you will also need to ensure `NEOReadDebugKeys=1` in case it is not already set.
214+
- Intel® Arc™ B-Series GPUs
215+
- `RenderCompressedBuffersEnabled=0` is **required**. *Note:* you will also need to ensure `NEOReadDebugKeys=1` in case it is not already set.
214216

215217
## Additional Resources
216218

RELEASE_NOTES.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
# Release Notes <!-- omit in toc -->
22
This document contains a list of new features and known limitations of Intel® SHMEM releases.
33

4+
## Release 1.5.0
5+
6+
### New Features and Enhancements
7+
- Support for new collectives: inclusive and exclusive scan.
8+
- Improved affinity assignment through launcher script `ishmrun`.
9+
- Preliminary support for Intel® Arc™ B-Series GPUs.
10+
- Bug fixes improving functionality.
11+
12+
### Known Limitations
13+
- Only [Sandia OpenSHMEM](https://github.com/Sandia-OpenSHMEM/SOS) and [Intel® MPI Library](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html) are currently supported as the host back-end.
14+
- Not all APIs from OpenSHMEM standard are supported. Please refer to [Supported/Unsupported Features](https://oneapi-src.github.io/ishmem/supported_features.html) to get a complete view.
15+
- Intel® SHMEM requires a one-to-one mapping of PEs to SYCL devices. This implies that Intel® SHMEM executions must launch with a number of processes on each compute node that is no more than the number of available SYCL devices on each one of those nodes. By default, the Intel® SHMEM runtime considers each individual device tile to make up a single SYCL device and assigns a tile per PE.
16+
- All collective operations within a kernel must complete before invoking subsequent kernel-initiated collective operation.
17+
- To run Intel® SHMEM with SOS enabling the Slingshot provider in OFI, environment variable `FI_CXI_OPTIMIZED_MRS=0` must be used. It is also recommended to use `FI_CXI_DEFAULT_CQ_SIZE=131072`.
18+
- To run Intel® SHMEM with SOS enabling the verbs provider, environment variable `MLX5_SCATTER_TO_CQE=0` must be used.
19+
- To run Intel® SHMEM with Intel® MPI Library, environment variable `I_MPI_OFFLOAD=1` must be used. Additionally, `I_MPI_OFFLOAD_RDMA=1` may be necessary for GPU RDMA depending on the OFI provider. Please refer to the [reference guide](https://www.intel.com/content/www/us/en/docs/mpi-library/developer-reference-linux/2021-16/gpu-buffers-support.html) for further details.
20+
- Inter-node communication in Intel® SHMEM requires [dma-buf](https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) support in the Linux kernel. Inter-node functionality in Intel® SHMEM Release 1.5.0 is tested with SUSE Linux Enterprise Server 15 SP4.
21+
- Support for Intel® Arc™ B-Series GPUs is preliminary. As such, not all APIs are currently supported.
22+
- When using Intel® Arc™ B-Series GPUs, environment variable `RenderCompressedBuffersEnabled=0` is required. This is automatically set when running with the launcher script `ishmrun`.
23+
424
## Release 1.4.0
525

626
### New Features and Enhancements

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Security Policy
2-
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
2+
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
33

44
## Reporting a Vulnerability
55
Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).

cmake/ishmem

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%Module1.0
22
##############################################################################
33

4-
# Copyright (c) 2025, Intel Corporation
4+
# Copyright (c) 2024, Intel Corporation
55
# SPDX-License-Identifier: BSD-3-Clause
66

77
##############################################################################
@@ -79,5 +79,3 @@ prepend-path LD_LIBRARY_PATH "$topdir/lib"
7979
prepend-path LIBRARY_PATH "$topdir/lib"
8080
prepend-path C_INCLUDE_PATH "$topdir/include"
8181
prepend-path CPLUS_INCLUDE_PATH "$topdir/include"
82-
prepend-path PKG_CONFIG_PATH "$topdir/lib/pkgconfig"
83-
prepend-path CMAKE_PREFIX_PATH "$topdir/lib/cmake/ishmem"

0 commit comments

Comments
 (0)