Example catalog
Choose a module and a usage model. Each row links to one executable example and its tutorial. Start with the basic evaluator, or go to JIT compilation for reusable function execution.
Eager
| Example | Tutorial | Demonstrates |
|---|---|---|
| 01 | Basic CKKS workflow | Encrypt, evaluate, and decrypt one process-local computation |
| 02 | Key creation and installation | Create typed keys from one secret and install selected evaluator capabilities |
| 03 | Modulus-chain depth | Inspect configured Q groups and the available depth budget |
| 04 | Actual scale management | Plan per-value scales and align depth independently |
| 05 | NTT reuse and late relinearization | Schedule reusable NTT operands and delay three-component reduction |
| 06 | Rotation hoisting | Request grouped rotations and compare with independent calls |
| 07 | Homogeneous batching | Use leading Tensor batch axes instead of an evaluation loop |
| 08 | Compressed plaintexts | Evaluate losslessly compressed operation-ready plaintexts |
Values, Serialization, and Artifacts
| Example | Tutorial | Demonstrates |
|---|---|---|
| 09 | Value movement and files | Move typed values and restore them from caller-owned files |
| 10 | Named artifacts and generations | Use logical names, collections, and generation-specific references |
Compile
| Example | Tutorial | Demonstrates |
|---|---|---|
| 11 | JIT compilation | Reuse a decorated function across input contents and static specializations |
| 12 | Caller-composed Compile pipeline | Select built-in transformation and scheduling passes before direct linking |
| 13 | Textual Program IR | Parse, inspect, transform, and print an open mixed-level Program |
| 14 | Custom BSGS transformation | Implement one matrix-to-BSGS rewriting pass |
| 15 | Generated Python | Export editable Eager and Backend Python at selected IR stages |
| 16 | Program materials and persistence | Name materials, save none/some/all data, and fill bindings after load |
Runtime
| Example | Tutorial | Demonstrates |
|---|---|---|
| 17 | Double-buffered execution | Overlap pinned-host transfers with computation in fixed CUDA buffers |
| 18 | CUDA Graph replay | Capture a fixed evaluator and replay with changing input data |
Residency
| Example | Tutorial | Demonstrates |
|---|---|---|
| 19 | Manual Residency | Plan placements and protect asynchronous readers with leases |
| 20 | Automatic Residency admission | Inspect and execute automatic admission under managed memory pressure |
Distributed
| Example | Tutorial | Demonstrates |
|---|---|---|
| 21 | Data-parallel encrypted batches | Split a global encrypted batch across ranks and restore sample order |
| 22 | Additive partial results | Partition additive terms and reduce ciphertext partials |
| 23 | RNS-sharded execution | Partition one ciphertext by prime rows and reconstruct its full basis |
| 24 | Rank-local collective IR | Express a collective using a specialized op or a generic combine region |
Experimental
| Example | Tutorial | Demonstrates |
|---|---|---|
| 25 | Experimental bootstrapping | Refresh a depleted ciphertext using a composable bootstrap preset |
| 26 | Experimental multiparty CKKS | Compose multiparty arithmetic with application-owned protocol state |