Use binary search for direct function calls (#1057)

* Use binary search for direct function calls

* fix scratch mem issue on MI300
This commit is contained in:
Bertan Dogancay
2024-01-22 17:37:56 -07:00
committed by GitHub
parent c4dbf8a914
commit 5564d65e71
2 changed files with 58 additions and 65 deletions
+1 -10
View File
@@ -10,6 +10,7 @@
#include "collectives.h"
#include "devcomm.h"
#include "device_table.h"
#if defined(__gfx908__) || defined(__gfx940__) || defined(__gfx941__) || defined(__gfx942__)
#define COLL_UNROLL 2
@@ -32,16 +33,6 @@
{ __atomic_store_n((DST), (SRC), __ATOMIC_SEQ_CST); }
#endif
// Must be consistent with the ncclFuncSet enum
using ncclKernelFunc_t = void (*)();
// Defined in device_table.cpp
extern __device__ ncclKernelFunc_t const ncclFuncs[];
#ifndef USE_INDIRECT_FUNCTION_CALL
__device__ void NCCL_CALL_FUNCTIONS(unsigned short funcIndex) noexcept;
#endif
template <ncclFunc_t FUNCTION, int ALGO, int PROTO, class REDOP, typename T, int UNROLL>
class ncclFunction {
public: