fix: add explicit RDMA build constraints

Gate native RDMA, cuObject, and cuobjclient implementations behind the
rdma build tag while keeping fallback stubs available for standard builds.
Preserve the separate cuobjclient_host configuration, clarify unsupported
platform errors, and update Makefile RDMA targets to pass the required tags
and disable VCS stamping.

Co-authored-by: Ben McClelland <ben.mcclelland@versity.com>
This commit is contained in:
Eric Entzel
2026-09-15 11:03:51 -07:00
committed by Ben McClelland
co-authored by Ben McClelland
parent 4dc0debf8f
commit 3610eddf40
23 changed files with 33 additions and 29 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
// specific language governing permissions and limitations
// under the License.
//go:build linux && amd64 && cgo && cuobjclient_host
//go:build linux && amd64 && cgo && rdma && cuobjclient_host
// This file implements the cuObjClient Session API on top of the host-memory
// RDMA client (package rdma/hostclient). It contains no CUDA/GPU dependency and
+1 -1
View File
@@ -12,7 +12,7 @@
// specific language governing permissions and limitations
// under the License.
//go:build linux && amd64 && cgo && !cuobjclient_host
//go:build linux && amd64 && cgo && rdma && !cuobjclient_host
package cuobjclient
+4 -4
View File
@@ -12,7 +12,7 @@
// specific language governing permissions and limitations
// under the License.
//go:build !(linux && amd64 && cgo)
//go:build !(linux && amd64 && cgo && rdma)
package cuobjclient
@@ -37,7 +37,7 @@ func NewSession(size int) (*Session, error) {
if size > MaxTransferSize {
return nil, fmt.Errorf("invalid size %d: exceeds MaxTransferSize (%d)", size, MaxTransferSize)
}
return nil, fmt.Errorf("cuobjclient: NewSession is only supported on linux/amd64 with cgo")
return nil, fmt.Errorf("cuobjclient: NewSession is only supported on linux/amd64 with cgo and the rdma build tag")
}
// Close is a no-op in the unsupported-platform stub.
@@ -52,7 +52,7 @@ func (s *Session) Upload(base *s3lib.Client, bucket, key string, src []byte) err
_ = bucket
_ = key
_ = src
return fmt.Errorf("cuobjclient: Upload is only supported on linux/amd64 with cgo")
return fmt.Errorf("cuobjclient: Upload is only supported on linux/amd64 with cgo and the rdma build tag")
}
// Download always returns an unsupported-platform error on this build.
@@ -62,5 +62,5 @@ func (s *Session) Download(base *s3lib.Client, bucket, key string, dst []byte) e
_ = bucket
_ = key
_ = dst
return fmt.Errorf("cuobjclient: Download is only supported on linux/amd64 with cgo")
return fmt.Errorf("cuobjclient: Download is only supported on linux/amd64 with cgo and the rdma build tag")
}
+1 -1
View File
@@ -12,7 +12,7 @@
// specific language governing permissions and limitations
// under the License.
//go:build linux && amd64 && cgo
//go:build linux && amd64 && cgo && rdma
// This file holds the S3 request plumbing shared by the GPU (session_linux.go)
// and host-memory (session_host_linux.go) session implementations: both issue