Skip to content
Commit 28e28e5d authored by Nicolas Vasilache's avatar Nicolas Vasilache Committed by A. Unique TensorFlower
Browse files

Lower linalg.transpose to LLVM dialect

Add a conversion pattern that transforms a linalg.transpose op into:
   1. A function entry `alloca` operation to allocate a ViewDescriptor.
   2. A load of the ViewDescriptor from the pointer allocated in 1.
   3. Updates to the ViewDescriptor to introduce the data ptr, offset, size
      and stride. Size and stride are permutations of the original values.
   4. A store of the resulting ViewDescriptor to the alloca'ed pointer.
The linalg.transpose op is replaced by the alloca'ed pointer.

PiperOrigin-RevId: 265169112
parent 2c2c9ffd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment