[all-commits] [llvm/llvm-project] 73eecc: [mlir] Convert 8-bit float types to i8
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Mon Jun 26 10:42:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 73eecc9ca4db5730a77e7f4144d93696c9a1c5a3
https://github.com/llvm/llvm-project/commit/73eecc9ca4db5730a77e7f4144d93696c9a1c5a3
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2023-06-26 (Mon, 26 Jun 2023)
Changed paths:
M mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
M mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
M mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
M mlir/test/Target/LLVMIR/llvmir.mlir
Log Message:
-----------
[mlir] Convert 8-bit float types to i8
Whereas LLVM currently doesn't have any types for 8-bit floats, and
whereas existing 8-bit float APIs (for instance, the AMDGCN
intrinsics) take such floats as (packed) bytes, translate the MLIR
8-bit float types to i8 during LLVM lowering.
In order to not special-case arith.constant for bitcasting constants
to their integer form, amend the MLIR to LLVM translator to turn 8-bit
float constants into i8 constants with the same value (by use of
APFloat's bitcast method).
This change can be reverted once LLVM has 8-bit float types.
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D153160
More information about the All-commits
mailing list