Files
torus/docs/dev/api/torus.fhe.mlir.conversion.md
zeekay f968edf75a Rename the Concrete dialect and project identifiers to Torus
The MLIR dialect, its conversion passes (TFHEToConcrete, ConcreteToCAPI,
ConcreteToLLVM), the optimizer component, the compiler binary, the Rust
crate and the program_info parameter file all still carried the upstream
project's name. They now carry this one's.

Two things deliberately keep the word, because in them it is not the name.
mlir::OpTrait CRTP parameters mean "the derived type", so they are spelled
Derived and OpTy — LLVM's other conventional spelling for the same idiom.
concreteShape is a capnp field: renaming it would change the serialized
protocol, and the prose describing it is ordinary English.

This also repairs references the earlier partial rename left dangling:
Security.cpp included concrete/curves.gen.h and the directory is torus/,
torus-cpu.h included concrete-num_complex.h, the Torus dialect CMakeLists
named ConcreteOps.td, and compiler/setup.py asked find_namespace_packages
for a "concrete" package that no longer exists — so it built without the
package it ships.
2026-08-27 13:17:38 -07:00

2.5 KiB

module torus.fhe.mlir.conversion

Declaration of ConversionType and Conversion classes.


class ConversionType

ConversionType class, to make it easier to work with MLIR types.

method __init__

__init__(mlir: Type)

property is_clear


property is_scalar


property is_tensor


property is_unsigned


class Conversion

Conversion class, to store MLIR operations with additional information.

method __init__

__init__(origin: Node, result: OpResult)

property bit_width


property is_clear


property is_encrypted


property is_scalar


property is_signed


property is_tensor


property is_unsigned


property original_bit_width

Get the original bit-width of the conversion.

If not explicitly set, defaults to the actual bit width.


property shape


method set_original_bit_width

set_original_bit_width(original_bit_width: int)

Set the original bit-width of the conversion.