NCCL 2.28.3-1
Device API (Experimental) * Introduces device-side APIs to integrate NCCL communication directly into application kernels. * Supports LSA (Load/Store Access) for CUDA P2P communication over NVLink and some PCIe platforms. * Supports Multimem for hardware multicast using NVLink SHARP. * Adds initial framework for GIN (GPU-Initiated Networking), currently under development. * Introduces device communicators created using ncclDevCommCreate. * Enables device-side communication operations with synchronization (ncclLsaBarrierSession) and memory accessors (ncclGetLsaPointer, ncclGetLsaMultimemPointer). * Experimental APIs - signatures and functionality may evolve in future releases. * No ABI compatibility is guaranteed — applications must be recompiled with each new NCCL release. Symmetric memory improvements * Support for aggregating symmetric operations using ncclGroupStart/End APIs. * Reimplement symmetric kernels using device API. New Host APIs * Introduce new host collective APIs: ncclAlltoAll, ncclScatter, ncclGather. CE (Copy Engine) Collectives * Reduce SM utilization for alltoall, scatter, gather, and allgather within a single (MN)NVL domain. * Free up SM capacity for the application to do computation at the same time. * To enable the feature for ncclAllGather, ncclAlltoAll, ncclGather, ncclScatter, register buffers into symmetric windows and use the NCCL_CTA_POLICY_ZERO flag in the communicator config_t. NCCL Inspector Plugin * Introduces an Inspector plugin for always-on performance monitoring. * Produces structured JSON output with metadata, execution time, bandwidth, and optional event traces for each NCCL operation. * Enables integration with analysis tools such as Performance Exporter to visualize NCCL performance bottlenecks. * Lightweight to enable via environment variables NCCL_PROFILER_PLUGIN and NCCL_INSPECTOR_ENABLE. CMake support (Experiemental) * Adds a CMake build system as an alternative to existing Makefiles. * Known issues: pkg.build and Device API currently do not work with CMake. * The known issues will be addressed in a future release. Decreased max CTA count from 32 to 16 on Blackwell * SM overhead is decreased by 50% with this improvement. * This may cause some perf drop on Blackwell because of the reduced SM usage. * If the extra SM capacity is not desired, two options are available to restore to previous behavior: 1) Setting NCCL_MIN_CTAS=32 NCCL_MAX_CTAS=32 environment variables; 2) setting communicator config to over-write max CTA count to 32. * Based on community feedback, future versions may consider different trade-offs between performance and SM overhead. Plugins * Network * App-aware Network plugin. NCCL passes information about communication operations to be executed on the network end point. This allows for better tuning of network end points and their use in the plugins. * Improve handling of physical and virtual network devices and load/unload. * Network plugin version 11 - add explicit context and communication ID support for per communicator init/finalize. * Add Multi-Request Net API. Using this will help NCCL to anticipate multiple send/recv requests and optimize for it. See maxMultiRequestSize field in ncclNetProperties_v11_t. * Profiler * Add support for API events (group, collective, and p2p) and for tracking kernel launches in the profiler plugin. * Add Inspector Profiler Plugin (see section above). * Add a hook to Google’s CoMMA profiler on github. * Tuner * Expose NCCL tuning constants at tuner initialization via ncclTunerConstants_v5_t. * Add NVL Domain Information API. * Support multiple plugin types from a single shared object. New Parameterization and ncclConfig changes: * Add new option NCCL_MNNVL_CLIQUE_ID=-2 which will use rack serial number to partition the MNNVL clique. This will limit NVLink domains to GPUs within a single rack. * Add NCCL_NETDEVS_POLICY to control how NET devices are assigned to GPUs. The default (AUTO) is the policy used in previous versions. * Add NCCL_SINGLE_PROC_MEM_REG_ENABLE control variable to enable NVLS UB registration in the “one process, multiple ranks” case as opt in. * Move nChannelsPerNetPeer into ncclConfig. NCCL_NCHANNELS_PER_NET_PEER can override the value in ncclConfig. * Enable PxN over C2C by default * PxN over C2C will improve performance for Grace-Blackwell platforms by allowing NCCL to leverage the NIC attached to a peer GPU over NVLINK, C2C, and PCIe. * This behavior can be overridden by setting NCCL_PXN_C2C=0. Other Improvements: * Allow FP8 support for non-reductive operations on pre sm90 devices. (See https://github.com/pytorch/pytorch/pull/151594#discussion_r2135777776) * Fix NVLS+CollNet and temporarily disables COLLNET_CHAIN for >8 GPUs. * Only consider running interfaces for socket traffic. NCCL will not attempt to use interfaces that do not have the IFF_RUNNING bit. (https://github.com/NVIDIA/nccl/issues/1798) * Modernize mutex management. Convert to std::mutex and std::lock_guard. * Remove sm35 and sm50 GENCODE targets which have long been deprecated and were causing issues with the latest NCCL release builds. * Improved NVLS/NVLSTree tuning prediction to improve algorithm and protocol selection. * NVLSTree Tuning Fixes. Update tuning data for H100, GB200-NV72. * Respond better to RoCE link flaps. Instead of reporting an “unknown event” it will now report “GID table changed”. * Move libvirt bridge interface to the end of possible interfaces so that they are considered last. These interfaces are usually virtual bridges to relay traffic to containers running on the host and cannot be used for traffic to a remote node and are therefore unsuitable.
이 커밋은 다음에 포함됨:
@@ -97,12 +97,12 @@ int test_plugin_init() {
|
||||
void* context = NULL;
|
||||
|
||||
// Test successful initialization
|
||||
ncclResult_t result = pluginInit(8, 2, mock_logger, &context);
|
||||
ncclResult_t result = pluginInit(&context, 0, 8, 2, mock_logger, NULL, NULL);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin init should succeed");
|
||||
TEST_ASSERT(context != NULL, "Context should be allocated");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
TEST_PASS();
|
||||
}
|
||||
|
||||
@@ -122,11 +122,11 @@ int test_config_parsing_valid() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_valid.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(16, 2, mock_logger, &context);
|
||||
ncclResult_t result = pluginInit(&context, 0, 16, 2, mock_logger, NULL, NULL);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin init with valid config should succeed");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_valid.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -143,12 +143,12 @@ int test_config_parsing_invalid() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_invalid.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(8, 1, mock_logger, &context);
|
||||
ncclResult_t result = pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
// Should still succeed but with no valid configs loaded
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin init should succeed even with invalid config");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_invalid.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -164,7 +164,7 @@ int test_collective_matching() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_match.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context);
|
||||
pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
|
||||
// Create mock cost table
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
@@ -208,7 +208,7 @@ int test_collective_matching() {
|
||||
TEST_ASSERT(nChannels == 4, "Should set 4 channels");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_match.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -225,7 +225,7 @@ int test_size_matching() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_size.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context);
|
||||
pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
float* cost_table_ptr[NCCL_NUM_ALGORITHMS];
|
||||
@@ -279,7 +279,7 @@ int test_size_matching() {
|
||||
TEST_ASSERT(nChannels == 8, "Large: Should set 8 channels");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_size.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -297,7 +297,7 @@ int test_topology_matching() {
|
||||
|
||||
// Test with single node setup
|
||||
void* context1 = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context1); // 8 ranks, 1 node
|
||||
pluginInit(&context1, 0, 8, 1, mock_logger, NULL, NULL); // 8 ranks, 1 node
|
||||
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
float* cost_table_ptr[NCCL_NUM_ALGORITHMS];
|
||||
@@ -315,11 +315,11 @@ int test_topology_matching() {
|
||||
TEST_ASSERT(cost_table[NCCL_ALGO_TREE][NCCL_PROTO_SIMPLE] == 0.0, "Single node: Should match tree config");
|
||||
TEST_ASSERT(nChannels == 2, "Single node: Should set 2 channels");
|
||||
|
||||
pluginDestroy(context1);
|
||||
pluginFinalize(context1);
|
||||
|
||||
// Test with 4 nodes, 32 ranks setup
|
||||
void* context2 = NULL;
|
||||
pluginInit(32, 4, mock_logger, &context2); // 32 ranks, 4 nodes
|
||||
pluginInit(&context2, 0, 32, 4, mock_logger, NULL, NULL); // 32 ranks, 4 nodes
|
||||
|
||||
for (int i = 0; i < NCCL_NUM_ALGORITHMS; i++) {
|
||||
for (int j = 0; j < NCCL_NUM_PROTOCOLS; j++) {
|
||||
@@ -348,7 +348,7 @@ int test_default_channels() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_default.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context);
|
||||
pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
float* cost_table_ptr[NCCL_NUM_ALGORITHMS];
|
||||
@@ -368,7 +368,7 @@ int test_default_channels() {
|
||||
TEST_ASSERT(nChannels == 1, "Should keep default channels (1) when config has -1");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_default.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -385,7 +385,7 @@ int test_regbuff_matching() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_regbuff.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context);
|
||||
pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
float* cost_table_ptr[NCCL_NUM_ALGORITHMS];
|
||||
@@ -436,7 +436,7 @@ int test_regbuff_matching() {
|
||||
TEST_ASSERT(nChannels == 8, "Any regBuff: Should set 8 channels");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_regbuff.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -453,7 +453,7 @@ int test_pipeops_matching() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_pipeops.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context);
|
||||
pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
float* cost_table_ptr[NCCL_NUM_ALGORITHMS];
|
||||
@@ -503,7 +503,7 @@ int test_pipeops_matching() {
|
||||
TEST_ASSERT(nChannels == 8, "Any pipeOps: Should set 8 channels");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_pipeops.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -518,7 +518,7 @@ int test_no_match_fallback() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", "test_fallback.conf", 1);
|
||||
|
||||
void* context = NULL;
|
||||
pluginInit(8, 1, mock_logger, &context);
|
||||
pluginInit(&context, 0, 8, 1, mock_logger, NULL, NULL);
|
||||
|
||||
float cost_table[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS];
|
||||
float* cost_table_ptr[NCCL_NUM_ALGORITHMS];
|
||||
@@ -542,7 +542,7 @@ int test_no_match_fallback() {
|
||||
TEST_ASSERT(nChannels == 1, "Should use default channels");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink("test_fallback.conf");
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
TEST_PASS();
|
||||
@@ -592,7 +592,7 @@ int test_large_config() {
|
||||
|
||||
// Initialize plugin with large config
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(16, 4, mock_logger, &context);
|
||||
ncclResult_t result = pluginInit(&context, 0, 16, 4, mock_logger, NULL, NULL);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin init with large config should succeed");
|
||||
TEST_ASSERT(context != NULL, "Context should be allocated");
|
||||
|
||||
@@ -651,7 +651,7 @@ int test_large_config() {
|
||||
TEST_ASSERT(result == ncclSuccess, "GetCollInfo should work with large config set");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink(large_config_file);
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
|
||||
@@ -683,7 +683,7 @@ int test_very_large_config_stress() {
|
||||
|
||||
// Test initialization with stress config
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(8, 2, mock_logger, &context);
|
||||
ncclResult_t result = pluginInit(&context, 0, 8, 2, mock_logger, NULL, NULL);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin should handle very large config files");
|
||||
|
||||
TunerContext* ctx = (TunerContext*)context;
|
||||
@@ -704,7 +704,7 @@ int test_very_large_config_stress() {
|
||||
}
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink(stress_config_file);
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
|
||||
@@ -725,7 +725,7 @@ int test_empty_config() {
|
||||
setenv("NCCL_TUNER_CONFIG_FILE", empty_config_file, 1);
|
||||
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(8, 2, mock_logger, &context);
|
||||
ncclResult_t result = pluginInit(&context, 0, 8, 2, mock_logger, NULL, NULL);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin should handle empty config files");
|
||||
|
||||
TunerContext* ctx = (TunerContext*)context;
|
||||
@@ -750,13 +750,134 @@ int test_empty_config() {
|
||||
TEST_ASSERT(result == ncclSuccess, "GetCollInfo should work with empty config");
|
||||
|
||||
// Clean up
|
||||
pluginDestroy(context);
|
||||
pluginFinalize(context);
|
||||
unlink(empty_config_file);
|
||||
unsetenv("NCCL_TUNER_CONFIG_FILE");
|
||||
|
||||
TEST_PASS();
|
||||
}
|
||||
|
||||
// Test NVLink domain info handling
|
||||
int test_nvl_domain_info() {
|
||||
printf("Testing NVLink domain info handling...\n");
|
||||
|
||||
// Test NVLink domain structure with min/max ranks per domain
|
||||
ncclNvlDomainInfo_v5_t nvl_domain = {
|
||||
.nNvlDomains = 2, // 2 nodes = 2 domains
|
||||
.minRanksPerNvlDomain = 3, // minimum ranks across all domains (bottleneck)
|
||||
.maxRanksPerNvlDomain = 5 // maximum ranks across all domains (capacity)
|
||||
};
|
||||
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(&context, 0, 8, 2, mock_logger, &nvl_domain, NULL);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin init with NVLink domains should succeed");
|
||||
|
||||
// Validate NVLD info structure
|
||||
TEST_ASSERT(nvl_domain.nNvlDomains == 2, "Should have 2 domains (nodes)");
|
||||
TEST_ASSERT(nvl_domain.minRanksPerNvlDomain == 3, "Should have minimum 3 ranks per domain");
|
||||
TEST_ASSERT(nvl_domain.maxRanksPerNvlDomain == 5, "Should have maximum 5 ranks per domain");
|
||||
|
||||
// Clean up
|
||||
pluginFinalize(context);
|
||||
printf("NVLink domain info test passed!\n");
|
||||
TEST_PASS();
|
||||
}
|
||||
|
||||
int test_tuner_constants() {
|
||||
// Initialize constants to -1.0 for testing purposes
|
||||
ncclTunerConstants_v5_t constants = {
|
||||
// Base latencies: [NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS]
|
||||
.baseLatencies = {
|
||||
{-1.0, -1.0, -1.0}, // NCCL_ALGO_TREE: LL, LL128, Simple
|
||||
{-1.0, -1.0, -1.0}, // NCCL_ALGO_RING: LL, LL128, Simple
|
||||
{-1.0, -1.0, -1.0}, // NCCL_ALGO_COLLNET_DIRECT
|
||||
{-1.0, -1.0, -1.0}, // NCCL_ALGO_COLLNET_CHAIN
|
||||
{-1.0, -1.0, -1.0}, // NCCL_ALGO_NVLS
|
||||
{-1.0, -1.0, -1.0}, // NCCL_ALGO_NVLS_TREE
|
||||
{-1.0, -1.0, -1.0} // NCCL_ALGO_PAT
|
||||
},
|
||||
|
||||
// Hardware latencies: [NCCL_NUM_HW_LINKS][NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS]
|
||||
.hwLatencies = {
|
||||
// NCCL_HW_NVLINK
|
||||
{
|
||||
{-1.0, -1.0, -1.0}, // TREE
|
||||
{-1.0, -1.0, -1.0}, // RING
|
||||
{-1.0, -1.0, -1.0}, // COLLNET_DIRECT
|
||||
{-1.0, -1.0, -1.0}, // COLLNET_CHAIN
|
||||
{-1.0, -1.0, -1.0}, // NVLS
|
||||
{-1.0, -1.0, -1.0}, // NVLS_TREE
|
||||
{-1.0, -1.0, -1.0} // PAT
|
||||
},
|
||||
// NCCL_HW_PCI
|
||||
{
|
||||
{-1.0, -1.0, -1.0}, // TREE
|
||||
{-1.0, -1.0, -1.0}, // RING
|
||||
{-1.0, -1.0, -1.0}, // COLLNET_DIRECT
|
||||
{-1.0, -1.0, -1.0}, // COLLNET_CHAIN
|
||||
{-1.0, -1.0, -1.0}, // NVLS
|
||||
{-1.0, -1.0, -1.0}, // NVLS_TREE
|
||||
{-1.0, -1.0, -1.0} // PAT
|
||||
},
|
||||
// NCCL_HW_NET
|
||||
{
|
||||
{-1.0, -1.0, -1.0}, // TREE
|
||||
{-1.0, -1.0, -1.0}, // RING
|
||||
{-1.0, -1.0, -1.0}, // COLLNET_DIRECT
|
||||
{-1.0, -1.0, -1.0}, // COLLNET_CHAIN
|
||||
{-1.0, -1.0, -1.0}, // NVLS
|
||||
{-1.0, -1.0, -1.0}, // NVLS_TREE
|
||||
{-1.0, -1.0, -1.0} // PAT
|
||||
}
|
||||
},
|
||||
|
||||
// LL maximum bandwidths: [NCCL_NUM_COMPCAPS][NCCL_NUM_TUNING_SCALES]
|
||||
.llMaxBws = {
|
||||
{-1.0, -1.0, -1.0}, // Volta: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Ampere: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Hopper: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0} // Blackwell: 1node, 2nodes, 4nodes
|
||||
},
|
||||
|
||||
// Per-channel maximum Ring LL128 bandwidths: [NCCL_NUM_COMPCAPS][NCCL_NUM_TUNING_SCALES]
|
||||
.perChMaxRingLL128Bws = {
|
||||
{-1.0, -1.0, -1.0}, // Volta: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Ampere: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Hopper: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0} // Blackwell: 1node, 2nodes, 4nodes
|
||||
},
|
||||
|
||||
// Per-channel maximum Tree LL128 bandwidths: [NCCL_NUM_COMPCAPS][NCCL_NUM_TUNING_SCALES]
|
||||
.perChMaxTreeLL128Bws = {
|
||||
{-1.0, -1.0, -1.0}, // Volta: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Ampere: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Hopper: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0} // Blackwell: 1node, 2nodes, 4nodes
|
||||
},
|
||||
|
||||
// Per-channel maximum Tree bandwidths: [NCCL_NUM_COMPCAPS][NCCL_NUM_TUNING_SCALES]
|
||||
.perChMaxTreeBws = {
|
||||
{-1.0, -1.0, -1.0}, // Volta: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Ampere: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0}, // Hopper: 1node, 2nodes, 4nodes
|
||||
{-1.0, -1.0, -1.0} // Blackwell: 1node, 2nodes, 4nodes
|
||||
}
|
||||
};
|
||||
|
||||
void* context = NULL;
|
||||
ncclResult_t result = pluginInit(&context, 0, 8, 2, mock_logger, NULL, &constants);
|
||||
TEST_ASSERT(result == ncclSuccess, "Plugin init with constants should succeed");
|
||||
|
||||
// Test that the constants were set correctly
|
||||
TEST_ASSERT(constants.perChMaxTreeBws[NCCL_BLACKWELL_COMPCAP_IDX][NCCL_TUNING_SCALE_4NODES] == 15.0, "Tree bandwidth should be 15GB/s");
|
||||
TEST_ASSERT(constants.perChMaxRingLL128Bws[NCCL_BLACKWELL_COMPCAP_IDX][NCCL_TUNING_SCALE_4NODES] == 20.0, "Ring bandwidth should be 20GB/s");
|
||||
TEST_ASSERT(constants.hwLatencies[NCCL_HW_NET][NCCL_ALGO_NVLS][NCCL_PROTO_SIMPLE] == 24.0, "NVLSTree base network latency should be 24us");
|
||||
|
||||
// Clean up
|
||||
pluginFinalize(context);
|
||||
TEST_PASS();
|
||||
}
|
||||
|
||||
// Test runner function pointer type
|
||||
typedef int (*TestFunction)(void);
|
||||
|
||||
@@ -782,6 +903,8 @@ TestCase test_cases[] = {
|
||||
{"large-config", test_large_config, "Large configuration files (dynamic allocation)"},
|
||||
{"stress-config", test_very_large_config_stress, "Very large configuration stress test"},
|
||||
{"empty-config", test_empty_config, "Empty configuration file handling"},
|
||||
{"nvl-domain", test_nvl_domain_info, "NVL domain info handling"},
|
||||
{"constants", test_tuner_constants, "Tuner constants initialization"},
|
||||
{NULL, NULL, NULL} // End marker
|
||||
};
|
||||
|
||||
@@ -825,6 +948,7 @@ int main(int argc, char* argv[]) {
|
||||
if (argc == 1) {
|
||||
// No arguments - run all tests
|
||||
for (int i = 0; test_cases[i].name != NULL; i++) {
|
||||
printf("Running test: %s\n", test_cases[i].name);
|
||||
total++;
|
||||
passed += test_cases[i].func();
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단