From 7c419ab7ca91ccb68699f540200c7d5a10d56ad6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 01:20:05 +0000 Subject: [PATCH] [LLVM] Bump to 86b7f51bb --- .../mlir/extras/runtime/passes.py | 23 +++++++++++-------- .../mlir-python-mcp/mlir_python_mcp/passes.py | 23 +++++++++++-------- third_party/llvm-project | 2 +- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/projects/eudsl-python-extras/mlir/extras/runtime/passes.py b/projects/eudsl-python-extras/mlir/extras/runtime/passes.py index c2f3a7f7a..3470589e0 100644 --- a/projects/eudsl-python-extras/mlir/extras/runtime/passes.py +++ b/projects/eudsl-python-extras/mlir/extras/runtime/passes.py @@ -2146,19 +2146,24 @@ def convert_math_to_spirv(self): def convert_math_to_xevm( self, convert_arith: bool = None, convert_to_ocl: bool = None ): - """Convert (fast) math operations to native XeVM/SPIRV equivalents + """Convert math operations to their XeVM/SPIRV OpenCL equivalents - This pass converts supported math ops marked with the `afn` fastmath flag - to function calls for OpenCL `native_` math intrinsics: These intrinsics - are typically mapped directly to native device instructions, often resulting - in better performance. However, the precision/error of these intrinsics - are implementation-defined, and thus math ops are only converted when they - have the `afn` fastmath flag enabled. However, if the `convertToOCL` flag is - set then all supported math ops would be lowered to OpenCL math intrinsics. + This pass lowers supported math ops to OpenCL math intrinsic calls. The + fastmath flag on each op picks which intrinsic is used: + + * Ops marked `afn` or `fast` become calls to OpenCL `native_` intrinsics. + Both work because `fast` is a group flag that expands to every fastmath + bit, `afn` included. These intrinsics are typically mapped directly to + native device instructions, often resulting in better performance. Their + precision/error is implementation-defined, so `afn` is what opts in. + Other flags on their own (`nnan`, `ninf`, ...) do not. + * Every other op becomes a call to the precise OpenCL intrinsic from the + `__spirv_ocl_` extended instruction set. Set the `convertToOCL` flag to + `false` to leave these ops alone instead. Args: convert_arith: Convert supported Arith ops (e.g. arith.divf) as well. - convert_to_ocl: Convert supported Math ops to OCL intrinsics. + convert_to_ocl: Convert Math ops without `afn` fastmath to precise OCL intrinsics. """ self.add_pass( "convert-math-to-xevm", diff --git a/projects/mlir-python-mcp/mlir_python_mcp/passes.py b/projects/mlir-python-mcp/mlir_python_mcp/passes.py index c2f3a7f7a..3470589e0 100644 --- a/projects/mlir-python-mcp/mlir_python_mcp/passes.py +++ b/projects/mlir-python-mcp/mlir_python_mcp/passes.py @@ -2146,19 +2146,24 @@ def convert_math_to_spirv(self): def convert_math_to_xevm( self, convert_arith: bool = None, convert_to_ocl: bool = None ): - """Convert (fast) math operations to native XeVM/SPIRV equivalents + """Convert math operations to their XeVM/SPIRV OpenCL equivalents - This pass converts supported math ops marked with the `afn` fastmath flag - to function calls for OpenCL `native_` math intrinsics: These intrinsics - are typically mapped directly to native device instructions, often resulting - in better performance. However, the precision/error of these intrinsics - are implementation-defined, and thus math ops are only converted when they - have the `afn` fastmath flag enabled. However, if the `convertToOCL` flag is - set then all supported math ops would be lowered to OpenCL math intrinsics. + This pass lowers supported math ops to OpenCL math intrinsic calls. The + fastmath flag on each op picks which intrinsic is used: + + * Ops marked `afn` or `fast` become calls to OpenCL `native_` intrinsics. + Both work because `fast` is a group flag that expands to every fastmath + bit, `afn` included. These intrinsics are typically mapped directly to + native device instructions, often resulting in better performance. Their + precision/error is implementation-defined, so `afn` is what opts in. + Other flags on their own (`nnan`, `ninf`, ...) do not. + * Every other op becomes a call to the precise OpenCL intrinsic from the + `__spirv_ocl_` extended instruction set. Set the `convertToOCL` flag to + `false` to leave these ops alone instead. Args: convert_arith: Convert supported Arith ops (e.g. arith.divf) as well. - convert_to_ocl: Convert supported Math ops to OCL intrinsics. + convert_to_ocl: Convert Math ops without `afn` fastmath to precise OCL intrinsics. """ self.add_pass( "convert-math-to-xevm", diff --git a/third_party/llvm-project b/third_party/llvm-project index de9ad5134..86b7f51bb 160000 --- a/third_party/llvm-project +++ b/third_party/llvm-project @@ -1 +1 @@ -Subproject commit de9ad513460a1a5439b0b8d6d5c7a51a3634bc20 +Subproject commit 86b7f51bbc3581d3b8a46023c7ae2012edd5bc38