Skip to content

Element type Conversion and offset #1708

@wsmoses

Description

@wsmoses

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<size_t>. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions