Commit graph

298 Commits

Autor SHA1 Nachricht Datum
akolliasAMD fc22f8130d added akolliasAMD to codeowners (#145) 2025-05-28 12:52:58 -06:00
dependabot[bot] e0c9ee45a7 Bump tornado from 6.4.2 to 6.5.1 in /docs/sphinx (#143)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.2 to 6.5.1.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](https://github.com/tornadoweb/tornado/compare/v6.4.2...v6.5.1)

---
updated-dependencies:
- dependency-name: tornado
  dependency-version: 6.5.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 11:10:07 -04:00
Yiltan 9fe166c8e1 [SWDEV-534546] Disable building tests in default build (#141) 2025-05-26 16:50:22 -04:00
yugang-amd 8a266e698c Final edits (#126)
* final edits

* more edits per review

* more edits

* attempt to fix dead link
2025-05-21 16:59:00 -04:00
Edgar Gabriel bce329abd6 free MPI Communicators on destruction (#134)
make sure that all communicators that have been created during the
runtime of the application are correctly freed again, to avoid memory
leaks.
2025-05-20 09:59:00 -05:00
Jobbins 474112d03c Code Coverage (#82)
code coverage:  generate code coverage reports

* Add instrumentation flags to rocshmem target when adding -DBUILD_CODE_COVERAGE cmake flag
* Add helper script to build all subprojects and generate code coverage reports
* Update README with code coverage instructions
2025-05-16 09:09:17 -06:00
Yiltan f43e3cf4fa Updated ROCm-docs to match the current status of the repository (#117)
* Updated docs to match the current status of the repository

Co-authored-by: yugang-amd <yugang.wang@amd.com>
2025-05-16 09:26:59 -04:00
Aurelien Bouteiller 3600291558 Detailed logs (#124)
* Use a single printf per line (reduce chances of lines being cut in logs)

* team_comm can be an int or a pointer depending on MPI impl.
Received is confusing (since we are on the origin), use submitted
instead

* Print arguments to calls when using DEBUG

---------

Signed-off-by: Aurelien Bouteiller <abouteil@amd.com>
2025-05-15 10:37:12 -04:00
yugang-amd 67bff9ca30 Style edits (#122) 2025-05-13 16:26:28 -04:00
alexxu-amd 9088383dab move requirements.txt from docs/ to docs/sphinx/ (#118) 2025-05-08 15:37:58 -04:00
Yiltan f693c98fb2 Initial ROCm-docs (#92)
* Initial ROCm-docs commit

Co-authored-by: Aurélien Bouteiller <bouteill@icl.utk.edu>
Co-authored-by: Alex Xu <alex.xu@amd.com>
Co-authored-by: yugang-amd <yugang.wang@amd.com>
2025-05-08 13:39:28 -04:00
Aurelien Bouteiller 87179b1ffd Remove unused parts of dlmalloc to improve coverity score (#106) 2025-05-07 13:05:04 -04:00
Yiltan 644857d375 Added initial changelog (#105) 2025-05-07 11:39:14 -04:00
Aurelien Bouteiller 2bbe21db56 func-tests: Don't rely on asserts to catch invalid argv/env params (#96) 2025-05-02 12:00:35 -04:00
Aurelien Bouteiller f0501550f7 cleanup leftovers from SOS testers removal (#97)
Followup to pr#85
2025-05-02 11:59:52 -04:00
Aurelien Bouteiller b835de6cd5 Substitute pow2bin allocator with a dlmalloc based allocator (#71)
* Add dlmalloc_strat allocator strategy
 - Use mspace variant to ease encapsulation
 - Make pow2bins and dlmalloc cmake selectable
* Add unit tester for dlmalloc, rework single_heap, pow2bins unit testers
accordingly
 - add dlmalloc get_used/get_avail, and have all strats allocators also have a get_used
 - Rework memallocator unit tests: bin size is per strat, alignment is verified in singleheap
* bugfix: dlmalloc exposed that the pingpong test would write past end of
allocation with -w 32
* iostream leakage/mixed usage of cerr and fprintf(stderr

---------

Signed-off-by: Aurelien Bouteiller <aurelien.bouteiller@amd.com>
2025-05-01 11:55:23 -04:00
Yiltan edcd1ed57e Added XNACK support (#94)
* Added xnack flags
* Updated examples compile command
2025-04-30 08:57:55 -04:00
Edgar Gabriel 2e01af22ca use correct MPI initialization method (#90)
* use correct MPI initialization method

rocSHMEM requires that the MPI library is initialized using
THREAD_MULTIPLE support. Lets use that function therefore in our
examples.

* Update examples/rocshmem_init_attr_test.cc

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>

---------

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>
2025-04-29 16:22:46 -05:00
Edgar Gabriel db74307195 unify env variables and use DPRINTF (#89)
* unify handling of env variables

create a class containing all (most?) environment variables used by rocshmem and an object that is instatiated
before library_init, since some of the environment variables need to be
set before we start the bootstraping process.

This allows us to remove two files from the bootstrap directory.

* replace INFO and TRACE macros with DPRINTF

to be more consistent with the rest of the rocSHMEM code
2025-04-29 06:05:25 -05:00
Yiltan c81722c339 Check RMA functional test data in GPU kernel (#91) 2025-04-28 16:06:05 -04:00
Aurelien Bouteiller 67bc5b9e5a Show and log what the functional test driver is running (#70)
Show and log what the functional test driver is running
* Log errors in the log file
* list all failed tests at the end
* pretty colors :x
* Print stderr when the test has failed

---------

Signed-off-by: Aurelien Bouteiller <aurelien.bouteiller@amd.com>
2025-04-23 10:21:35 -04:00
Edgar Gabriel e3b0353fa9 use correct id when accessing ipc-bases (#88)
we need to use the position of that processes in the local ipc-bases
array, not the global rank.
2025-04-17 10:11:32 -05:00
Aurelien Bouteiller 9befbe8293 bugfix: do not dereference ctx during create_ctx if we did run out (#83) 2025-04-16 10:37:44 -04:00
Avinash Kethineedi f6ef19f5a9 Add SPDX license identifiers and update copyright headers (#85)
* Update copyright information and add SPDX license identifier

* Update AUTHORS

* Remove `sos_tests`
2025-04-15 15:37:53 -05:00
Yiltan 5ee0c3407e Added sphinx dependencies (#84) 2025-04-15 11:28:16 -04:00
Aurelien Bouteiller a1a0560ca3 Remove dev-mono-linear (#81)
* Remove dev_mono_linear (followup to removal of slab_heap)

* cleanup: use CHECK_HIP rather than ad-hoc error checking

---------

Signed-off-by: Aurelien Bouteiller <aurelien.bouteiller@amd.com>
2025-04-15 09:57:59 -04:00
Edgar Gabriel b5830a623b Revamp the uniqueId code to support subgroups of processes (#80)
* add code for bootstrapping

the bootstrapping code has been extracted from the MSCCLPP library,
which in parts is based on the code from NVIDIA. The code has been
modified to match the specific requirements of the rocSHMEM library.

* add code to use the new uniqueId bootstrapping

* adjust init_attr example

extend the rocshmem_init_attr example to use two disjoint groups
of processe, in order to trigger the new code path.

* add env variable for bootstrap timeout

* Update examples/rocshmem_init_attr_test.cc

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>

* Update src/rocshmem.cpp

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>

---------

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>
2025-04-14 12:02:09 -05:00
Avinash Kethineedi 05755847f5 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.
2025-04-14 09:18:57 -05:00
Brandon Potter 0fd628458c Cleanup unused code in repository (#75)
* Remove unused forward_list

* Remove unused __read_clock function

* Replace wallClk code with hip function

* Remove unused unit test for ipc

* Remove slab heap

* Remove unused EBO spinlock
2025-04-10 14:47:24 -05:00
Avinash Kethineedi 68421895d6 Update collective APIs naming (#77)
* Update the naming convention for collective APIs to ensure consistency across the interface.

* Move all collective API declarations to rocshmem_COLL.hpp

* The following APIs were updated as part of this change:
  - `barrier`
  - `barrier_all`
  - `sync`
  - `sync_all`
  - `all_to_all`
  - `broadcast`
  - `fcollect`
  - `all_reduce`

* Update header file generation code for collective APIs
2025-04-10 12:14:47 -05:00
Edgar Gabriel 5e49567b6c add new flag to build instructions (#78)
This flag is required to link a pytorch use-case correctly.
It doesn't seem to impact the rocSHMEM code.
2025-04-10 08:39:54 -05:00
Yiltan 25e7109b64 Enable RO CI (#65) 2025-04-08 16:12:22 -04:00
Avinash Kethineedi dc61bca066 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
2025-04-08 11:25:31 -05:00
Avinash Kethineedi c652f58cef 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
2025-04-02 11:58:55 -05:00
Yiltan e16ca7a1e3 Update GTEST version (#68) 2025-03-31 08:58:30 -04:00
Edgar Gabriel e9f6227d75 add uniqueID initialization (#69)
add the interfaces required to support rocshmem initialization
through the uniqueID mechanism. At the moment this still maps to
MPI initialization underneath the hood, but adding the functions might
simplify the porting of some applications to rocshmem. In addition, if
we need to transition away from MPI one day, this is also one step into
this direction.
2025-03-28 16:34:00 -05:00
Edgar Gabriel 12561783de Performance tuning for inter-node communication (#66)
This PR addresses two issues:
 - reduce the number of contexts supported by the host-interface by
   default to 1, we are not using those at the moment, and hence
   we now create fewer MPI_Win at the startup
 - introduces a micro-sleep in RO progress engine in case there are no
   pending requests. This leads significant performance improvements
   observed for inter-node communication with THor2 NICs.
2025-03-26 21:09:26 -05:00
Edgar Gabriel 607c6bd044 Update CODEOWNERS (#67) 2025-03-26 12:35:39 -05:00
Avinash Kethineedi 867519e1d0 Implement default RO context (#64)
* Allocate default context buffers and initialize queue for management

- Allocated the status flag, g return, and atomic return buffers for
  the default context.
- Initialized `AtomicWFQueueProxy` instances to manage these buffers
  efficiently for concurrent access.

* Update `BlockHandle` with default context buffers

* Add default context flag and update buffer retrieval functions

- Added a flag to distinguish the default context from other contexts.
- Modified return buffer functionns and `get_status_flag` function to accommodate
  the default context

* Add default context primitive tests

-  get, put, get_nbi, put_nbi, g, and p APIs.
2025-03-25 18:51:54 -05:00
Edgar Gabriel 4e48c9748e update README documentation for RO (#63)
* README: update documentation for RO support

update the README and the install_dependencies script to match the
requirements of the RO conduit.

* add CODEOWNERS file
2025-03-25 07:50:15 -05:00
Avinash Kethineedi b84b5638cf Add AtomicWFQueue implementation and tests (#62)
* feat: Add AtomicWFQueue implementation
  - Implemented wavefront-safe atomic FIFO queue ensuring first-come, first-serve order
  - Added efficient synchronization using atomics
  - Enhanced `dequeue` to wait until an element is available

* test: Add GTest for AtomicWFQueue
  - Implemented unit tests for AtomicWFQueue using GoogleTest framework
  - Added tests for `enqueue`, `dequeue`, and edge cases
  - Ensured synchronization behavior and correctness under concurrent conditions

* Add assert in `enqueue` and update atomics
  - Added an assert in the `enqueue` function to ensure it fails if the queue is full
2025-03-25 00:45:19 -05:00
Avinash Kethineedi c16b0d6952 Fix/RO Backend Hang Issue (#53)
* Update HIP version check for compatibility with versions >= 5.5

* Update memory allocator for context BlockHandle
   - Replaced `HIPAllocator` with `HIPDefaultFinegrainedAllocator` for context `BlockHandle`.

* Update run commands for `rocshmem_g` and `rocshmem_p` functional tests
2025-03-24 22:54:07 -05:00
Edgar Gabriel bcbc42e78f 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
2025-03-24 11:23:03 -05:00
Aurelien Bouteiller e8ba20c5f5 Update README (#60)
Signed-off-by: Aurelien Bouteiller <aurelien.bouteiller@amd.com>
2025-03-24 10:19:12 -04:00
Yiltan 658bf2a3b5 Removed GPU_IB (#59) 2025-03-24 09:04:52 -04:00
Avinash Kethineedi 1210b6419f Remove support code for GFX940 and GFX941 targets (#55) 2025-03-21 14:31:49 -05:00
Edgar Gabriel 908bd5bda3 RO/collectives: add linear algorithms using RPut/Rget (#58)
* RO/collectives: add linear algorithms using RPut/Rget

- make broadcast, alltoall and fcollect use a simple linear algorithm
  using MPI_RPut/Rget, but without blocking in the execution
- remove the to_all interfaces, since they have been deprecated.
- remove the active-set interfaces, since they have been removed from
  rocSHMEM

* avoid notification after barrier

Co-authored-by: Avinash Kethineedi <avinash.kethineedi@amd.com>

* disable allocation of ata_buffer

a temporary buffer of 128MB was allocated when creating a team. In
previous versions of the code, that buffer was used by some collective
operations. This is not the case for now. Therefore, do not allocate the
buffer for now. I am not removing the element itself from teh
structure, since we might need it in future versions again.

---------

Co-authored-by: Avinash Kethineedi <avinash.kethineedi@amd.com>
2025-03-21 12:49:39 -05:00
Yiltan 68a1646399 ROCm 6.4.0rc3 bug fix (#56) 2025-03-19 15:37:58 -04:00
Yiltan 3428957de9 Sync Reverse Offload Scripts (#52)
* Sync Reverse Offload scripts
- Disable IPC unit tests when IPC is not available in the rocSHMEM configuration

* Added missing ptr in ipc_policy
2025-03-19 14:31:07 -04:00
Yiltan 7d9e82fb34 Bug fix for PR43 (#54) 2025-03-19 09:39:07 -04:00