The variable `defaultV0Constraints` is defined in multiple source
files for unit test, but missing in other tests. Put a single, extern
declaration in `globals.h` and the definition in `globals.cc`.
Add a rewrite pattern that transforms an instance of
`HLFHELinalg.zero` into an instance of `linalg.generate` with an
appropriate region yielding a zero value.
Example:
%out = "HLFHELinalg.zero"() : () -> tensor<MxNx!HLFHE.eint<p>>
becomes:
%0 = tensor.generate {
^bb0(%arg2: index, %arg3: index):
%zero = "HLFHE.zero"() : () -> !HLFHE.eint<p>
tensor.yield %zero : !HLFHE.eint<p>
} : tensor<MxNx!HLFHE.eint<p>>
Add a new operation `HLFHELinalg.zero`, broadcasting an encrypted,
zero-valued integer into a tensor of encrypted integers with static
shape.
Example creating a one-dimensional tensor with five elements all
initialized to an encrypted zero:
%tensor = "HLFHELinalg.zero"() : () -> tensor<5x!HLFHE.eint<4>>
Operations with regions currently need explicit patterns for type
conversion throughout lowering. This change adds the required patterns
for `tensor.generate` to the lowering passes, such that the operation
can be used starting from the lowering from HLFHE to MidLFHE.
Some of these operators/types could be usefull but they are not yet use on the compiler pipeline it's preferable to remove them, and reintroduce if needed.
Resolves#288
example
before:
Failed to lower to LLVM dialect
after:
Failed to lower to LLVM dialect
test.mlir:3:10: error: unexpected error: 'linalg.copy' op expected indexing_map #1 to have 2 dim(s) to match the number of loops
%0 = tensor.extract_slice %arg0[0, 0] [3, 1] [1, 1] : tensor<3x2x!HLFHE.eint<3>> to tensor<3x!HLFHE.eint<3>>
^
Replace `LinalgGenericTypeConverterPattern`, specialized for
`linalg.generic` with a generic type converter pattern
`RegionOpTypeConverterPattern` that can be instantiated for any
operation that has one or more regions.
Further enhancements:
- Supports multiple regions
- Uses more idiomatic instantiations of `llvm::for_each` instead of
manual iterations using for loops
Try to find the runtime library automatically (should only work on
proper installation of the package), and fail silently by not passing
any RT lib. The RT lib can also be specified manually. The RT lib will
be used as a shared library by the JIT compiler.
By default, all commands in the `run` section of
`.github/workflows/conformance.yml` are executed, regardless of their
return values and the return value of the last command is used as the
result for the entire flow. Failing test followed by passing tests
thus remain undetected.
This change forces the use of the bash shell and causes it to exit
immediately with a non-zero return value when one of the commands
fails using `set -e`.
Add support for result tensors composed of uint8_t, uint16_t, uint32_t
and uint64_t elements, replacing the current implementation, which
only supports uint64_t tensors.
Add a new method `JITLambda::Arguments::getResultWidth` returning the
width of a scalar result or the element type of a tensor result at a
given position.
Currently, `JITLambda::Arguments` assumes result tensors are always
composed of `uint64_t` elements. This change adds support for
arbitrary scalar element types.
Set the make variable `CCACHE` to `ON` in order to force the use of
`ccache` during compilation of the code. For unknown reasons, the
build directory must also be removed. Otherwise, a complete rebuild
circumventing the cache is triggered and `ccache` does not have any
effect on compilation time.
Debug information printing `ccache` statistics before and after the
build has also been added.