moose
moose copied to clipboard
Cleanup Python-to-Rust conversion code
The code in python_computation.rs
is currently making some assumptions about the computation by eg hardcoding certain types. Once we have type inference (#333) we should clean this up.
I think this issue is not specific enough to be useful. Going through the relevant code, I see a few issues we have brushed under the rug:
- Fixedpoint dtype serde from python to rust is hard-coded, so that we only support a handful of fixedpoint dtypes when we could realistically support more (technically we should be able to support all fixedpoint dtypes that result in fixedpoints that can be encoded into 64 and 128 bit integers)
- Variadic op signature inference (here, here, here)
- Limited set of constant types in this match statement
- Limited set of Tensor constant dtypes handled in the match statement linked there^
- Limited set of Tensor types handled (code here); these types being unhandled is a result of the logical dialect kernels (operating on the
Tensor
type) being incomplete w.r.t. all dtypes defined in the edsl - Scalar types missing (e.g. Float, Int, Long?, Double?) here
- Renaming std dialect to logical dialect #915
I think these points might be discussed/prioritized differently, so not sure where this lands on the project board for https://github.com/orgs/tf-encrypted/projects/2
Moving this one to "fix now" but only to have further discussion about breaking it down