[all-commits] [llvm/llvm-project] cb898e: [mlir] Make the print function in CRunnerUtil plat...

Kai Sasaki via All-commits all-commits at lists.llvm.org
Wed Mar 27 17:40:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb898e26f3321e0b861609f5fec7f7410e5b6778
      https://github.com/llvm/llvm-project/commit/cb898e26f3321e0b861609f5fec7f7410e5b6778
  Author: Kai Sasaki <lewuathe at gmail.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M mlir/lib/ExecutionEngine/CRunnerUtils.cpp
    M mlir/test/mlir-cpu-runner/test-expand-math-approx.mlir

  Log Message:
  -----------
  [mlir] Make the print function in CRunnerUtil platform agnostic (#86767)

The platform running on Apple Silicon does not seem to support the
negative nan. It causes the test failure where we explicitly specify the
negative nan bit pattern and check the output printed by the CRunnerUtil
function.

We can make the print function in the utility platform agnostic by using
the standard library functions (i.e. `std::isnan` and `std::signbit`) so
that we can run the test across platforms that do not support the
negative bit pattern.

I have added two test cases that would fail in the Apple Silicon
platform without print function changes.

```
$ uname -a
Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
```

See:
https://discourse.llvm.org/t/test-failure-of-sparse-sign-test-in-apple-silicon/77876/3



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