Skip to content

Commit 106c6a3

Browse files
committed
chore(nccl): gate CGo path behind nccl_cgo build tag
Renames the legacy nccl.go to nccl_cgo.go and tightens its build tag to //go:build cuda && cgo && nccl_cgo so the CGo implementation is OFF by default. The new purego/dlopen binding in nccl_purego.go is the default and only path on every supported platform; the CGo file is retained as a debugging fallback.
1 parent 35ea45f commit 106c6a3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
//go:build cuda
1+
//go:build cuda && cgo && nccl_cgo
22

3-
// Package nccl provides CGo bindings for the NVIDIA Collective Communications
4-
// Library (NCCL). It exposes communicator lifecycle, all-reduce, and broadcast
5-
// operations needed for multi-GPU gradient synchronization and tensor
6-
// distribution.
3+
// Legacy CGo binding for libnccl, retained as an opt-in fallback. Build with
4+
// `-tags "cuda nccl_cgo"` to use this implementation instead of the default
5+
// purego/dlopen path in nccl_purego.go.
76
package nccl
87

98
/*

0 commit comments

Comments
 (0)