unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_t *srq) { uct_ib_mlx5_srq_seg_t *seg; uct_ib_iface_recv_desc_t *desc; uint16_t count, index, next_index; uct_rc_hdr_t *hdr; /* Make sure the union is right */ UCS_STATIC_ASSERT(ucs_offsetof(uct_ib_mlx5_srq_seg_t, mlx5_srq.next_wqe_index) == ucs_offsetof(uct_ib_mlx5_srq_seg_t, srq.next_wqe_index)); UCS_STATIC_ASSERT(ucs_offsetof(uct_ib_mlx5_srq_seg_t, dptr) == sizeof(struct mlx5_wqe_srq_next_seg)); ucs_assert(UCS_CIRCULAR_COMPARE16(srq->ready_idx, <=, srq->free_idx)); index = srq->ready_idx; for (;;) { next_index = index + 1; seg = uct_ib_mlx5_srq_get_wqe(srq, next_index & srq->mask); if (UCS_CIRCULAR_COMPARE16(next_index, >, srq->free_idx)) { if (!seg->srq.ooo) { break; } ucs_assert(next_index == (uint16_t)(srq->free_idx + 1)); seg->srq.ooo = 0; srq->free_idx = next_index; } if (seg->srq.desc == NULL) { UCT_TL_IFACE_GET_RX_DESC(&iface->super.super, &iface->rx.mp, desc, break); /* Set receive data segment pointer. Length is pre-initialized. */ hdr = uct_ib_iface_recv_desc_hdr(&iface->super, desc); seg->srq.desc = desc; seg->dptr.lkey = htonl(desc->lkey); seg->dptr.addr = htonll((uintptr_t)hdr); VALGRIND_MAKE_MEM_NOACCESS(hdr, iface->super.config.seg_size); } index = next_index; }
UCT_IB_IFACE_ADDRESS_TYPE_AUTO = UCT_IB_ADDRESS_TYPE_LAST, UCT_IB_IFACE_ADDRESS_TYPE_LAST }; static const char *uct_ib_iface_addr_types[] = { [UCT_IB_ADDRESS_TYPE_LINK_LOCAL] = "ib_local", [UCT_IB_ADDRESS_TYPE_SITE_LOCAL] = "ib_site_local", [UCT_IB_ADDRESS_TYPE_GLOBAL] = "ib_global", [UCT_IB_ADDRESS_TYPE_ETH] = "eth", [UCT_IB_IFACE_ADDRESS_TYPE_AUTO] = "auto", [UCT_IB_IFACE_ADDRESS_TYPE_LAST] = NULL }; ucs_config_field_t uct_ib_iface_config_table[] = { {"", "", NULL, ucs_offsetof(uct_ib_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, {"TX_QUEUE_LEN", "256", "Length of send queue in the QP.", ucs_offsetof(uct_ib_iface_config_t, tx.queue_len), UCS_CONFIG_TYPE_UINT}, {"TX_MAX_BATCH", "16", "Number of send WQEs to batch in one post-send list. Larger values reduce\n" "the CPU usage, but increase the latency and pipelining between sender and\n" "receiver.", ucs_offsetof(uct_ib_iface_config_t, tx.max_batch), UCS_CONFIG_TYPE_UINT}, {"TX_MAX_POLL", "16", "Max number of receive completions to pick during TX poll", ucs_offsetof(uct_ib_iface_config_t, tx.max_poll), UCS_CONFIG_TYPE_UINT},
#include "cm.h" #include <uct/api/uct.h> #include <uct/ib/base/ib_iface.h> #include <uct/base/uct_pd.h> #include <ucs/arch/atomic.h> #include <ucs/async/async.h> #include <ucs/debug/log.h> #include <poll.h> #include <infiniband/arch.h> static ucs_config_field_t uct_cm_iface_config_table[] = { {"IB_", "RX_INLINE=0", NULL, ucs_offsetof(uct_cm_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_ib_iface_config_table)}, {"ASYNC_MODE", "thread", "Async mode to use", ucs_offsetof(uct_cm_iface_config_t, async_mode), UCS_CONFIG_TYPE_ENUM(ucs_async_mode_names)}, {"TIMEOUT", "300ms", "Timeout for MAD layer", ucs_offsetof(uct_cm_iface_config_t, timeout), UCS_CONFIG_TYPE_TIME}, {"RETRY_COUNT", "20", "Number of retries for MAD layer", ucs_offsetof(uct_cm_iface_config_t, retry_count), UCS_CONFIG_TYPE_UINT}, {"MAX_OP", "1024", "Maximal number of outstanding SIDR operations", ucs_offsetof(uct_cm_iface_config_t, max_outstanding), UCS_CONFIG_TYPE_UINT}, {NULL} };
#include <ucs/datastruct/mpool.inl> #include <ucs/datastruct/queue.h> #include <ucs/debug/log.h> #include <ucs/sys/compiler.h> #include <ucs/arch/bitops.h> #include <string.h> ucp_am_handler_t ucp_am_handlers[UCP_AM_ID_LAST] = {{0, NULL, NULL}}; static ucs_config_field_t ucp_config_table[] = { {"DEVICES", "all", "Specifies which device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices), UCS_CONFIG_TYPE_STRING_ARRAY}, {"TLS", "all", "Comma-separated list of transports to use. The order is not meaningful.\n" "In addition it's possible to use a combination of the following aliases:\n" " - all : use all the available transports." " - sm/shm : all shared memory transports.\n" " - ugni : ugni_rdma and ugni_udt.\n" " - rc : rc and cm." " - rc-x : rc with accelerated verbs and cm." " - ud-x : ud with accelerated verbs.\n", ucs_offsetof(ucp_config_t, tls), UCS_CONFIG_TYPE_STRING_ARRAY}, {"FORCE_ALL_DEVICES", "no", "Device selection policy.\n" "yes - force using of all the devices from the device list.\n"
* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. * See file LICENSE for terms. */ #include "cma_pd.h" #include "cma_iface.h" #include "cma_ep.h" #include <uct/api/addr.h> #include <uct/base/uct_pd.h> UCT_PD_REGISTER_TL(&uct_cma_pd_component, &uct_cma_tl); static ucs_config_field_t uct_cma_iface_config_table[] = { {"", "ALLOC=huge,mmap,heap", NULL, ucs_offsetof(uct_cma_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, {NULL} }; static ucs_status_t uct_cma_iface_get_address(uct_iface_t *tl_iface, struct sockaddr *addr) { uct_sockaddr_process_t *iface_addr = (void*)addr; iface_addr->sp_family = UCT_AF_PROCESS; iface_addr->node_guid = ucs_machine_guid(); iface_addr->id = getpid(); return UCS_OK; } static int uct_cma_iface_is_reachable(uct_iface_t *tl_iface,
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #include "ud_mlx5_common.h" ucs_config_field_t uct_ud_mlx5_iface_common_config_table[] = { {"COMPACT_AV", "yes", "Enable compact address-vector optimization.", ucs_offsetof(uct_ud_mlx5_iface_common_config_t, enable_compact_av), UCS_CONFIG_TYPE_BOOL}, {NULL} }; ucs_status_t uct_ud_mlx5_iface_common_init(uct_ud_mlx5_iface_common_t *iface, uct_ud_mlx5_iface_common_config_t *config) { iface->config.compact_av = config->enable_compact_av; return UCS_OK; } ucs_status_t uct_ud_mlx5_iface_get_av(uct_ib_iface_t *iface, uct_ud_mlx5_iface_common_t *ud_common_iface, const uct_ib_address_t *ib_addr, uint8_t path_bits, uct_ib_mlx5_base_av_t *base_av, struct mlx5_grh_av *grh_av, int *is_global)
ucp_am_handler_t ucp_am_handlers[UCP_AM_ID_LAST] = {{0, NULL, NULL}}; static const char *ucp_atomic_modes[] = { [UCP_ATOMIC_MODE_CPU] = "cpu", [UCP_ATOMIC_MODE_DEVICE] = "device", [UCP_ATOMIC_MODE_GUESS] = "guess", [UCP_ATOMIC_MODE_LAST] = NULL, }; static ucs_config_field_t ucp_config_table[] = { {"NET_DEVICES", "all", "Specifies which network device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_NET]), UCS_CONFIG_TYPE_STRING_ARRAY}, {"SHM_DEVICES", "all", "Specifies which shared memory device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_SHM]), UCS_CONFIG_TYPE_STRING_ARRAY}, {"ACC_DEVICES", "all", "Specifies which acceleration device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_ACC]), UCS_CONFIG_TYPE_STRING_ARRAY}, {"SELF_DEVICES", "all", "Specifies which loop-back device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_SELF]), UCS_CONFIG_TYPE_STRING_ARRAY},
#include <uct/ib/mlx5/ib_mlx5.h> #include <uct/ib/mlx5/ib_mlx5_log.h> #include <uct/ib/base/ib_device.h> #include <uct/tl/context.h> #include <ucs/debug/log.h> #include "rc_mlx5.h" #define UCT_RC_MLX5_SRQ_STRIDE (sizeof(struct mlx5_wqe_srq_next_seg) + \ sizeof(struct mlx5_wqe_data_seg)) ucs_config_field_t uct_rc_mlx5_iface_config_table[] = { {"RC_", "", NULL, ucs_offsetof(uct_rc_mlx5_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_rc_iface_config_table)}, {NULL} }; #if ENABLE_STATS ucs_stats_class_t uct_rc_mlx5_iface_stats_class = { .name = "mlx5", .num_counters = UCT_RC_MLX5_IFACE_STAT_LAST, .counter_names = { [UCT_RC_MLX5_IFACE_STAT_RX_INL_32] = "rx_inl_32", [UCT_RC_MLX5_IFACE_STAT_RX_INL_64] = "rx_inl_64" } }; #endif
* Copyright (C) Mellanox Technologies Ltd. 2017-2019. ALL RIGHTS RESERVED. * See file LICENSE for terms. */ #include "gdr_copy_iface.h" #include "gdr_copy_md.h" #include "gdr_copy_ep.h" #include <ucs/type/class.h> #include <ucs/sys/string.h> static ucs_config_field_t uct_gdr_copy_iface_config_table[] = { {"", "", NULL, ucs_offsetof(uct_gdr_copy_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, {NULL} }; /* Forward declaration for the delete function */ static void UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_iface_t)(uct_iface_t*); static ucs_status_t uct_gdr_copy_iface_get_address(uct_iface_h tl_iface, uct_iface_addr_t *iface_addr) { uct_gdr_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_gdr_copy_iface_t); *(uct_gdr_copy_iface_addr_t*)iface_addr = iface->id; return UCS_OK;
#include <ucs/datastruct/mpool.inl> #include <ucs/datastruct/queue.h> #include <ucs/debug/log.h> #include <ucs/sys/compiler.h> #include <ucs/arch/bitops.h> #include <string.h> ucp_am_handler_t ucp_am_handlers[UCP_AM_ID_LAST] = {{0, NULL, NULL}}; static ucs_config_field_t ucp_config_table[] = { {"NET_DEVICES", "all", "Specifies which network device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_NET]), UCS_CONFIG_TYPE_STRING_ARRAY}, {"SHM_DEVICES", "all", "Specifies which shared memory device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_SHM]), UCS_CONFIG_TYPE_STRING_ARRAY}, {"ACC_DEVICES", "all", "Specifies which acceleration device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices[UCT_DEVICE_TYPE_ACC]), UCS_CONFIG_TYPE_STRING_ARRAY}, {"TLS", "all", "Comma-separated list of transports to use. The order is not meaningful.\n" "In addition it's possible to use a combination of the following aliases:\n" " - all : use all the available transports.\n"
#include "ib_md.h" #include "ib_device.h" #include <ucs/arch/atomic.h> #include <pthread.h> #define UCT_IB_MD_PREFIX "ib" #define UCT_IB_MEM_ACCESS_FLAGS (IBV_ACCESS_LOCAL_WRITE | \ IBV_ACCESS_REMOTE_WRITE | \ IBV_ACCESS_REMOTE_READ | \ IBV_ACCESS_REMOTE_ATOMIC) static ucs_config_field_t uct_ib_md_config_table[] = { {"", "", NULL, ucs_offsetof(uct_ib_md_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_md_config_table)}, {"RCACHE", "try", "Enable using memory registration cache", ucs_offsetof(uct_ib_md_config_t, rcache.enable), UCS_CONFIG_TYPE_TERNARY}, {"RCACHE_MEM_PRIO", "1000", "Registration cache memory event priority", ucs_offsetof(uct_ib_md_config_t, rcache.event_prio), UCS_CONFIG_TYPE_UINT}, {"RCACHE_OVERHEAD", "90ns", "Registration cache lookup overhead", ucs_offsetof(uct_ib_md_config_t, rcache.overhead), UCS_CONFIG_TYPE_TIME}, {"MEM_REG_OVERHEAD", "16us", "Memory registration overhead", /* TODO take default from device */ ucs_offsetof(uct_ib_md_config_t, uc_reg_cost.overhead), UCS_CONFIG_TYPE_TIME}, {"MEM_REG_GROWTH", "0.06ns", "Memory registration growth rate", /* TODO take default from device */ ucs_offsetof(uct_ib_md_config_t, uc_reg_cost.growth), UCS_CONFIG_TYPE_TIME},
* See file LICENSE for terms. */ #include "rc_verbs_common.h" #include <uct/api/uct.h> #include <ucs/arch/bitops.h> #include <uct/ib/rc/base/rc_iface.h> ucs_config_field_t uct_rc_verbs_iface_common_config_table[] = { {"MAX_AM_HDR", "128", "Buffer size to reserve for active message headers. If set to 0, the transport will\n" "not support zero-copy active messages.", ucs_offsetof(uct_rc_verbs_iface_common_config_t, max_am_hdr), UCS_CONFIG_TYPE_MEMUNITS}, {"TX_MAX_WR", "-1", "Limits the number of outstanding posted work requests. The actual limit is\n" "a minimum between this value and the TX queue length. -1 means no limit.", ucs_offsetof(uct_rc_verbs_iface_common_config_t, tx_max_wr), UCS_CONFIG_TYPE_UINT}, {NULL} }; void uct_rc_verbs_iface_common_query(uct_rc_verbs_iface_common_t *verbs_iface, uct_rc_iface_t *iface, uct_iface_attr_t *iface_attr) { /* PUT */ iface_attr->cap.put.max_short = verbs_iface->config.max_inline; iface_attr->cap.put.max_bcopy = iface->super.config.seg_size;
* See file LICENSE for terms. */ #include "rc_verbs.h" #include <uct/api/uct.h> #include <uct/ib/base/ib_device.h> #include <uct/ib/base/ib_log.h> #include <uct/tl/context.h> #include <ucs/debug/log.h> #include <string.h> ucs_config_field_t uct_rc_verbs_iface_config_table[] = { {"RC_", "", NULL, ucs_offsetof(uct_rc_verbs_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_rc_iface_config_table)}, {"MAX_AM_HDR", "128", "Buffer size to reserve for active message headers. If set to 0, the transport will\n" "not support zero-copy active messages.", ucs_offsetof(uct_rc_verbs_iface_config_t, max_am_hdr), UCS_CONFIG_TYPE_MEMUNITS}, {NULL} }; static UCS_F_NOINLINE unsigned uct_rc_verbs_iface_post_recv_always(uct_rc_verbs_iface_t *iface, unsigned max) { struct ibv_recv_wr *bad_wr; uct_ib_recv_wr_t *wrs; unsigned count;
#include <ucs/debug/log.h> #include <sys/mman.h> #include <ucs/sys/sys.h> #define UCT_MM_POSIX_SHM_OPEN_MODE (0666) #define UCT_MM_POSIX_MMAP_PROT (PROT_READ | PROT_WRITE) #define UCT_MM_POSIX_HUGETLB UCS_BIT(0) typedef struct uct_posix_pd_config { uct_mm_pd_config_t super; char *path; } uct_posix_pd_config_t; static ucs_config_field_t uct_posix_pd_config_table[] = { {"MM_", "", NULL, ucs_offsetof(uct_posix_pd_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_mm_pd_config_table)}, {"DIR", "/dev/shm", "The path to the backing file", ucs_offsetof(uct_posix_pd_config_t, path), UCS_CONFIG_TYPE_STRING}, {NULL} }; static ucs_status_t uct_posix_test_mem(size_t length, int shm_fd) { int *buf; int chunk_size = 256 * 1024; ucs_status_t status = UCS_OK; size_t size_to_write, remaining; ssize_t single_write;
* Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. * See file LICENSE for terms. */ #include "self_iface.h" #include "self_md.h" #include "self_ep.h" #include <uct/sm/base/sm_ep.h> #include <ucs/type/class.h> #include <ucs/sys/string.h> static ucs_config_field_t uct_self_iface_config_table[] = { {"", "", NULL, ucs_offsetof(uct_self_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, UCT_IFACE_MPOOL_CONFIG_FIELDS("", 16384, 16, "", ucs_offsetof(uct_self_iface_config_t, mp), ""), {NULL} }; static ucs_status_t uct_self_iface_query(uct_iface_h iface, uct_iface_attr_t *attr) { uct_self_iface_t *self_iface = ucs_derived_of(iface, uct_self_iface_t); ucs_trace_func("iface=%p", iface); memset(attr, 0, sizeof(*attr));
#include "gdr_copy_md.h" #include <string.h> #include <limits.h> #include <ucs/debug/log.h> #include <ucs/sys/sys.h> #include <ucs/debug/memtrack.h> #include <ucs/type/class.h> #include <cuda_runtime.h> #include <cuda.h> #define UCT_GDR_COPY_MD_RCACHE_DEFAULT_ALIGN 65536 static ucs_config_field_t uct_gdr_copy_md_config_table[] = { {"", "", NULL, ucs_offsetof(uct_gdr_copy_md_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_md_config_table)}, {"RCACHE", "try", "Enable using memory registration cache", ucs_offsetof(uct_gdr_copy_md_config_t, enable_rcache), UCS_CONFIG_TYPE_TERNARY}, {"", "RCACHE_ADDR_ALIGN=" UCS_PP_MAKE_STRING(UCT_GDR_COPY_MD_RCACHE_DEFAULT_ALIGN), NULL, ucs_offsetof(uct_gdr_copy_md_config_t, rcache), UCS_CONFIG_TYPE_TABLE(uct_md_config_rcache_table)}, {"MEM_REG_OVERHEAD", "16us", "Memory registration overhead", /* TODO take default from device */ ucs_offsetof(uct_gdr_copy_md_config_t, uc_reg_cost.overhead), UCS_CONFIG_TYPE_TIME}, {"MEM_REG_GROWTH", "0.06ns", "Memory registration growth rate", /* TODO take default from device */ ucs_offsetof(uct_gdr_copy_md_config_t, uc_reg_cost.growth), UCS_CONFIG_TYPE_TIME}, {NULL}
*/ #include "ib_pd.h" #include "ib_device.h" #define UCT_IB_PD_PREFIX "ib" #define UCT_IB_MEM_ACCESS_FLAGS (IBV_ACCESS_LOCAL_WRITE | \ IBV_ACCESS_REMOTE_WRITE | \ IBV_ACCESS_REMOTE_READ | \ IBV_ACCESS_REMOTE_ATOMIC) static ucs_config_field_t uct_ib_pd_config_table[] = { {"", "", NULL, ucs_offsetof(uct_ib_pd_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_pd_config_table)}, {"RCACHE", "try", "Enable using memory registration cache", ucs_offsetof(uct_ib_pd_config_t, rcache.enable), UCS_CONFIG_TYPE_TERNARY}, {"RCACHE_MEM_PRIO", "1000", "Registration cache memory event priority", ucs_offsetof(uct_ib_pd_config_t, rcache.event_prio), UCS_CONFIG_TYPE_UINT}, {NULL} }; #if ENABLE_STATS static ucs_stats_class_t uct_ib_pd_stats_class = { .name = "", .num_counters = UCT_IB_PD_STAT_LAST, .counter_names = {
* See file LICENSE for terms. */ #include "ucp_int.h" #include <ucs/config/parser.h> #include <ucs/debug/log.h> #include <ucs/sys/sys.h> #include <string.h> static ucs_config_field_t ucp_config_table[] = { { "DEVICES", "all", "Specifies which device(s) to use. The order is not meaningful.\n" "\"all\" would use all available devices.", ucs_offsetof(ucp_config_t, devices), UCS_CONFIG_TYPE_STRING_ARRAY }, { "TLS", "all", "Comma-separated list of transports to use. The order is not meaningful.\n" "all - use all the available transports.", ucs_offsetof(ucp_config_t, tls), UCS_CONFIG_TYPE_STRING_ARRAY }, { "FORCE_ALL_DEVICES", "no", "Device selection policy.\n" "yes - force using of all the devices from the device list.\n" "no - try using the available devices from the device list.", ucs_offsetof(ucp_config_t, force_all_devices), UCS_CONFIG_TYPE_BOOL },
#include "dc_mlx5.h" #include <uct/api/uct.h> #include <uct/ib/base/ib_device.h> #include <uct/ib/base/ib_log.h> #include <uct/ib/mlx5/ib_mlx5_log.h> #include <uct/base/uct_md.h> #include <ucs/arch/bitops.h> #include <ucs/arch/cpu.h> #include <ucs/debug/log.h> #include <string.h> static ucs_config_field_t uct_dc_mlx5_iface_config_table[] = { {"DC_", "", NULL, ucs_offsetof(uct_dc_mlx5_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_dc_iface_config_table)}, {"", "", NULL, ucs_offsetof(uct_dc_mlx5_iface_config_t, ud_common), UCS_CONFIG_TYPE_TABLE(uct_ud_mlx5_iface_common_config_table)}, {NULL} }; static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_ep_t, uct_iface_t *tl_iface, const uct_device_addr_t *dev_addr, const uct_iface_addr_t *iface_addr) { uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_iface, uct_dc_mlx5_iface_t); const uct_ib_address_t *ib_addr = (const uct_ib_address_t *)dev_addr;
#include "mm_iface.h" #include "mm_ep.h" #include <uct/base/uct_worker.h> #include <uct/sm/base/sm_ep.h> #include <uct/sm/base/sm_iface.h> #include <ucs/arch/atomic.h> #include <ucs/arch/bitops.h> #include <ucs/async/async.h> #include <ucs/sys/string.h> #include <sys/poll.h> static ucs_config_field_t uct_mm_iface_config_table[] = { {"", "ALLOC=md", NULL, ucs_offsetof(uct_mm_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, {"FIFO_SIZE", "64", "Size of the receive FIFO in the memory-map UCTs.", ucs_offsetof(uct_mm_iface_config_t, fifo_size), UCS_CONFIG_TYPE_UINT}, {"FIFO_RELEASE_FACTOR", "0.5", "Frequency of resource releasing on the receiver's side in the MM UCT.\n" "This value refers to the percentage of the FIFO size. (must be >= 0 and < 1)", ucs_offsetof(uct_mm_iface_config_t, release_fifo_factor), UCS_CONFIG_TYPE_DOUBLE}, UCT_IFACE_MPOOL_CONFIG_FIELDS("RX_", -1, 256, "receive", ucs_offsetof(uct_mm_iface_config_t, mp), ""), {"FIFO_HUGETLB", "no",
[UCS_HANDLE_ERROR_FREEZE] = "freeze", [UCS_HANDLE_ERROR_DEBUG] = "debug", [UCS_HANDLE_ERROR_LAST] = NULL }; static UCS_CONFIG_DEFINE_ARRAY(signo, sizeof(int), UCS_CONFIG_TYPE_SIGNO); static ucs_config_field_t ucs_global_opts_table[] = { {"LOG_LEVEL", "warn", "UCS logging level. Messages with a level higher or equal to the selected " "will be printed.\n" "Possible values are: fatal, error, warn, info, debug, trace, data, func, poll.", ucs_offsetof(ucs_global_opts_t, log_level), UCS_CONFIG_TYPE_ENUM(ucs_log_level_names)}, {"LOG_FILE", "", "If not empty, UCS will print log messages to the specified file instead of stdout.\n" "The following substitutions are performed on this string:\n" " %p - Replaced with process ID\n" " %h - Replaced with host name\n", ucs_offsetof(ucs_global_opts_t, log_file), UCS_CONFIG_TYPE_STRING}, {"LOG_BUFFER", "1024", "Buffer size for a single log message.", ucs_offsetof(ucs_global_opts_t, log_buffer_size), UCS_CONFIG_TYPE_MEMUNITS}, {"LOG_DATA_SIZE", "0", "How much packet payload to print, at most, in data mode.",
#include <pmi.h> #include "ucs/type/class.h" #include "uct/base/uct_pd.h" #include <ucs/arch/cpu.h> #include <uct/ugni/base/ugni_iface.h> #include "ugni_rdma_iface.h" #include "ugni_rdma_ep.h" static ucs_config_field_t uct_ugni_rdma_iface_config_table[] = { /* This tuning controls the allocation priorities for bouncing buffers */ { "", "MAX_SHORT=2048;MAX_BCOPY=2048;ALLOC=huge,mmap,heap", NULL, ucs_offsetof(uct_ugni_rdma_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, UCT_IFACE_MPOOL_CONFIG_FIELDS("RDMA", -1, 0, "rdma", ucs_offsetof(uct_ugni_rdma_iface_config_t, mpool), "\nAttention: Setting this param with value != -1 is a dangerous thing\n" "and could cause deadlock or performance degradation."), {NULL} }; static ucs_status_t uct_ugni_rdma_query_tl_resources(uct_pd_h pd, uct_tl_resource_desc_t **resource_p, unsigned *num_resources_p) { return uct_ugni_query_tl_resources(pd, UCT_UGNI_RDMA_TL_NAME, resource_p, num_resources_p);
* See file LICENSE for terms. */ #include "cuda_copy_iface.h" #include "cuda_copy_md.h" #include "cuda_copy_ep.h" #include <ucs/type/class.h> #include <ucs/sys/string.h> #include <ucs/arch/cpu.h> static ucs_config_field_t uct_cuda_copy_iface_config_table[] = { {"", "", NULL, ucs_offsetof(uct_cuda_copy_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, {"MAX_POLL", "16", "Max number of event completions to pick during cuda events polling", ucs_offsetof(uct_cuda_copy_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, {"MAX_EVENTS", "1024", "Max number of cuda events. -1 is infinite", ucs_offsetof(uct_cuda_copy_iface_config_t, max_cuda_events), UCS_CONFIG_TYPE_UINT}, {NULL} }; /* Forward declaration for the delete function */
* See file LICENSE for terms. */ #include <pmi.h> #include "ucs/type/class.h" #include <ucs/arch/cpu.h> #include <uct/ugni/base/ugni_iface.h> #include "ugni_smsg_iface.h" #include "ugni_smsg_ep.h" #define UCT_UGNI_SMSG_TL_NAME "ugni_smsg" static ucs_config_field_t uct_ugni_smsg_iface_config_table[] = { {"", "ALLOC=huge,mmap,heap", NULL, ucs_offsetof(uct_ugni_iface_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, UCT_IFACE_MPOOL_CONFIG_FIELDS("SMSG", -1, 0, "smsg", ucs_offsetof(uct_ugni_iface_config_t, mpool), "\nAttention: Setting this param with value != -1 is a dangerous thing\n" "and could cause deadlock or performance degradation."), {NULL} }; static ucs_status_t progress_local_cq(uct_ugni_smsg_iface_t *iface){ gni_return_t ugni_rc; gni_cq_entry_t event_data; uct_ugni_smsg_desc_t message_data; uct_ugni_smsg_desc_t *message_pointer;
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #include "ud_iface_common.h" #include <ucs/sys/compiler.h> ucs_config_field_t uct_ud_iface_common_config_table[] = { {"RX_QUEUE_LEN_INIT", "128", "Initial length of receive queue, before the interface is activated.", ucs_offsetof(uct_ud_iface_common_config_t, rx_queue_len_init), UCS_CONFIG_TYPE_UINT}, {NULL} };