NVIDIA / NVIDIA/nccl

[Question]: NCCL Symmetric Memory: ncclSymkMask Logic Issue

Open
#2,014 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C++
Stars
5.1k
Forks
1.4k
Avg merge
2h 3m
Merged PRs (30d)
2

Description

Issue

ncclSymkImplemented() only returns true for ncclDevSum:

case ncclFuncAllReduce:
case ncclFuncReduceScatter:
    return red == ncclDevSum && isFloat && ty != ncclFloat64;

However, ncclSymkMask() sets hasLDMC = true for ncclDevMinMax on multiple types:

case ncclInt32:
case ncclUint32:
case ncclInt64:
case ncclUint64:
case ncclFloat16:
case ncclBfloat16:
    hasLDMC = red == ncclDevSum || red == ncclDevMinMax;
    break;
case ncclFloat8e4m3:
case ncclFloat8e5m2:
    hasLDMC = red == ncclDevSum || red == ncclDevMinMax;
    hasLDMC &= comm->compCap >= 100;
    break;

But since ncclSymkImplemented() returns false for:

  1. All min/max operations (any type)
  2. All integer types (any operation)

The checks in ncclSymkMask() for integers and min/max are dead code.

Questions

  1. Is min/max support intended for symmetric memory kernels?

    • ncclSymkMask() has code supporting min/max for Float8/Float16/Bfloat16/Int32/Int64
    • But ncclSymkImplemented() returns false for min/max
  2. Is integer type support intended?

    • ncclSymkMask() checks integer types (int32/64, uint32/64)
    • But ncclSymkImplemented() returns false for all integer types

Required Changes

If the above features are intended:

  1. Update ncclSymkImplemented() to allow:

    • Min/max operations for supported types
    • Integer types for AllReduce/ReduceScatter
  2. Update generate.py to add integer types:

    all_tys = ["f32", "f16", "bf16", "f8e4m3", "f8e5m2", "i32", "i64", "u32", "u64"]
    

Impact

  1. Min/max operations: Cannot use symmetric memory kernels on ANY data type
  2. Integer types: Cannot use symmetric memory kernels for AllReduce/ReduceScatter

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing ncclSymkImplemented() with the ncclSymkMask() cases to establish which reduction and type combinations are intended to be supported. Then inspect generate.py and the surrounding symmetric-memory implementation; done means the support checks and generated type list consistently reflect the decided min/max and integer support.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.