Observed since 20 Oct, 18:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ACE-Compiler: An FHE Domain-Specific Compiler
ACE-Compiler is the compiler component of the ANT-ACE framework. It compiles PyTorch models, Python functions, and ONNX models into optimized FHE ciphertext programs, targeting multiple libraries (CPU/GPU) and encryption schemes (CKKS, TFHE).
Plaintext and FHE computation are seamlessly integrated: write code using familiar PyTorch/ONNX/Python, and the framework automatically converts it to encrypted execution.
@fhe.compute for compile+run; @fhe.compile for compile-then-runprogram.profile() using torch.profilerimport torch
from ace import fhe
@fhe.compute(frontend="torch", library="ant", validate=True) # device auto-derives from library
def add(x, y):
return x + y
x = torch.ones(1, 4)
y = torch.ones(1, 4) * 2
result = add(x, y) # FHE inference with auto-validation
@fhe.compile(frontend="torch", library="ant") # device auto-derives from library
def add(x, y):
return x + y
program = add.compile([x, y]) # Compile
result = program(x, y) # Run inference
program.validate() # Verify correctness
@fhe.compile(frontend="torch", library="phantom", device="cuda",
ckks={"N": 65536, "sf": 56})
def add(x, y):
return x + y
program = add.compile([x, y])
result = program(x, y)
program = model.compile([example_input])
result = program.run_dataset(images, labels, top_k=1)
print(f"Top-1 accuracy: {result.top1_accuracy:.2%}")

pip install ace-fhe
The published wheel bundles the prebuilt runtime and compiler binaries, so
pip install is enough to start using ACE on a supported platform — no
source build required.
TBD: the
ace-fhePyPI package is being published; until it is available, use the from-source build below.
The compiler backend sources (compiler/air-infra/, compiler/nn-addon/,
compiler/fhe-cmplr/) are included directly in this repository, so a source
build needs no extra credentials or fetches beyond the runtime backends
(phantom / ckks-infra / spdlog), which are pulled from public GitHub at
configure time. See Developer Guide for the full
workflow:
./scripts/dev-build.sh # build + install (Release)
python -c "from ace import frontend, runtime; print('OK')"
Build type defaults:
./scripts/dev-build.shdefaults toRelease, whilemakedefaults toDebug. Both write to the samebuild/directory — pick one and stick with it to avoid stale-cache confusion.
libFHErt_common.so not found? Set the runtime library path:export LD_LIBRARY_PATH=$(python -c "import sysconfig; print(sysconfig.get_path('platlib'))")/ace/lib:$LD_LIBRARY_PATH
Ant Group internal developers: building inside the internal network needs a
CI_TOKEN, the internal Docker registry (reg.docker.alibaba-inc.com/ace/...), and internal git mirrors. See the Internal Onboarding Guide.
| API | Description | Details |
|---|---|---|
@fhe.compile | Compile function/model to FHE program | Decorators API |
@fhe.compute | Compile and run in one step | Decorators API |
@fhe.export | Export IR to file (AIR/ONNX) | Decorators API |
program(x, y) | High-level FHE inference | Runtime API |
program.run_dataset() | Batch inference with accuracy | Runtime API |
KernelExecutor | Low-level kernel management, CUDA Graph | Runtime API |
ckks, vec, p2c, ... | Compile options | Compile Options |
| Library | Device | Binary | Status |
|---|---|---|---|
ant | CPU | libFHErt_ant | Available |
phantom | CUDA | libFHErt_phantom | Available |
acelib | CUDA | libFHErt_ace | Available |
seal | CPU | Microsoft SEAL | Planned |
openfhe | CPU | OpenFHE | Planned |
ace-compiler/
├── fhe_dsl/ # FHE DSL source (Python + C++)
│ ├── python/ # Python package (installed as `ace-fhe`)
│ └── csrc/ # C++ extension (frontend, runtime)
├── fhe_lib/ # FHE runtime libraries
│ ├── ant/ # antlib (CPU)
│ ├── ace/ # acelib (CUDA)
│ └── common/ # Shared runtime code
├── compiler/ # FHE compiler (fhe_cmplr)
├── examples/ # Example scripts
├── tests/ # Test suites
└── scripts/ # Build and development scripts
See CONTRIBUTING.md for code style, lint setup, and pull request guidelines.
Apache License 2.0 with LLVM-exception
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.2 | 21 Jul 2026 | 10 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0f310fc54cb152c27f889e974cadcb48ed9df622d95ede1c06f0938e3644bc36