Skip to content

Commit a496844

Browse files
authored
[SYCL][E2E] Add lit expansion for floating point model (#15476)
This option is set differently based on the compiler driver. With the LLVM driver we need to use `-ffp-model=`, while with the MSVC driver we would use `/fp:` This patch introduces the expansion `%fp-model-` to address this.
1 parent 70cde37 commit a496844

29 files changed

+37
-36
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
1111
// UNSUPPORTED: gpu-intel-dg2
1212

13-
// RUN: %{build} -ffp-model=precise -o %t.out
13+
// RUN: %{build} %fp-model-precise -o %t.out
1414
// RUN: %{run} %t.out
1515

1616
#include "../common.hpp"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: aspect-ext_intel_matrix
1111
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1212

13-
// RUN: %{build} -o %t_vnni.out -DVNNI -ffp-model=precise
13+
// RUN: %{build} -o %t_vnni.out -DVNNI %fp-model-precise
1414
// RUN: %{run} %t_vnni.out
1515

1616
// TODO: add row major compilation and run once Sub-group size 32

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// UNSUPPORTED: gpu-intel-dg2
1010
// REQUIRES: aspect-ext_intel_matrix, gpu
1111

12-
// RUN: %{build} -o %t_gpu_vnni.out -ffp-model=precise -DSLM -DVNNI
12+
// RUN: %{build} -o %t_gpu_vnni.out %fp-model-precise -DSLM -DVNNI
1313
// RUN: %{run} %t_gpu_vnni.out
1414

1515
// TODO: add row major compilation and run once Sub-group size 32

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: aspect-ext_intel_matrix, gpu
1111
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1212

13-
// RUN: %{build} -o %t.out -DINIT_LIST -DVNNI -ffp-model=precise
13+
// RUN: %{build} -o %t.out -DINIT_LIST -DVNNI %fp-model-precise
1414
// RUN: %{run} %t.out
1515

1616
// -ffp-model=precise is added to not depend on compiler defaults.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: aspect-ext_intel_matrix
1111
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1212

13-
// RUN: %{build} -mllvm -inline-threshold=5000 -ffp-model=precise -o %t.out -DMANUAL_UNROLL -DVNNI
13+
// RUN: %{build} -mllvm -inline-threshold=5000 %fp-model-precise -o %t.out -DMANUAL_UNROLL -DVNNI
1414
// RUN: %{run} %t.out
1515

1616
// -mllvm -inline-threshold added as a workaround,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: aspect-ext_intel_matrix, gpu
1111
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1212

13-
// RUN: %{build} -mllvm -inline-threshold=5000 -ffp-model=precise -o %t_gpu.out -DINIT_LIST -DMANUAL_UNROLL -DVNNI
13+
// RUN: %{build} -mllvm -inline-threshold=5000 %fp-model-precise -o %t_gpu.out -DINIT_LIST -DMANUAL_UNROLL -DVNNI
1414
// RUN: %{run} %t_gpu.out
1515

1616
// -mllvm -inline-threshold added as a workaround,

sycl/test-e2e/Matrix/SPVCooperativeMatrix/SG32/joint_matrix_apply_two_matrices.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
1111
// UNSUPPORTED: gpu-intel-dg2
1212

13-
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -ffp-model=precise -o %t.out
13+
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX %fp-model-precise -o %t.out
1414
// RUN: %{run} %t.out
1515

1616
// XFAIL: cpu

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: aspect-ext_intel_matrix
1111
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1212

13-
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_vnni.out -DVNNI -ffp-model=precise
13+
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_vnni.out -DVNNI %fp-model-precise
1414
// RUN: %{run} %t_vnni.out
1515

1616
// TODO: add row major compilation and run once Sub-group size 32

sycl/test-e2e/Matrix/SPVCooperativeMatrix/SG32/joint_matrix_bf16_fill_k_cache_SLM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// UNSUPPORTED: gpu-intel-dg2
1010
// REQUIRES: aspect-ext_intel_matrix, gpu
1111

12-
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu_vnni.out -ffp-model=precise -DSLM -DVNNI
12+
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu_vnni.out %fp-model-precise -DSLM -DVNNI
1313
// RUN: %{run} %t_gpu_vnni.out
1414

1515
// TODO: add row major compilation and run once Sub-group size 32

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// REQUIRES: aspect-ext_intel_matrix, gpu
1111
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1212

13-
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t.out -DINIT_LIST -DVNNI -ffp-model=precise
13+
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t.out -DINIT_LIST -DVNNI %fp-model-precise
1414
// RUN: %{run} %t.out
1515

1616
// -ffp-model=precise is added to not depend on compiler defaults.

0 commit comments

Comments
 (0)