Add a new option --hlfhelinalg-tile-sizes that forces tiling of
HLFHELinalg operations and that sets the tile sizes to the sizes given
in the parameter. The specification of the tile sizes is a
comma-separated list of integers, e.g.,
--hlfhelinalg-tile-sizes=2,2,2
forces to use tiles of size 2 in each dimension.
- Rename `extract_slice_parametric_2x2` to
`extract_slice_parametric_2x2x2x2` to reflect the 4-dimensional
structure of the tiles.
- Make the array with the specification of the dimensions in
`extract_slice_parametric_2x2x2x2` a `constexpr` in order to prevent
the array `A` from being treated as a variable-length array.
- Cast the expression for the expected size of the result to `size_t`
and change the type of the induction variables of the loop nest
producing the initial values for the array `A` to `int64_t` to avoid
warnings about the comparison of integer expressions with different
signedness.
This introduces a new header file `zamalang/Support/Constants.h` for
constants, currently only populated with a constant for the default
pattern rewriting benefit of 1.
Upon invocation of a function with memref arguments, the strides for
all dimensions are currently set to 0. This causes dynamic offsets to
be calculated incorrectly in the function body.
This patch replaces the placeholder values with the actual strides for
each dimension and adds a test with parametric slice extraction from a
tensor that triggers dynamic indexing.
The release workflow should, whenever a tag is pushed,
create a draft release on github (that should be manually
checked by one of us to make the actual release).
The release should contain wheels for python 3.8, 3.9, and 3.10,
as well as a tarball containing the zamacompiler and required
libraries (and installation guide is provided).
The draft release will also have an auto generated release note
that can be modified later.
[----------] Global test environment tear-down
[==========] 7 tests from 1 test suite ran. (1513 ms total)
[ PASSED ] 7 tests.
YOU HAVE 2 DISABLED TESTS
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1513 ms total)
[ PASSED ] 6 tests.
YOU HAVE 3 DISABLED TESTS
Compared to previous commit, a fatal test is disabled
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1327 ms total)
[ PASSED ] 5 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] Lambda_check_param.scalar_tensor_to_tensor_good_number_param
1 FAILED TEST
YOU HAVE 3 DISABLED TESTS
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1402 ms total)
[ PASSED ] 6 tests.
YOU HAVE 3 DISABLED TESTS
2 tests are disabled because execution is fatal
While the manp analysis wasn't handle tensor the dot operation restrict the operands to come from a block argument. Since the tensor are handled in the manp pass this restriction has no more meaning.
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>>
^