[Mlir-commits] [mlir] [mlir][complex] Make CPU runner test platform agnostic (PR #85607)
Kai Sasaki
llvmlistbot at llvm.org
Mon Mar 18 00:05:04 PDT 2024
https://github.com/Lewuathe created https://github.com/llvm/llvm-project/pull/85607
The `correctness.mlir` test for complex dialects has been excluding the AArch64 platform. We have found that this is mainly due to the uncommon treatment of the Apple Silicon platform, which does not recognize signed NaN. We did not this behavior in AArch64 platform in general. Therefore, it is reasonable to make the test platform agnostic instead of keeping this test from running in the AArch64 platform, considering that the signness check of NaN value is not so essential here.
I confirmed this test passed in my Apple Silicon environment here.
```
$ uname -a
Darwin Kais-Mac.local 23.3.0 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 more detail: https://github.com/llvm/llvm-project/issues/58531
>From 0f111a1e495a17996acc29f6d7337e250163690d Mon Sep 17 00:00:00 2001
From: Kai Sasaki <lewuathe at gmail.com>
Date: Mon, 18 Mar 2024 15:59:27 +0900
Subject: [PATCH] [mlir][complex] Make CPU runner test platform agnostic
---
mlir/test/Integration/Dialect/Complex/CPU/correctness.mlir | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/mlir/test/Integration/Dialect/Complex/CPU/correctness.mlir b/mlir/test/Integration/Dialect/Complex/CPU/correctness.mlir
index a42ed6968d3700..4a334b73baa25e 100644
--- a/mlir/test/Integration/Dialect/Complex/CPU/correctness.mlir
+++ b/mlir/test/Integration/Dialect/Complex/CPU/correctness.mlir
@@ -9,9 +9,6 @@
// RUN: -shared-libs=%mlir_c_runner_utils |\
// RUN: FileCheck %s
-// XFAIL: target=aarch64{{.*}}
-// See: https://github.com/llvm/llvm-project/issues/58531
-
func.func @test_unary(%input: tensor<?xcomplex<f32>>,
%func: (complex<f32>) -> complex<f32>) {
%c0 = arith.constant 0 : index
@@ -189,8 +186,8 @@ func.func @entry() {
// CHECK-NEXT: 0
// CHECK-NEXT: 0
(0.0, 0.0), (-1.0, 0.0),
- // CHECK-NEXT: -nan
- // CHECK-NEXT: -nan
+ // CHECK-NEXT: nan
+ // CHECK-NEXT: nan
(1.0, 1.0), (1.0, 1.0)
// CHECK-NEXT: 0.273
// CHECK-NEXT: 0.583
More information about the Mlir-commits
mailing list