Skip to content

Commit ef4e4a0

Browse files
Introduced free quesries function & added more information about helper function
1 parent 93238c6 commit ef4e4a0

4 files changed

Lines changed: 350 additions & 347 deletions

File tree

clang/runtime/dpct-rt/include/dpct/shmem_utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111

1212
namespace dpct::shmem {
1313

14-
/// Setup Operations
1514
/// Initialize Intel SHMEM runtime based on exisiting communicator in attributes
16-
/// \param [in] runtime_flags specifies the exisiting communicator
15+
/// \param [in] runtime_flags specify the underlying communicator like MPI/
16+
/// OpenSHMEM to initialize iSHMEM for launcher agnostic bootstrapping
1717
/// \param [in] attr attributes of existing communicator
1818
void init_attr(unsigned runtime_flags, ishmemx_attr_t *attr) {
1919
if (runtime_flags == 0) {
20+
// if no runtime flags are present, initialize iSHMEM normally
2021
ishmem_init();
2122
} else {
2223
attr->runtime = static_cast<ishmemx_runtime_type_t>(runtime_flags);
2324
ishmemx_init_attr(attr);
2425
}
2526
}
2627

27-
/// Signal Operationss
2828
/// Update signal address with signal using signal operation
2929
/// \param [out] sig_addr Address of the signal to be updated
3030
/// \param [in] signal Value of the signal to update

clang/test/dpct/nvshmem/library_setup_exit_query.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: dpct --format-range=none -out-root %T/nvshmem %s --cuda-include-path="%cuda-path/include"
44
// RUN: FileCheck %s --match-full-lines --input-file %T/nvshmem/library_setup_exit_query.dp.cpp
55
// RUN: %if build_lit %{icpx -c -fsycl -DNO_BUILD_TEST %T/nvshmem/library_setup_exit_query.dp.cpp -o %T/nvshmem/library_setup_exit_query.dp.o %}
6+
// CHECK: #include <ishmem.h>
7+
// CHECK-NEXT: #include <ishmemx.h>
8+
// CHECK-NEXT: #include <dpct/shmem_utils.hpp>
69
#include <nvshmem.h>
710
#include <nvshmemx.h>
811

0 commit comments

Comments
 (0)