Commit Graph

61 Commits

Author SHA1 Message Date
Aurelien Bouteiller 56a3181a6f Swdev/536571 with additional issues found for other various missing includes (#158)
* Revert "SWDEV-536571 - Include assert header. (#157)"

This reverts commit 87d2efa430.

* Fix use of assert/abort and required includes

* Disable IPC AMO testers for non-implemented functions

[ROCm/rocshmem commit: 551603829c]
2025-06-16 20:21:06 -04:00
Avinash Kethineedi c4de6833f6 Add SPDX license identifiers and update copyright headers (#85)
* Update copyright information and add SPDX license identifier

* Update AUTHORS

* Remove `sos_tests`

[ROCm/rocshmem commit: f6ef19f5a9]
2025-04-15 15:37:53 -05:00
Avinash Kethineedi be35f3ef93 Update backend to use provided MPI communicator during library initialization (#79)
* Update backend to use provided MPI communicator during library initialization, default to `MPI_COMM_WORLD`

* Update `rocshmem_my_pe` and `rocshmem_n_pes` host APIs
   - Return values from backend if initialized; otherwise, fallback to MPI_Singleton.

[ROCm/rocshmem commit: 05755847f5]
2025-04-14 09:18:57 -05:00
Avinash Kethineedi 9bd2b04899 Update Barrier and Sync APIs (#73)
* Add thread, wavefront, and workgroup-level `barrier` APIs in IPC and RO conduits; remove collectives on default context
 - Implemented `barrier` APIs for thread, wavefront, and workgroup scopes
 - Added support into both IPC and RO conduits
 - Added functional tests to cover all `barrier` APIs
 - Removed collective operations on default context

* Add thread, wavefront, and workgroup-level `sync` APIs in IPC and RO conduits.
  - Implemented `sync` APIs for thread, wavefront, and workgroup scopes
  - Added support into both IPC and RO conduits
  - Added functional tests to cover all `sync` APIs

* update naming convention for context-based `barrier` APIs

[ROCm/rocshmem commit: dc61bca066]
2025-04-08 11:25:31 -05:00
Avinash Kethineedi 426bbf525b Update Barrier_All and Sync_All APIs (#72)
* Fix deadlock in `rocshmem_ctx_wg_barrier_all` API in IPC conduit by adding per-context pSync buffers and context IDs
  - Added separate pSync buffers for each device context
  - Resolved deadlock when invoking barrier API (`rocshmem_ctx_wg_barrier_all`) concurrently from multiple contexts

* Update barrier_all functional tests for multi-context support

* Add thread, wavefront, and workgroup-level barrier_all APIs in IPC and RO conduits
  - Implemented barrier_all APIs at thread, wavefront, and workgroup granularity
  - Added support in both IPC and RO conduits
  - Updated functional tests to cover all `barrier_all` APIs

* Add thread, wavefront, and workgroup-level sync_all APIs in IPC and RO conduits
  - Implemented sync_all APIs for thread, wavefront, and workgroup scopes
  - Added support into both IPC and RO conduits
  - Added functional tests to cover all `sync_all` APIs

[ROCm/rocshmem commit: c652f58cef]
2025-04-02 11:58:55 -05:00
Edgar Gabriel 1ee9b72449 add rocshmem_barrier() (#61)
* add team-barrier implementation

add a team-barrier API and implementation in the IPC and RO conduit.
Clean up some of the logic in the RO Conduit to distinguish between
sync, sync_all, barrier, and barrier_all.

* add team_barrier_tests to functional tests

[ROCm/rocshmem commit: bcbc42e78f]
2025-03-24 11:23:03 -05:00
Yiltan 1ed4512106 Removed GPU_IB (#59)
[ROCm/rocshmem commit: 658bf2a3b5]
2025-03-24 09:04:52 -04:00
Avinash Kethineedi 1831a1b33c Update(DeviceProxy): Dynamically Determine Memory Allocation Size & Remove Compile-Time size Calculations (#48)
* Update(DeviceProxy): Dynamically Determine Memory Allocation Size & Remove Compile-Time size Calculations

- Modified the Device proxy class to determine memory allocation size at runtime.
- Updated all classes that include the Device proxy to use dynamic memory allocation.
- Removed compile-time memory size calculations.
- Ensured the allocated number of backend queue data structures matches the number of RO device contexts.

[ROCm/rocshmem commit: eb5a38e806]
2025-02-24 15:11:46 -06:00
avinashkethineedi fca7471d67 Fix rocshmem_ctx_wg_team_sync API
- Updated `rocshmem_ctx_wg_team_sync` to utilize a team-specific memory buffer for synchronization


[ROCm/rocshmem commit: c5b548c398]
2025-02-05 19:09:07 +00:00
Avinash Kethineedi 2214d21491 Merge pull request #31 from avinashkethineedi/rocshmem_g
Implement `rocshmem_g` API and optimize memory usage

[ROCm/rocshmem commit: 248972b30b]
2025-02-04 11:15:41 -06:00
Yiltan Hassan Temucin ffdce76fe4 [IPC] Fix ROCSHMEM_SIGNAL_ADD
[ROCm/rocshmem commit: fd3eaa3f69]
2025-02-03 09:59:28 -08:00
avinashkethineedi 5af3fdeacb Implement rocshmem_g API and optimize memory usage
- Implement `rocshmem_g` API
- Free up memory space allocated for `rocshmem_g` and atomic operations' return values


[ROCm/rocshmem commit: 757d7e53ca]
2025-02-02 05:56:46 +00:00
avinashkethineedi 15c5ff048c Replace raw pointers for host_interface with shared_ptr to enable automatic memory handling
[ROCm/rocshmem commit: 1ef2d3a6b7]
2025-01-13 20:58:43 +00:00
Yiltan Temucin 3bf7d2eb87 IPC backend now aborts with rocshmem global_exit()
[ROCm/rocshmem commit: c0e4a32ca2]
2024-12-23 11:03:04 -06:00
Yiltan Temucin 48605db5de Remove comparisons of signed to unsigned values
[ROCm/rocshmem commit: fa0858833e]
2024-12-12 10:21:08 -06:00
avinashkethineedi 29b0518afc Rename config.h to roc_shmem_config.h
[ROCm/rocshmem commit: 6486e29078]
2024-12-06 01:08:13 +00:00
avinashkethineedi 04daad3625 Merge branch PR #55 into naming_scheme
[ROCm/rocshmem commit: d8ce066adc]
2024-12-04 21:46:38 +00:00
Brandon Potter 913ce47ef1 Use new naming scheme
[ROCm/rocshmem commit: fd8dbc7fb6]
2024-11-25 14:25:29 -06:00
Yiltan Temucin ba618ba7a9 Added Signalling Operations
[ROCm/rocshmem commit: d8f44e4436]
2024-11-22 15:36:17 -06:00
Avinash Kethineedi 3c3eee3a11 Merge pull request #52 from avinashkethineedi/IPC_puts/gets
Update puts and gets with fence call

[ROCm/rocshmem commit: 2cb5cab038]
2024-11-14 13:19:24 -06:00
avinashkethineedi 929c79cdc0 Update puts and gets to include a fence following data movement, ensuring data visibility
[ROCm/rocshmem commit: d1ee997542]
2024-11-12 16:52:07 +00:00
avinashkethineedi e4e18e31bb Update collective APIs to use teams interface
* Use team-relative numbering in collective functions
* Replace log_stride with stride


[ROCm/rocshmem commit: 5e3d94c705]
2024-11-06 17:50:23 +00:00
Yiltan Hassan Temucin 7f3dd33144 modified team based to_all -> reduce
[ROCm/rocshmem commit: 997eb69b5a]
2024-11-06 09:46:43 -06:00
avinashkethineedi 832dda25e6 Merge branch 'ROCm:develop' into active_set_APIs
[ROCm/rocshmem commit: b2b0d559cb]
2024-11-05 23:02:44 +00:00
Yiltan Hassan Temucin 9ae2320ac3 remove cooperative groups
[ROCm/rocshmem commit: fe767d9abf]
2024-10-30 20:10:21 +00:00
avinashkethineedi b1a52b906b Update broadcast function to use stride calculations instead of log_stride
[ROCm/rocshmem commit: 5975b8c621]
2024-10-29 19:10:05 +00:00
avinashkethineedi 5869709dac Update all_reduce algorithm to use internal put/get functions for updating pWrk and pSync arrays
* Change log_stride calcualtions to stride calculations
* Update all_reduce example code to use team based interface


[ROCm/rocshmem commit: abec29bd6a]
2024-10-28 22:10:18 +00:00
Edgar Gabriel 95c01c67af add ascii art for ring allredude
[ROCm/rocshmem commit: 11df5427a6]
2024-10-24 15:08:32 +00:00
Edgar Gabriel 2836240906 fix odd-case allreduce scenarios
if the number of elements to be used in the allreduce operation is not
exact multiple of the work-array buffer size and number of pe's, we need
to adjust the algorithm to:
 - initially perform a ring_allreduce on n_segments * chunk_size (which
   is the integer division of the number of elements and the work-buffer
   size, i.e. will not cover the entire buffer)
 - perform another ring_allreduce where chunk_size is reduced to match
   the remaining elements
 - if the remaining elements from the previous step cannot evenly be
   divded by the number of pe's, we need to perform a direct_allreduce on
   the outstanding number of elements.


[ROCm/rocshmem commit: a4b4281f50]
2024-10-24 15:08:32 +00:00
Edgar Gabriel 7b760bb023 fix barrier synchronization on gfx90a
[ROCm/rocshmem commit: 87db7f7d38]
2024-10-24 15:08:28 +00:00
Edgar Gabriel c9b5f03548 ipc: add ring_allreduce algorithms
add the ring allreduce algorithm to the ipc conduit in order to be able
to execute slightly largers reductions.


[ROCm/rocshmem commit: 1fbb89bc73]
2024-10-24 15:07:17 +00:00
Edgar Gabriel 5f0f2f6e85 ipc/to_all: add direct allreduce algorithm
add a simple version of an allreduce algorithm as a starting point.


[ROCm/rocshmem commit: ba21cb7b85]
2024-10-24 15:07:14 +00:00
Avinash Kethineedi 6979677ec5 Merge pull request #41 from avinashkethineedi/collective_routine_buffers
Fine grained memory buffers for work/sync arrays

[ROCm/rocshmem commit: 8a16968cf2]
2024-10-23 23:33:48 -05:00
avinashkethineedi 82d296db73 Fix quiet and fence of default context
* Update tinfo of default context


[ROCm/rocshmem commit: d5ea5868e3]
2024-10-22 16:18:05 +00:00
avinashkethineedi fbcba80cd3 Add fine grained memory buffers for work/sync arrays
* Add interanl put_mem/get_mem{_wave, _wg} functions to read/write to work/sync arrays
* Add condition check to ensure all MPI processes are on the same compute node for IPC conduit


[ROCm/rocshmem commit: 6685d0ab60]
2024-10-21 15:28:39 +00:00
Yiltan Hassan Temucin 3d0fca0387 updated *_wait* APIs to use int rather than roc_shmem_cmps
[ROCm/rocshmem commit: 722a5f0731]
2024-10-11 13:34:28 -07:00
Yiltan Hassan Temucin 496f06dd2b *_wait* routines changed parameter from ptr to ivars to match OpenSHMEM
[ROCm/rocshmem commit: bcf3fdff10]
2024-10-11 13:34:28 -07:00
Yiltan Hassan Temucin 17323323f8 fixed notifier bug
[ROCm/rocshmem commit: 509277c034]
2024-10-10 06:45:43 -07:00
Yiltan Hassan Temucin 8334214b98 added notifier->sync() when we are not using cooperative groups
updated scope bug


[ROCm/rocshmem commit: b1134e8633]
2024-10-09 13:11:28 -07:00
Yiltan Hassan Temucin caa6d356c0 Added Cooperative Groups configure option and header
[ROCm/rocshmem commit: 63667a3167]
2024-10-09 13:11:12 -07:00
Yiltan Hassan Temucin 45976b23ae Fix initialization order bug
[ROCm/rocshmem commit: 1baa071edf]
2024-10-09 13:11:12 -07:00
Yiltan Hassan Temucin ef571f5863 fixed barrier issue on MI250X
[ROCm/rocshmem commit: e2f6a65284]
2024-10-08 13:18:04 -07:00
avinashkethineedi 37b1de86cd Add team information to the context
* Update roc_shmem_ctx_fence API to use team-relative PE numbering
* Update backend to populate team_opaque member of ROC_SHMEM_CTX_DEFAULT (used to store information about the team wrt TEAM_WORLD)


[ROCm/rocshmem commit: 92fb1abaf2]
2024-10-04 17:56:15 +00:00
avinashkethineedi 69784a7423 Add fence and quiet functionality
* Perform atomic stores to enforce memory ordering


[ROCm/rocshmem commit: 979aed105a]
2024-10-03 06:28:12 +00:00
Avinash Kethineedi c88645e402 Merge branch 'ipc_bringup' into ipc_atomics
[ROCm/rocshmem commit: e58077e3cf]
2024-09-09 14:22:55 -05:00
Edgar Gabriel 1ddc82fc28 remove pSync from internal_bcast functions
remove the pSync arguments from the internal_broadcast functions,
they are not used anyway.


[ROCm/rocshmem commit: dfcacdc4a3]
2024-09-09 12:06:30 -07:00
avinashkethineedi e381ea5478 remove local_pe calculation from puts, gets and atomics functions
* All the PEs are assumed to be accessible using IPC backend


[ROCm/rocshmem commit: 7bbf34d334]
2024-09-05 11:52:00 -07:00
Edgar Gabriel 6f93dd9585 ipc/context_ipc_device.cpp: set barrier_sync
set the barrier_sync variable on the context during
object creation


[ROCm/rocshmem commit: aae6295460]
2024-08-28 09:41:05 -07:00
avinashkethineedi 14a8bf726a Add atomics
* Add atomic_add, atomic_set, atomic_cas, atomic_fetch_add and atomic_fetch_cas to IPC backend


[ROCm/rocshmem commit: e1e1ac6df6]
2024-08-28 08:30:46 -07:00
avinashkethineedi 1335d98f1f Update IPC object
* Update the IPC object in the context class with the instance created in the IPC backend


[ROCm/rocshmem commit: 45a8cb3354]
2024-08-28 08:14:38 -07:00