llvm-capstone/mlir/test
Krzysztof Drewniak 750e90e440
[mlir][ArithToAMDGPU] Add option for saturating truncation to fp8 (#74153)
Many machine-learning applications (and most software written at AMD)
expect the operation that truncates floats to 8-bit floats to be
saturatinng. That is, they expect `truncf 256.0 : f32 to f8E4M3FNUZ` to
yield `240.0`, not `NaN`, and similarly for negative numbers. However,
the underlying hardware instruction that can be used for this truncation
implements overflow-to-NaN semantics.

To enable handling this usecase, we add the saturate-fp8-truncf option
to ArithToAMDGPU (off by default), which causes the requisite clamping
code to be emitted. Said clamping code ensures that Inf and NaN are
passed through exactly (and thus trancate to NaN).

Per review feedback, this commit efactors
createScalarOrSplatConstant() to the Arith dialect utilities and uses
it in this code. It also fixes naming of existing patterns and
switches from vector.extractelement/insertelement to
vector.extract/insert.
2024-01-23 16:52:21 -06:00
..
Analysis [mlir][dataflow]Fix dense backward dataflow intraprocedural hook (#76865) 2024-01-04 10:28:12 +01:00
Bytecode
CAPI
Conversion [mlir][ArithToAMDGPU] Add option for saturating truncation to fp8 (#74153) 2024-01-23 16:52:21 -06:00
Dialect [mlir][openacc] Update acc.loop to be a proper loop like operation (#67355) 2024-01-22 10:31:29 -08:00
Examples [mlir] introduce debug transform dialect extension (#77595) 2024-01-12 13:24:02 +01:00
Integration [mlir][sparse] adjust compression scheme for example (#79212) 2024-01-23 14:51:46 -08:00
Interfaces [mlir][Linalg] Change linalg.transpose to use the output indexing map as identity. (#77951) 2024-01-12 14:17:51 -08:00
IR [mlir] Add op printing flag to skip regions (#77726) 2024-01-11 17:52:41 -05:00
lib [mlir][bufferization] Buffer deallocation: Make op preconditions stricter (#75127) 2024-01-21 11:10:09 +01:00
mlir-cpu-runner [mlir] Update "UNSUPPORTED" directive in a test 2024-01-22 20:04:19 +00:00
mlir-linalg-ods-gen
mlir-lsp-server
mlir-opt
mlir-pdll
mlir-pdll-lsp-server
mlir-query
mlir-reduce
mlir-spirv-cpu-runner
mlir-tblgen [MLIR][ODS] Check hasProperties when generating populateDefaultAttrs (#78525) 2024-01-18 21:57:20 -08:00
mlir-translate
mlir-vulkan-runner
Pass
python [MLIR][NVVM] Explicit Data Type for Output in wgmma.mma_async (#78713) 2024-01-22 08:37:20 +01:00
Rewrite
Target [mlir][Target] Teach dense_resource conversion to LLVMIR Target (#78958) 2024-01-23 13:30:34 -08:00
tblgen-lsp-server
tblgen-to-irdl
Transforms [mlir] allow inlining complex ops (#77514) 2024-01-10 09:23:36 -08:00
Unit
APITest.h
CMakeLists.txt [mlir] Add mlir_arm_runner_utils library for use in integration tests (#78583) 2024-01-22 09:28:13 +00:00
lit.cfg.py [mlir] Add mlir_arm_runner_utils library for use in integration tests (#78583) 2024-01-22 09:28:13 +00:00
lit.site.cfg.py.in