Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tree): use empty brace initializers for zero-initialization #594

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/nccl_ofi_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ static inline int process_completions(struct fi_cq_data_entry *cq_entry, uint64_
static inline int process_err_completion(nccl_net_ofi_rdma_device_t *device,
struct fid_cq *cq)
{
struct fi_cq_err_entry err_entry = { 0 };
struct fi_cq_err_entry err_entry = {};
nccl_net_ofi_rdma_req_t *req = NULL;
int ret = 0;

Expand Down Expand Up @@ -6704,7 +6704,7 @@ static inline int init_device_rail_ofi_resources(nccl_net_ofi_rdma_device_rail_t

if (ofi_nccl_endpoint_per_communicator() != 0) {
/* Create device-shared completion queue */
struct fi_cq_attr cq_attr = {0};
struct fi_cq_attr cq_attr = {};
cq_attr.format = FI_CQ_FORMAT_DATA;
ret = fi_cq_open(rail_dev->domain, &cq_attr, &rail_dev->cq, NULL);
if (OFI_UNLIKELY(ret != 0)) {
Expand Down
4 changes: 2 additions & 2 deletions src/nccl_ofi_sendrecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static int ofi_process_cq(struct fid_cq *cq, uint64_t max_tag)
{
ssize_t rc = 0;
int ret = 0;
struct fi_cq_err_entry err_buffer = { 0 };
struct fi_cq_err_entry err_buffer = {};
struct fi_cq_tagged_entry cqe_tagged_buffers[cq_read_count];
nccl_net_ofi_sendrecv_req_t *req = NULL;

Expand Down Expand Up @@ -1821,7 +1821,7 @@ static inline int create_send_comm(nccl_net_ofi_conn_handle_t *handle,
nccl_net_ofi_sendrecv_ep_t *ep,
nccl_net_ofi_sendrecv_send_comm_t **s_comm)
{
char remote_ep_addr[MAX_EP_ADDR] = {0};
char remote_ep_addr[MAX_EP_ADDR] = {};
uint64_t tag = 0ULL;
uint64_t max_tag = 0;
size_t req_size = sizeof(nccl_net_ofi_sendrecv_req_t);
Expand Down
6 changes: 3 additions & 3 deletions src/nccl_ofi_topo.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ static int lift_up_ofi_infos(nccl_ofi_topo_t *topo)
* topology nodes that have a "NIC topology nodes" or a
* "accelerator topology nodes" it their subtree, all info
* structs are found. */
nccl_ofi_topo_data_iterator_t data_iter;
nccl_ofi_topo_data_iterator_t data_iter = {};
nccl_ofi_topo_set_to_begin(topo, &data_iter);
while ((source_data = nccl_ofi_get_user_data(&data_iter))) {
nccl_ofi_inc_user_data_iter(&data_iter);
Expand Down Expand Up @@ -878,7 +878,7 @@ static int create_groups_from_info_lists(nccl_ofi_topo_t *topo)
nccl_ofi_topo_data_t *data = NULL;

/* Iterate over user data of topology nodes */
nccl_ofi_topo_data_iterator_t data_iter;
nccl_ofi_topo_data_iterator_t data_iter = {};
nccl_ofi_topo_set_to_begin(topo, &data_iter);
while ((data = nccl_ofi_get_user_data(&data_iter))) {
nccl_ofi_inc_user_data_iter(&data_iter);
Expand Down Expand Up @@ -917,7 +917,7 @@ static int create_groups_from_info_lists(nccl_ofi_topo_t *topo)
*/
static void print_nic_groups(nccl_ofi_topo_t *topo) {
nccl_ofi_topo_data_t *data = NULL;
nccl_ofi_topo_data_iterator_t data_iter;
nccl_ofi_topo_data_iterator_t data_iter = {};
nccl_ofi_topo_set_to_begin(topo, &data_iter);

int group_idx = 0;
Expand Down
Loading