EnzymeAD / EnzymeAD/Enzyme-JAX
Element type Conversion and offset
- Dominant language
- MLIR
- Stars
- 131
- Forks
- 53
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 193
Description
We need a utility function `adaptToCallingConvention` that takes an mlir function `f`, a list of input tensor types, and a list of byte offsets, passed as an ArrayRef. adaptToCallingConvention should output a new mlir function.
This new function should call the original `f`. If the element types differ, it should perform casts to ensure the argument of type of the outer specification can be passed to `f`. Also, if the corresponding byte offset is non-zero, it should slice the argument such that the first byte passed to `f` is the corresponding offset number of bytes into the outer argument.
Code should be added to Utils.cpp and Utils.h
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.