Technical reference for the NNI compiled memory-mapped interconnect stack.
Establish a named shared memory block backed by the system paging file. Both writing and reading processes must connect to the exact same string namespace identifier.
import nni_sdk
# Initialize the named RAM clipboard segment
slate = nni_sdk.SharedSlate(name="nni_shared_slate")
Compress high-dimensional model weight tensors into an optimized, 64-byte cache-line aligned packet. Values below the importance threshold are automatically zero-skipped.
# Compresses elements, packing up to 9 active float values
packet = nni_sdk.Compressor.compress_sparse(
floats=my_raw_floats,
threshold=0.5
)
Encrypt and sign your compressed packet inside your processor's isolated Trusted Execution Environment using ChaCha20-Poly1305 AEAD cryptography.
# Returns secure (nonce, ciphertext, tag) envelope
nonce, ciphertext, tag = nni_sdk.SecureEnclave.encrypt(packet)
Drop-in replacement for torch.distributed.send targeting multi-GPU clusters.
Direct integration with transformers.pipeline for localized KV-Cache streaming.
NPU-Direct API pushing verified activations straight to NVIDIA hardware registers.