Optimize MessagePackLoadLibraryFile (#1471)
Optimize MessagePackLoadLibraryFile (#1471)

* Optimize MessagePackLoadLibraryFile

Most of this optimization comes from switching to fread. The construct

    std::vector<uint8_t> data((std::istreambuf_iterator<char>(in)),
                              std::istreambuf_iterator<char>());

is--from a performance perspective--the worst commonly used way to read
a whole file into memory in C++. It is an order of magnitude slower
than a call to fread. Simply replacing that call with a naive C
function to read the whole file provides a ~10% overall speedup in
MessagePackLoadLibraryFile.

As an additional optimization, the msgpack streaming API can be used to
parse the data in chunks. Interleaving the file reads with parsing
allows the OS prefetcher some time to cache the next chunk while the
CPU does useful parsing work. I didn't carefully tune the chunk size,
but 512 KiB worked well on my machine.

The use of the streaming API was a somewhat more complex optimization,
and it only provided perhaps another 5% overall speedup, but it seemed
worthwhile nonetheless. There remain enormous optimizations to be found
within PointerMappingTraits and the file read/parse time will become
a larger relative portion of the overall function runtime once the
PointerMappingTraits portion is optimized.

* Cleanup MessagePackLoadLibraryFile

- Use ifstream to match the rest of Tensile. The difference in
  performance between ifstream::read and fread is very small. My
  benchmark was not sensitive enough to distinguish them.

- Apply clang-format.
ROCmSoftwarePlatform/Tensile,ROCmSoftwarePlatform/Tensile,ROCmSoftwarePlatform/Tensile