Skip to content

Null cast #72

@r-barnes

Description

@r-barnes

This looks bad:

In file included from buck-out/v2/gen/fbcode/6db5ac18a0c7a447/comms/rcclx/__generate_collectives__/out/develop/src/device/all_gather_sum_i8.hip:2:
buck-out/v2/gen/fbcode/comms/rcclx/__rccl_objects__/81d40f005b45f43a/buck-headers/all_gather.h:71:135: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
   70 |       Primitives<T, RedOp, FanSymmetric<1>, 0, Proto, 0, isNetOffload> prims
      |                                                                        ~~~~~
   71 |         (tid, workNthreads, &ring->prev, &ring->next, inputBuf, outputBuf, work->redOpArg, 0, work->connIndex, work->connIndex, work, NULL, isNetOffload ? NCCL_MAX_NET_SIZE : 0);
      |                                                                                                                                       ^~~~
      |                                                                                                                                       false

especially with that actual boolean right next door to the NULL.

Enabling -Wnull-conversion in your project and using the now-standard nullptr would prevent these issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions