Zlib decompression on the DPU - #3
Conversation
git-subtree-dir: upmem-zlib/zlib git-subtree-split: cacf7f1d4e3d44d871b605da3b647f07d718623f
… dpu_decopmression driver
…ory of the zlib library
|
I compiled & ran this to compress a file from the host - works! Show the section headers in the ELF with: I modified the Makefile to produce intermediate .o files when compiling the DPU program by removing the 'flto' and 'w' flags from DPU_CFLAGS, and adding a new list of .o targets, and a new rule to build .o files from each .c file. That produced the following files: By reading the ELF section headers on all files, and searching the results for 'AX' (loadable and executable) concatenating them to a single file, we can see that .text.inflate is the largest section (0x3920 bytes), and it belongs to decompress/inflate.o
|
Is this that large without LTO?, but with O2/O3? I would try optimizing for size (-Os) to see how well it does. FWIW I feel like other embedded systems have probably wanted to use inflate, so I wonder what approaches they have taken, here. You could always try Os on just the inflate object, too. |
I've just tried optimizing for size with (-Os) and it brings down the size of the .text section to around 29K, which is still too much. I'll look into finding out how others have approached this for embedded systems |
|
Ok - it might also be worth looking at what other things are making the file large. inflate is required right? are there other things being linked in that are not needed? |
I'll probably try looking in this direction as well. Inflate is required, but I'm sure we don't need everything that we're getting from inflate. Out of intuition, for example, we probably don't need both crc32 and adler32 at the same time so we can remove one. I'll look through the inflate code itself to see what parts we can trim and see how much of an impact that has on the size. |
|
After trimming down parts of inflate that aren't needed, the next issue I'm struggling with is to do with an |
…ble to lower memory intrinsic
…clang intrinsic memory error
We are currently able to compile the dpu program, however we fail to load the binary on the DPU. Requesting a merge so that Joel can take a look at the issue