From 824a6f67b6537895971f37a092c4617119c9a3cd Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 15 Aug 2024 14:05:33 -0500 Subject: [PATCH] ch4: remove buf-count-datatype from am_check_eager interface The buf, count, datatype triplet are not needed in checking eager limit. Removing them from the interface facilitates later we add partial datatype via MPIR_Data. --- doc/wiki/developer_guide.md | 4 +--- src/mpid/ch4/ch4_api.txt | 4 ++-- src/mpid/ch4/netmod/ofi/ofi_am.h | 3 +-- src/mpid/ch4/netmod/ucx/ucx_am.h | 3 +-- src/mpid/ch4/shm/src/shm_am.h | 3 +-- src/mpid/ch4/src/mpidig_send.h | 11 +++++------ 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/doc/wiki/developer_guide.md b/doc/wiki/developer_guide.md index 89102ca9bbf..680980513c3 100644 --- a/doc/wiki/developer_guide.md +++ b/doc/wiki/developer_guide.md @@ -303,9 +303,7 @@ MPI_Aint MPIDI_[NM|SHM]_am_eager_limit(void) MPI_Aint MPIDI_[NM|SHM]_am_eager_buf_limit(void) /* return true/false if pt2pt message can be sent eagerly */ -bool MPIDI_[NM|SHM]_am_check_eager(MPI_Aint am_hdr_sz, MPI_Aint data_sz, - const void *data, MPI_Aint count, - MPI_Datatype datatype, MPIR_Request * sreq) +bool MPIDI_[NM|SHM]_am_check_eager(MPI_Aint am_hdr_sz, MPI_Aint data_sz, MPIR_Request * sreq) /****************** Callback APIs ******************/ diff --git a/src/mpid/ch4/ch4_api.txt b/src/mpid/ch4/ch4_api.txt index 96ace1800b8..f69e0805246 100644 --- a/src/mpid/ch4/ch4_api.txt +++ b/src/mpid/ch4/ch4_api.txt @@ -76,8 +76,8 @@ Non Native API: NM*: void SHM*: void am_check_eager: bool - NM*: am_hdr_sz, data_sz, data, count, datatype, sreq - SHM*: am_hdr_sz, data_sz, data, count, datatype, sreq + NM*: am_hdr_sz, data_sz, sreq + SHM*: am_hdr_sz, data_sz, sreq comm_get_gpid : int NM*: comm_ptr, idx, gpid_ptr, is_remote get_local_upids : int diff --git a/src/mpid/ch4/netmod/ofi/ofi_am.h b/src/mpid/ch4/netmod/ofi/ofi_am.h index 19dd1348e89..d4140e3ebf9 100644 --- a/src/mpid/ch4/netmod/ofi/ofi_am.h +++ b/src/mpid/ch4/netmod/ofi/ofi_am.h @@ -192,8 +192,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Comm * comm, } MPL_STATIC_INLINE_PREFIX bool MPIDI_NM_am_check_eager(MPI_Aint am_hdr_sz, MPI_Aint data_sz, - const void *data, MPI_Aint count, - MPI_Datatype datatype, MPIR_Request * sreq) + MPIR_Request * sreq) { MPIDI_OFI_AMREQUEST(sreq, data_sz) = data_sz; if ((am_hdr_sz + data_sz) diff --git a/src/mpid/ch4/netmod/ucx/ucx_am.h b/src/mpid/ch4/netmod/ucx/ucx_am.h index 68fa6aa2d06..2155a59abe5 100644 --- a/src/mpid/ch4/netmod/ucx/ucx_am.h +++ b/src/mpid/ch4/netmod/ucx/ucx_am.h @@ -261,8 +261,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Comm * comm, } MPL_STATIC_INLINE_PREFIX bool MPIDI_NM_am_check_eager(MPI_Aint am_hdr_sz, MPI_Aint data_sz, - const void *data, MPI_Aint count, - MPI_Datatype datatype, MPIR_Request * sreq) + MPIR_Request * sreq) { #ifdef HAVE_UCP_AM_NBX /* ucx will handle rndv */ diff --git a/src/mpid/ch4/shm/src/shm_am.h b/src/mpid/ch4/shm/src/shm_am.h index e596c647070..57f7612c423 100644 --- a/src/mpid/ch4/shm/src/shm_am.h +++ b/src/mpid/ch4/shm/src/shm_am.h @@ -110,8 +110,7 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request * req) } MPL_STATIC_INLINE_PREFIX bool MPIDI_SHM_am_check_eager(MPI_Aint am_hdr_sz, MPI_Aint data_sz, - const void *data, MPI_Aint count, - MPI_Datatype datatype, MPIR_Request * sreq) + MPIR_Request * sreq) { /* TODO: add checking for IPC transmission */ return (am_hdr_sz + data_sz) <= MPIDI_POSIX_am_eager_limit(); diff --git a/src/mpid/ch4/src/mpidig_send.h b/src/mpid/ch4/src/mpidig_send.h index 36a36da42c0..1ff868d4cc6 100644 --- a/src/mpid/ch4/src/mpidig_send.h +++ b/src/mpid/ch4/src/mpidig_send.h @@ -27,16 +27,15 @@ #define MPIDIG_AM_SEND_GET_RNDV_ID(flags) (flags >> 8) MPL_STATIC_INLINE_PREFIX bool MPIDIG_check_eager(int is_local, MPI_Aint am_hdr_sz, MPI_Aint data_sz, - const void *buf, MPI_Aint count, - MPI_Datatype datatype, MPIR_Request * sreq) + MPIR_Request * sreq) { #ifdef MPIDI_CH4_DIRECT_NETMOD - return MPIDI_NM_am_check_eager(am_hdr_sz, data_sz, buf, count, datatype, sreq); + return MPIDI_NM_am_check_eager(am_hdr_sz, data_sz, sreq); #else if (is_local) { - return MPIDI_SHM_am_check_eager(am_hdr_sz, data_sz, buf, count, datatype, sreq); + return MPIDI_SHM_am_check_eager(am_hdr_sz, data_sz, sreq); } else { - return MPIDI_NM_am_check_eager(am_hdr_sz, data_sz, buf, count, datatype, sreq); + return MPIDI_NM_am_check_eager(am_hdr_sz, data_sz, sreq); } #endif } @@ -91,7 +90,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_isend_impl(const void *buf, MPI_Aint count, int is_local = MPIDI_av_is_local(addr); MPI_Aint am_hdr_sz = (MPI_Aint) sizeof(am_hdr); - if (MPIDIG_check_eager(is_local, am_hdr_sz, data_sz, buf, count, datatype, sreq)) { + if (MPIDIG_check_eager(is_local, am_hdr_sz, data_sz, sreq)) { /* EAGER send */ CH4_CALL(am_isend(rank, comm, MPIDIG_SEND, &am_hdr, am_hdr_sz, buf, count, datatype, src_vci, dst_vci, sreq), is_local, mpi_errno);