Documentation
¶
Overview ¶
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 a zero-byte PUT/GET carrying the cuObject RDMA descriptor headers, and let the gateway perform the actual transfer via RDMA.
Index ¶
Constants ¶
const MaxTransferSize = 1 << 30
MaxTransferSize is the largest transfer size supported by the cuObject client path in this package.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session owns a CUDA buffer registered for cuObject RDMA token exchange.
func NewSession ¶
NewSession creates a GPU-backed cuObject session for a fixed transfer size. The returned session allocates CUDA memory, registers the descriptor with cuobjclient, and prepares RDMA token generation for Upload and Download. size must be in the range [1, MaxTransferSize]. A Session is reusable for multiple transfers as long as each Upload or Download uses buffers with length equal to the size passed to NewSession. Callers should keep a session open for repeated sequential operations and call Close once the session is no longer needed. Session methods are not safe for concurrent use. Do not call Upload, Download, or Close from multiple goroutines at the same time on the same Session value. Call Close when finished to release all resources.
func (*Session) Close ¶
func (s *Session) Close()
Close releases the GPU buffer and destroys the cuObject client context. After Close returns, the Session must not be used.