Skip to content

Commit aadd1e7

Browse files
authored
[SYCL][E2E][Joint Matrix] Added -ffp-model=precise to some tests (#12429)
Added -ffp-model=precise to joint_matrix_bf16_fill_k_cache tests as they do math with floating numbers and can get NaN result, which indicates error. Some compiler version may have different fp-model defaults, so this option make the test indipendent of compiler defaults.
1 parent 5f6dc36 commit aadd1e7

12 files changed

+32
-14
lines changed

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
// REQUIRES: matrix
99
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1010

11-
// RUN: %{build} -o %t.out
11+
// RUN: %{build} -o %t.out -ffp-model=precise
1212
// RUN: %{run} %t.out
1313

14+
// -ffp-model=precise is added to not depend on compiler defaults.
15+
1416
#include "../common.hpp"
1517
#include <cstddef>
1618

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache_init.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
// REQUIRES: matrix, gpu
99
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1010

11-
// RUN: %{build} -o %t.out -DINIT_LIST
11+
// RUN: %{build} -o %t.out -DINIT_LIST -ffp-model=precise
1212
// RUN: %{run} %t.out
1313

14+
// -ffp-model=precise is added to not depend on compiler defaults.
15+
1416
#include "../common.hpp"
1517
#include <cstddef>
1618

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache_unroll.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
// REQUIRES: matrix
99
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1010

11-
// RUN: %{build} -mllvm -inline-threshold=5000 -o %t_gpu.out -DMANUAL_UNROLL
11+
// RUN: %{build} -mllvm -inline-threshold=5000 -ffp-model=precise -o %t_gpu.out -DMANUAL_UNROLL
1212
// RUN: %if gpu %{ %{run} %t_gpu.out %}
1313

14-
// RUN: %{build} -mllvm -inline-threshold=5000 -o %t_cpu.out -DMANUAL_UNROLL -DtM=16 -DtK=32 -DNCACHE1=32 -DKCACHE1=32
14+
// RUN: %{build} -mllvm -inline-threshold=5000 -ffp-model=precise -o %t_cpu.out -DMANUAL_UNROLL -DtM=16 -DtK=32 -DNCACHE1=32 -DKCACHE1=32
1515
// RUN: %if cpu %{ %{run} %t_cpu.out %}
1616

1717
// -mllvm -inline-threshold added as a workaround,
1818
// since IGC doesn't support some variants of IR for Joint Matrix currently
19+
// -ffp-model=precise is added to not depend on compiler defaults.
1920

2021
#include "../common.hpp"
2122
#include <cstddef>

sycl/test-e2e/Matrix/SG32/joint_matrix_bf16_fill_k_cache_unroll_init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
// REQUIRES: matrix, gpu
99
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1010

11-
// RUN: %{build} -mllvm -inline-threshold=5000 -o %t_gpu.out -DINIT_LIST -DMANUAL_UNROLL
11+
// RUN: %{build} -mllvm -inline-threshold=5000 -ffp-model=precise -o %t_gpu.out -DINIT_LIST -DMANUAL_UNROLL
1212
// RUN: %{run} %t_gpu.out
1313

1414
// -mllvm -inline-threshold added as a workaround,
1515
// since IGC doesn't support some variants of IR for Joint Matrix currently
16+
// -ffp-model=precise is added to not depend on compiler defaults.
1617

1718
#include "../common.hpp"
1819
#include <cstddef>

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix-xmx8
99

10-
// RUN: %{build} -o %t.out
10+
// RUN: %{build} -o %t.out -ffp-model=precise
1111
// RUN: %{run} %t.out
1212

13+
// -ffp-model=precise is added to not depend on compiler defaults.
14+
1315
#include "../common.hpp"
1416
#include <cstddef>
1517

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache_init.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix-xmx8
99

10-
// RUN: %{build} -o %t.out -DINIT_LIST
10+
// RUN: %{build} -o %t.out -DINIT_LIST -ffp-model=precise
1111
// RUN: %{run} %t.out
1212

13+
// -ffp-model=precise is added to not depend on compiler defaults.
14+
1315
#include "../common.hpp"
1416
#include <cstddef>
1517

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache_unroll.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix-xmx8
99

10-
// RUN: %{build} -mllvm -inline-threshold=2000 -o %t.out -DMANUAL_UNROLL
10+
// RUN: %{build} -mllvm -inline-threshold=2000 -ffp-model=precise -o %t.out -DMANUAL_UNROLL
1111
// RUN: %{run} %t.out
1212

1313
// -mllvm -inline-threshold=2000 added as a workaround,
1414
// since IGC doesn't support some variants of IR for Joint Matrix currently
15+
// -ffp-model=precise is added to not depend on compiler defaults.
1516

1617
#include "../common.hpp"
1718
#include <cstddef>

sycl/test-e2e/Matrix/XMX8/joint_matrix_bf16_fill_k_cache_unroll_init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix-xmx8
99

10-
// RUN: %{build} -mllvm -inline-threshold=2000 -o %t.out -DINIT_LIST -DMANUAL_UNROLL
10+
// RUN: %{build} -mllvm -inline-threshold=2000 -ffp-model=precise -o %t.out -DINIT_LIST -DMANUAL_UNROLL
1111
// RUN: %{run} %t.out
1212

1313
// -mllvm -inline-threshold=2000 added as a workaround,
1414
// since IGC doesn't support some variants of IR for Joint Matrix currently
15+
// -ffp-model=precise is added to not depend on compiler defaults.
1516

1617
#include "../common.hpp"
1718
#include <cstddef>

sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix
99

10-
// RUN: %{build} -o %t.out
10+
// RUN: %{build} -o %t.out -ffp-model=precise
1111
// RUN: %{run} %t.out
1212

13+
// -ffp-model=precise is added to not depend on compiler defaults.
14+
1315
#include "common.hpp"
1416
#include <cstddef>
1517

sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_init.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix, gpu
99

10-
// RUN: %{build} -o %t.out -DINIT_LIST
10+
// RUN: %{build} -o %t.out -DINIT_LIST -ffp-model=precise
1111
// RUN: %{run} %t.out
1212

13+
// -ffp-model=precise is added to not depend on compiler defaults.
14+
1315
#include "common.hpp"
1416
#include <cstddef>
1517
#define SG_SZ 16

sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_unroll.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix
99

10-
// RUN: %{build} -mllvm -inline-threshold=2000 -o %t_gpu.out -DMANUAL_UNROLL
10+
// RUN: %{build} -mllvm -inline-threshold=2000 -ffp-model=precise -o %t_gpu.out -DMANUAL_UNROLL
1111
// RUN: %if gpu %{ %{run} %t_gpu.out %}
1212

13-
// RUN: %{build} -mllvm -inline-threshold=2000 -o %t_cpu.out -DMANUAL_UNROLL -DtM=16 -DtK=32 -DNCACHE1=32 -DKCACHE1=32
13+
// RUN: %{build} -mllvm -inline-threshold=2000 -ffp-model=precise -o %t_cpu.out -DMANUAL_UNROLL -DtM=16 -DtK=32 -DNCACHE1=32 -DKCACHE1=32
1414
// RUN: %if cpu %{ %{run} %t_cpu.out %}
1515

1616
// -mllvm -inline-threshold=2000 added as a workaround,
1717
// since IGC doesn't support some variants of IR for Joint Matrix currently
18+
// -ffp-model=precise is added to not depend on compiler defaults.
1819

1920
#include "common.hpp"
2021
#include <cstddef>

sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_unroll_init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: matrix, gpu
99

10-
// RUN: %{build} -mllvm -inline-threshold=2000 -o %t_gpu.out -DINIT_LIST -DMANUAL_UNROLL
10+
// RUN: %{build} -mllvm -inline-threshold=2000 -ffp-model=precise -o %t_gpu.out -DINIT_LIST -DMANUAL_UNROLL
1111
// RUN: %{run} %t_gpu.out
1212

1313
// -mllvm -inline-threshold=2000 added as a workaround,
1414
// since IGC doesn't support some variants of IR for Joint Matrix currently
15+
// -ffp-model=precise is added to not depend on compiler defaults.
1516

1617
#include "common.hpp"
1718
#include <cstddef>

0 commit comments

Comments
 (0)