EnzymeAD / EnzymeAD/Enzyme-JAX

Element type Conversion and offset

Open
#1,708 0 comments 1 reaction 1 assignee Assigned to @Copilot View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.