[all-commits] [llvm/llvm-project] b9e642: [mlir][spirv] Add path for math.round to spirv for...

Rob Suderman via All-commits all-commits at lists.llvm.org
Thu Jul 7 12:27:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9e642afd152c2819d91bfaea028a81ff4e9454e
      https://github.com/llvm/llvm-project/commit/b9e642afd152c2819d91bfaea028a81ff4e9454e
  Author: Robert Suderman <suderman at google.com>
  Date:   2022-07-07 (Thu, 07 Jul 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOCLOps.td
    M mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
    M mlir/test/Conversion/MathToSPIRV/math-to-glsl-spirv.mlir
    M mlir/test/Conversion/MathToSPIRV/math-to-opencl-spirv.mlir

  Log Message:
  -----------
  [mlir][spirv] Add path for math.round to spirv for OCL and GLSL

OpenCL's round function matches `math.round` so we can directly lower to
the op, this includes adding the op definition to the SPIRV OCL ops.
GLSL does not guarantee rounding direction so we include custom rounding
code to guarantee correct rounding direction.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D129236




More information about the All-commits mailing list