[PATCH] D157204: [MLIR][Math] Add support for f16 in the expansion of math.roundeven

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 16:14:31 PDT 2023


alexander-shaposhnikov added a comment.

So the following  is going on here (adding some context):

on Windows for mlir_float16_utils we build a DLL and pass a path to it to mlir-cpu-runner, and in runtime we call printF16 from this dll => printF16 (in Float16bits.h) needs to be marked with MLIR_FLOAT16_EXPORT (in particular, MLIR_FLOAT16_EXPORT expands into dllexport if this code is built as a library).

at the same time there is another declaration of printF16 in CRunnerUtils.h, and that declaration is annotated with MLIR_CRUNNERUTILS_EXPORT. When we build SparseTensorRuntime.cpp we get two different annotations (cause it includes both headers) for printF16 and the visual studio compiler emits a warning which is treated as an error.  Since printF16 is **not** defined in CRunnerUtils.cpp it looks like this extra declaration (in CRunnerUtils.h) is actually unnecessary (and in fact - wrong). So the tentative fix would be to remove it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157204/new/

https://reviews.llvm.org/D157204



More information about the llvm-commits mailing list