[all-commits] [llvm/llvm-project] 3f3ffe: [MLIR][Math][XeVM] Reintroduce MathToXeVM (math-to...
Ian Li via All-commits
all-commits at lists.llvm.org
Mon Oct 13 21:39:13 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3f3ffed9c226e2753cfe6646bfc219fe5ea48869
https://github.com/llvm/llvm-project/commit/3f3ffed9c226e2753cfe6646bfc219fe5ea48869
Author: Ian Li <ian.li at intel.com>
Date: 2025-10-13 (Mon, 13 Oct 2025)
Changed paths:
A mlir/include/mlir/Conversion/MathToXeVM/MathToXeVM.h
M mlir/include/mlir/Conversion/Passes.h
M mlir/include/mlir/Conversion/Passes.td
M mlir/lib/Conversion/CMakeLists.txt
A mlir/lib/Conversion/MathToXeVM/CMakeLists.txt
A mlir/lib/Conversion/MathToXeVM/MathToXeVM.cpp
A mlir/test/Conversion/MathToXeVM/lit.local.cfg
A mlir/test/Conversion/MathToXeVM/math-to-xevm.mlir
A mlir/test/Conversion/MathToXeVM/native-spirv-builtins.mlir
Log Message:
-----------
[MLIR][Math][XeVM] Reintroduce MathToXeVM (math-to-xevm) pass (#162934)
This PR is a fix for https://github.com/llvm/llvm-project/pull/159878,
which failed in postcommit testing due to linker errors that were not
caught in precommit.
Original PR:
---
This PR introduces a `MathToXeVM` pass, which implements support for the
`afn` fastmath flag for SPIRV/XeVM targets - It takes supported `Math`
Ops with the `afn` flag, and converts them to function calls to OpenCL
`native_` intrinsics.
These intrinsic functions are supported by the SPIRV backend, and are
automatically converted to `OpExtInst` calls to `native_` ops from the
OpenCL SPIRV ext. inst. set when outputting to SPIRV/XeVM.
Note:
- This pass also supports converting `arith.divf` to native equivalents.
There is an option provided in the pass to turn this behavior off.
- This pass preserves fastmath flags, but these flags are currently
ignored by the SPIRV backend. Thus, in order to generate SPIRV that
truly preserves fastmath flags, support needs to be added to the SPIRV
backend.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list