[Mlir-commits] [mlir] [memref] Support dense resources for memref-to-llvm (PR #79380)

Stella Laurenzo llvmlistbot at llvm.org
Wed Jan 24 23:12:24 PST 2024


stellaraccident wrote:

I think this is a test bug: dense_resource_elements takes a blob of memory and bitcasts it for access. It is the same as if someone put a char[] literal in their c program and cast it to an array of a multi byte type. It is actually a pretty important part of the contract that intervening code not go mucking with trying to manage/copy it, etc.

We use this for capturing raw memory from the framework for jit and related cases, and it is implied that if portability to another endianness is important, that is up to the user to make them agree or convert.

This is breaking because the test encodes a little endian blob. To test on big endian, it would need a big endian blob.

https://github.com/llvm/llvm-project/pull/79380


More information about the Mlir-commits mailing list