meta-pytorch / meta-pytorch/torchcomms
Null cast
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 396
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the generated all_gather.h around line 71 and trace which source produces the NULL argument passed beside the boolean isNetOffload. Enable -Wnull-conversion to reproduce the warning, then replace the relevant null pointer constant with nullptr and verify that the warning is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100