Files
rocm-systems/ext-tuner/example/plugin.c
T

27 wiersze
1.1 KiB
C
Czysty Zwykły widok Historia

2023-09-26 05:47:28 -07:00
/*************************************************************************
* Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
*
* See LICENSE.txt for license information
************************************************************************/
#include "tuner.h"
#define __hidden __attribute__ ((visibility("hidden")))
2024-03-26 06:08:55 -07:00
__hidden ncclResult_t pluginInit(size_t nRanks, size_t nNodes, ncclDebugLogger_t logFunction, void **context) { return ncclSuccess; }
2023-09-26 05:47:28 -07:00
2024-03-26 06:08:55 -07:00
__hidden ncclResult_t pluginGetCollInfo(void* context, ncclFunc_t collType, size_t nBytes,
2023-09-26 05:47:28 -07:00
int collNetSupport, int nvlsSupport, int numPipeOps,
int *algorithm, int *protocol, int* nChannels) { *algorithm = NCCL_ALGO_RING; *protocol = NCCL_PROTO_SIMPLE; return ncclSuccess; }
2024-03-26 06:08:55 -07:00
__hidden ncclResult_t pluginDestroy(void* context) { return ncclSuccess; }
2023-09-26 05:47:28 -07:00
#define PLUGIN_NAME "Example"
2024-03-26 06:08:55 -07:00
const ncclTuner_v2_t ncclTunerPlugin_v2 = {
2023-09-26 05:47:28 -07:00
.name = PLUGIN_NAME,
.init = pluginInit,
.getCollInfo = pluginGetCollInfo,
.destroy = pluginDestroy
};