├── .gitignore
├── .gitmodules
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── SECURITY.md
├── SUPPORT.md
└── docs
└── performance-nd-h100-v5.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "executor/msccl-executor-nccl"]
2 | path = executor/msccl-executor-nccl
3 | url = https://github.com/Azure/msccl-executor-nccl.git
4 | branch = main
5 | [submodule "tests/msccl-tests-nccl"]
6 | path = tests/msccl-tests-nccl
7 | url = https://github.com/Azure/msccl-tests-nccl.git
8 | branch = main
9 | [submodule "scheduler/msccl-scheduler"]
10 | path = scheduler/msccl-scheduler
11 | url = https://github.com/Azure/msccl-scheduler
12 | branch = main
13 | [submodule "executor/msccl-executor-rccl"]
14 | path = executor/msccl-executor-rccl
15 | url = https://github.com/rocmsoftwareplatform/rccl
16 | branch = develop
17 | [submodule "tests/msccl-tests-rccl"]
18 | path = tests/msccl-tests-rccl
19 | url = https://github.com/ROCm/rccl-tests.git
20 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MSCCL
2 |
3 | Microsoft Collective Communication Library (MSCCL) is a platform to execute custom collective communication algorithms on heterogenous accelerators supported by Microsoft Azure. MSCCL currently supports NVIDIA and AMD GPUs. The research prototype of this project is [microsoft/msccl](https://github.com/microsoft/msccl).
4 |
5 | ## Introduction
6 |
7 | MSCCL vision is to provide a unified, efficient, and scalable framework for executing collective communication algorithms on heterogenous accelerators. To achieve this, MSCCL has multiple components:
8 |
9 | - [MSCCL toolkit](https://github.com/Azure/msccl-tools): Inter-connection among accelerators have different latencies and bandwidths. Therefore, a generic collective communication algorithm does not necessarily well for all topologies and buffer sizes. In order to provide the flexibility, we provide the MSCCL toolkit, which allows a user to write a hyper-optimized collective communication algorithm for a given topology and a buffer size. MSCCL toolkit contains a high-level DSL (MSCCLang) and a compiler which generate an IR for the MSCCL executor to run on the backend. [Example](#Example) provides some instances on how MSCCL toolkit with the runtime works. Please refer to [MSCCL toolkit](https://github.com/Azure/msccl-tools) for more information.
10 |
11 | - [MSCCL scheduler](https://github.com/Azure/msccl-scheduler): MSCCL scheduler provides an example design and implementation of how to select optimal MSCCL algorithms for MSCCL executors.
12 |
13 | - MSCCL executor: MSCCL executor is a set of libraries that are responsible for running custom-written collective communication algorithms on heterogenous accelerators. Each kind of accelerator has a corresponding executor library that is specifically optimized it. Different executor libraries share the same interface to run MSCCL algorithm IR from MSCCL toolkit and talk with MSCCL scheduler. For NVIDIA GPUs, it's [msccl-executor-nccl](https://github.com/Azure/msccl-executor-nccl) which is built on top of [NCCL](https://github.com/nvidia/nccl). For AMD GPUs, it's [RCCL](https://github.com/ROCmSoftwarePlatform/rccl) which already integrated all MSCCL executor features.
14 |
15 | - MSCCL test toolkit([msccl-tests-nccl](https://github.com/Azure/msccl-tests-nccl)): These tests check both the performance and the correctness of MSCCL operations.
16 |
17 | ## Performance
18 | For reference, FP16 All-Reduce and All-Gather algorithms were tested and compared on ND H100 v5 VM, using msccl-tests-nccl.
19 |
20 |
21 |
22 | FP16 All-Reduce Latency (us) |
23 | All-Gather Latency (us) |
24 |
25 |
26 | Message Size |
27 | NCCL |
28 | MSCCL |
29 | MSCCL Speedup |
30 | Message Size |
31 | NCCL |
32 | MSCCL |
33 | MSCCL Speedup |
34 |
35 |
36 | 1KB |
37 | 13.12 |
38 | 7.50 |
39 | 1.80x |
40 | 1KB |
41 | 9.54 |
42 | 5.65 |
43 | 1.69x |
44 |
45 |
46 | 2KB |
47 | 14.39 |
48 | 7.48 |
49 | 1.92x |
50 | 2KB |
51 | 9.8 |
52 | 5.7 |
53 | 1.72x |
54 |
55 |
56 | 4KB |
57 | 15.28 |
58 | 7.49 |
59 | 2.04x |
60 | 4KB |
61 | 9.78 |
62 | 5.43 |
63 | 1.80x |
64 |
65 |
66 | 8KB |
67 | 15.69 |
68 | 7.67 |
69 | 2.04x |
70 | 8KB |
71 | 9.78 |
72 | 5.47 |
73 | 1.81x |
74 |
75 |
76 | 16KB |
77 | 16.64 |
78 | 8.03 |
79 | 2.07x |
80 | 16KB |
81 | 10.29 |
82 | 5.53 |
83 | 1.86x |
84 |
85 |
86 | 32KB |
87 | 19.3 |
88 | 9.08 |
89 | 2.13x |
90 | 32KB |
91 | 12.49 |
92 | 5.75 |
93 | 2.17x |
94 |
95 |
96 | 64KB |
97 | 20 |
98 | 10.36 |
99 | 1.93x |
100 | 64KB |
101 | 12.87 |
102 | 5.95 |
103 | 2.16x |
104 |
105 |
106 | 128KB |
107 | 20.42 |
108 | 11.06 |
109 | 1.85x |
110 | 128KB |
111 | 13.16 |
112 | 6.38 |
113 | 2.06x |
114 |
115 |
116 | 256KB |
117 | 20.5 |
118 | 12.86 |
119 | 1.60x |
120 | 256KB |
121 | 13.23 |
122 | 7.26 |
123 | 1.82x |
124 |
125 |
126 | 512KB |
127 | 29.89 |
128 | 19.14 |
129 | 1.56x |
130 | 512KB |
131 | 13.39 |
132 | 8.71 |
133 | 1.54x |
134 |
135 |
136 | 1MB |
137 | 31.94 |
138 | 22.31 |
139 | 1.43x |
140 | 1MB |
141 | 18.33 |
142 | 12.3 |
143 | 1.49x |
144 |
145 |
146 | 2MB |
147 | 37.95 |
148 | 33.43 |
149 | 1.14x |
150 | 2MB |
151 | 23.18 |
152 | 17.75 |
153 | 1.31x |
154 |
155 |
156 | 4MB |
157 | 49.28 |
158 | 43.97 |
159 | 1.12x |
160 | 4MB |
161 | 33.66 |
162 | 23.37 |
163 | 1.44x |
164 |
165 |
166 | 8MB |
167 | 77.01 |
168 | 68.16 |
169 | 1.13x |
170 | 8MB |
171 | 44.7 |
172 | 38.54 |
173 | 1.16x |
174 |
175 |
176 | 16MB |
177 | 116 |
178 | 115.7 |
179 | 1.00x |
180 | 16MB |
181 | 67.19 |
182 | 67.16 |
183 | 1.00x |
184 |
185 |
186 | 32MB |
187 | 187.2 |
188 | 186.5 |
189 | 1.00x |
190 | 32MB |
191 | 104.7 |
192 | 98.4 |
193 | 1.06x |
194 |
195 |
196 | 64MB |
197 | 317.4 |
198 | 315.7 |
199 | 1.01x |
200 | 64MB |
201 | 192.4 |
202 | 181.9 |
203 | 1.06x |
204 |
205 |
206 | 128MB |
207 | 572.5 |
208 | 570.4 |
209 | 1.00x |
210 | 128MB |
211 | 368.3 |
212 | 348.4 |
213 | 1.06x |
214 |
215 |
216 | 256MB |
217 | 1079 |
218 | 1075.6 |
219 | 1.00x |
220 | 256MB |
221 | 699.5 |
222 | 680.7 |
223 | 1.03x |
224 |
225 |
226 | 512MB |
227 | 2071.1 |
228 | 2067.9 |
229 | 1.00x |
230 | 512MB |
231 | 1358.6 |
232 | 1339.3 |
233 | 1.01x |
234 |
235 |
236 | 1GB |
237 | 4028.7 |
238 | 4026.8 |
239 | 1.00x |
240 | 1GB |
241 | 2663.8 |
242 | 2633 |
243 | 1.01x |
244 |
245 |
246 |
247 | ## Example
248 |
249 | In order to use MSCCL, you may follow these steps to use two different MSCCL algorithms for AllReduce on Azure NDv4 which has 8xA100 GPUs:
250 |
251 | #### 1. Download the source code of msccl and related submodules
252 |
253 | ```sh
254 | $ git clone https://github.com/Azure/msccl.git --recurse-submodules
255 | ```
256 |
257 | #### 2. Below is the steps to install MSCCL executor:
258 |
259 | ```sh
260 | $ git clone https://github.com/Azure/msccl.git --recurse-submodules
261 | $ cd msccl/executor/msccl-executor-nccl
262 | $ make -j src.build
263 | $ cd ../
264 | $ cd ../
265 | ```
266 |
267 | #### 3. Below is the steps to install msccl-tests-nccl for performance evaluation:
268 |
269 | ```sh
270 | $ cd tests/msccl-tests-nccl/
271 | $ make MPI=1 MPI_HOME=/path/to/mpi CUDA_HOME=/path/to/cuda NCCL_HOME=$HOME/msccl/executor/msccl-executor-nccl/build/ -j
272 | $ cd ../
273 | $ cd ../
274 | ```
275 |
276 | #### 4. Apply the msccl algo when using msccl external scheduler
277 | - for ndv4, we already have algo optimized, you can use msccl scheduler to apply this algo directly to the executor, below is the steps to apply the scheduler
278 | ```sh
279 | $ sudo apt-get install libcurl4-openssl-dev nlohmann-json3-dev
280 | $ cd scheduler/msccl-scheduler
281 |
282 | for nccl:
283 | $ CXX=/path/to/nvcc BIN_HOME=/path/to/nccl/binary SRC_HOME=/path/to/nccl/source make
284 | for rccl:
285 | $ CXX=/path/to/nvcc BIN_HOME=/path/to/nccl/binary SRC_HOME=/path/to/nccl/source make PLATFORM=RCCL
286 |
287 | $ make install
288 | ```
289 |
290 | - for customize the msccl algo for your system, you can install [MSCCL toolkit](https://github.com/Azure/msccl-tools) to compile a few custom algorithms:
291 |
292 | ```sh
293 | $ git clone https://github.com/Azure/msccl-tools.git
294 | $ cd msccl-tools/
295 | $ pip install .
296 | $ cd ../
297 | $ python msccl-tools/examples/mscclang/allreduce_a100_allpairs.py --protocol=LL 8 2 > test.xml
298 | $ cd ../
299 | ```
300 |
301 | The compiler's generated code is an XML file (`test.xml`) that is fed to MSCCL runtime. To evaluate its performance, copy the `test.xml` to the msccl/executor/msccl-executor-nccl/build/lib/msccl-algorithms/ and execute the following command line on an Azure NDv4 node or any 8xA100 system:
302 |
303 | #### 5. Below is the command to run test using msccl-executor-nccl
304 | ```sh
305 | $ mpirun -np 8 -x LD_LIBRARY_PATH=msccl/executor/msccl-executor-nccl/build/lib/:$LD_LIBRARY_PATH -x NCCL_DEBUG=INFO -x NCCL_DEBUG_SUBSYS=INIT,ENV tests/msccl-tests-nccl/build/all_reduce_perf -b 128 -e 32MB -f 2 -g 1 -c 1 -n 100 -w 100 -G 100 -z 0
306 | ```
307 |
308 | #### 6. If everything is installed correctly, you should see the following output in log:
309 |
310 | ```sh
311 | [0] NCCL INFO Connected 1 MSCCL algorithms
312 | ```
313 |
314 | You may evaluate the performance of `test.xml` by comparing in-place (the new algorithm) vs out-of-place (default ring algorithm) and it should up-to 2-3x faster on 8xA100 NVLink-interconnected GPUs. [MSCCL toolkit](https://github.com/Azure/msccl-tools) has a rich set of algorithms for different Azure SKUs and collective operations with significant speedups over vanilla NCCL.
315 |
316 | ## Contributing
317 |
318 | This project welcomes contributions and suggestions. Most contributions require you to agree to a
319 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
320 | the rights to use your contribution. For details, visit [CLA](https://cla.opensource.microsoft.com).
321 |
322 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide
323 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
324 | provided by the bot. You will only need to do this once across all repos using our CLA.
325 |
326 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
327 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
328 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
329 |
330 | ## Trademarks
331 |
332 | This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
333 | trademarks or logos is subject to and must follow
334 | [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
335 | Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
336 | Any use of third-party trademarks or logos are subject to those third-party's policies.
337 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # Support
2 |
3 | ## How to file issues and get help
4 |
5 | This project uses [GitHub Issues] to track bugs and feature requests. Please search the existing
6 | issues before filing new issues to avoid duplicates. For new issues, file your bug or
7 | feature request as a new issue.
8 |
9 | For help and questions about using this project, please create a new post in [GitHub Discussions].
10 |
11 | ## Microsoft Support Policy
12 |
13 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above.
14 |
15 | [GitHub Issues]: https://github.com/Azure/msccl/issues
16 | [GitHub Discussions]: https://github.com/Azure/msccl/discussions
--------------------------------------------------------------------------------
/docs/performance-nd-h100-v5.md:
--------------------------------------------------------------------------------
1 | # ND H100 v5 Performance
2 |
3 | All results are from ND H100 v5. MSCCL executor version is [commit 6eacec0](https://github.com/Azure/msccl-executor-nccl/commit/6eacec0ab5a446ba19e9f4d978164f4a5c503534) and NCCL version is 2.18.3. all reported are in-place numbers.
4 |
5 | ### 1. msccl-tests-nccl command example:
6 |
7 | **- all-gather**
8 | ```bash
9 | mpirun --allow-run-as-root --tag-output -map-by ppr:8:node --bind-to numa -mca pml ob1 -mca btl ^openib -mca btl_tcp_if_include eth0 -x PATH -x LD_PRELOAD=/path/to/msccl-executor-nccl/build/lib/libnccl.so -x NCCL_IB_PCI_RELAXED_ORDERING=1 -x NCCL_SOCKET_IFNAME=eth0 -x CUDA_DEVICE_ORDER=PCI_BUS_ID -x NCCL_TOPO_FILE=/path/to/ndv5-topo.xml -x NCCL_DEBUG=WARN -x NCCL_MIN_NCHANNELS=32 /path/to/msccl-tests-nccl/build/all_gather_perf -b 1 -e 1G -f 2 -g 1 -c 1 -w 20 -n 1000 -d half -G 1
10 | ```
11 | **- all-reduce**
12 | ```bash
13 | mpirun --allow-run-as-root --tag-output -map-by ppr:8:node --bind-to numa -mca pml ob1 -mca btl ^openib -mca btl_tcp_if_include eth0 -x PATH -x LD_PRELOAD=/path/to/msccl-executor-nccl/build/lib/libnccl.so -x NCCL_IB_PCI_RELAXED_ORDERING=1 -x NCCL_SOCKET_IFNAME=eth0 -x CUDA_DEVICE_ORDER=PCI_BUS_ID -x NCCL_TOPO_FILE=/path/to/ndv5-topo.xml -x NCCL_DEBUG=WARN -x NCCL_MIN_NCHANNELS=32 /path/to/msccl-tests-nccl/build/all_reduce_perf -b 1 -e 1G -f 2 -g 1 -c 1 -w 20 -n 1000 -d half -G 1
14 | ```
15 |
16 | ### 2. Performance Results:
17 | **- 1 node, 8 gpus/node**
18 |
19 |
20 | FP16 All-Reduce Latency (us) |
21 | All-Gather Latency (us) |
22 |
23 |
24 | Message Size |
25 | NCCL |
26 | MSCCL |
27 | MSCCL Speedup |
28 | Message Size |
29 | NCCL |
30 | MSCCL |
31 | MSCCL Speedup |
32 |
33 |
34 | 1KB |
35 | 13.12 |
36 | 7.50 |
37 | 1.80x |
38 | 1KB |
39 | 9.54 |
40 | 5.65 |
41 | 1.69x |
42 |
43 |
44 | 2KB |
45 | 14.39 |
46 | 7.48 |
47 | 1.92x |
48 | 2KB |
49 | 9.8 |
50 | 5.7 |
51 | 1.72x |
52 |
53 |
54 | 4KB |
55 | 15.28 |
56 | 7.49 |
57 | 2.04x |
58 | 4KB |
59 | 9.78 |
60 | 5.43 |
61 | 1.80x |
62 |
63 |
64 | 8KB |
65 | 15.69 |
66 | 7.67 |
67 | 2.04x |
68 | 8KB |
69 | 9.78 |
70 | 5.47 |
71 | 1.81x |
72 |
73 |
74 | 16KB |
75 | 16.64 |
76 | 8.03 |
77 | 2.07x |
78 | 16KB |
79 | 10.29 |
80 | 5.53 |
81 | 1.86x |
82 |
83 |
84 | 32KB |
85 | 19.3 |
86 | 9.08 |
87 | 2.13x |
88 | 32KB |
89 | 12.49 |
90 | 5.75 |
91 | 2.17x |
92 |
93 |
94 | 64KB |
95 | 20 |
96 | 10.36 |
97 | 1.93x |
98 | 64KB |
99 | 12.87 |
100 | 5.95 |
101 | 2.16x |
102 |
103 |
104 | 128KB |
105 | 20.42 |
106 | 11.06 |
107 | 1.85x |
108 | 128KB |
109 | 13.16 |
110 | 6.38 |
111 | 2.06x |
112 |
113 |
114 | 256KB |
115 | 20.5 |
116 | 12.86 |
117 | 1.60x |
118 | 256KB |
119 | 13.23 |
120 | 7.26 |
121 | 1.82x |
122 |
123 |
124 | 512KB |
125 | 29.89 |
126 | 19.14 |
127 | 1.56x |
128 | 512KB |
129 | 13.39 |
130 | 8.71 |
131 | 1.54x |
132 |
133 |
134 | 1MB |
135 | 31.94 |
136 | 22.31 |
137 | 1.43x |
138 | 1MB |
139 | 18.33 |
140 | 12.3 |
141 | 1.49x |
142 |
143 |
144 | 2MB |
145 | 37.95 |
146 | 33.43 |
147 | 1.14x |
148 | 2MB |
149 | 23.18 |
150 | 17.75 |
151 | 1.31x |
152 |
153 |
154 | 4MB |
155 | 49.28 |
156 | 43.97 |
157 | 1.12x |
158 | 4MB |
159 | 33.66 |
160 | 23.37 |
161 | 1.44x |
162 |
163 |
164 | 8MB |
165 | 77.01 |
166 | 68.16 |
167 | 1.13x |
168 | 8MB |
169 | 44.7 |
170 | 38.54 |
171 | 1.16x |
172 |
173 |
174 | 16MB |
175 | 116 |
176 | 115.7 |
177 | 1.00x |
178 | 16MB |
179 | 67.19 |
180 | 67.16 |
181 | 1.00x |
182 |
183 |
184 | 32MB |
185 | 187.2 |
186 | 186.5 |
187 | 1.00x |
188 | 32MB |
189 | 104.7 |
190 | 98.4 |
191 | 1.06x |
192 |
193 |
194 | 64MB |
195 | 317.4 |
196 | 315.7 |
197 | 1.01x |
198 | 64MB |
199 | 192.4 |
200 | 181.9 |
201 | 1.06x |
202 |
203 |
204 | 128MB |
205 | 572.5 |
206 | 570.4 |
207 | 1.00x |
208 | 128MB |
209 | 368.3 |
210 | 348.4 |
211 | 1.06x |
212 |
213 |
214 | 256MB |
215 | 1079 |
216 | 1075.6 |
217 | 1.00x |
218 | 256MB |
219 | 699.5 |
220 | 680.7 |
221 | 1.03x |
222 |
223 |
224 | 512MB |
225 | 2071.1 |
226 | 2067.9 |
227 | 1.00x |
228 | 512MB |
229 | 1358.6 |
230 | 1339.3 |
231 | 1.01x |
232 |
233 |
234 | 1GB |
235 | 4028.7 |
236 | 4026.8 |
237 | 1.00x |
238 | 1GB |
239 | 2663.8 |
240 | 2633 |
241 | 1.01x |
242 |
243 |
--------------------------------------------------------------------------------