".github/workflows/build-x86-64-immortalwrt-24.10.yml" did not exist on "256f7d704007c02785797da94902c9ccedc44e37"
msccl_scheduler.h 1.54 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*************************************************************************
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 ************************************************************************/

#ifndef MSCCL_SCHEDULER_H_
#define MSCCL_SCHEDULER_H_

typedef enum { mscclFuncReduce             =  0,
               mscclFuncBroadcast          =  1,
               mscclFuncAllReduce          =  2,
               mscclFuncReduceScatter      =  3,
               mscclFuncAllGather          =  4,
               mscclFuncSend               =  5,
               mscclFuncRecv               =  6,
               mscclFuncGather             =  7,
               mscclFuncScatter            =  8,
               mscclFuncAllToAll           =  9,
               mscclFuncAllToAllv          =  10,
               mscclNumFuncs               =  11 } mscclFunc_t;

struct mscclSchedulerParam {
  const void* sendBuff;
  const size_t* sendCounts;
  const size_t* sDisPls;
  void* recvBuff;
  const size_t* recvCounts;
  const size_t* rDisPls;
  size_t count;
  ncclDataType_t dataType;
  int root;
  int peer;
  ncclRedOp_t op;
  mscclFunc_t func;
  int rank;
  int nRanks;
  bool scheduled;
  mscclAlgoHandle_t handle;
  uint64_t opCount;
};

typedef struct {
  // Name of the scheduler (mainly for logs)
  const char* name;
  // Load all algorithms
  ncclResult_t (*init)();
  // Select an algorithm
  ncclResult_t (*selectAlgo)(struct mscclSchedulerParam* param);
  // Unload all algorithms
  ncclResult_t (*teardown)();
} mscclSchedulerInterface;

#endif