Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][E2E] Add lit expansion for floating point model #15476

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
// UNSUPPORTED: gpu-intel-dg2

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

#include "../common.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// TODO: add row major compilation and run once Sub-group size 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// UNSUPPORTED: gpu-intel-dg2
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// TODO: add row major compilation and run once Sub-group size 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix, gpu
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// -mllvm -inline-threshold added as a workaround,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix, gpu
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// -mllvm -inline-threshold added as a workaround,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
// UNSUPPORTED: gpu-intel-dg2

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

// XFAIL: cpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// TODO: add row major compilation and run once Sub-group size 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// UNSUPPORTED: gpu-intel-dg2
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// TODO: add row major compilation and run once Sub-group size 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix, gpu
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// XFAIL: cpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// REQUIRES: aspect-ext_intel_matrix, gpu
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943

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

// -mllvm -inline-threshold added as a workaround,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix

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

// XFAIL: cpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix

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

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

// XFAIL: cpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
// REQUIRES: aspect-ext_intel_matrix, gpu
// UNSUPPORTED: gpu-intel-dg2

// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu_vnni.out -ffp-model=precise -DOOB -DVNNI
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu_vnni.out %fp-model-precise -DOOB -DVNNI
// RUN: %{run} %t_gpu_vnni.out

// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu.out -ffp-model=precise -DOOB
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu.out %fp-model-precise -DOOB
// RUN: %{run} %t_gpu.out

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu.out -ffp-model=precise -DSLM
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t_gpu.out %fp-model-precise -DSLM
// RUN: %{run} %t_gpu.out

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix

// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -mllvm -inline-threshold=2000 -ffp-model=precise -o %t.out -DMANUAL_UNROLL -DVNNI
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -mllvm -inline-threshold=2000 %fp-model-precise -o %t.out -DMANUAL_UNROLL -DVNNI
// RUN: %{run} %t.out

// XFAIL: cpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// -mllvm -inline-threshold=2000 added as a workaround,
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Matrix/joint_matrix_apply_two_matrices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix

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

#include "common.hpp"
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix

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

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

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_OOB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
// REQUIRES: aspect-ext_intel_matrix, gpu
// UNSUPPORTED: gpu-intel-dg2

// RUN: %{build} -o %t_gpu_vnni.out -ffp-model=precise -DOOB -DVNNI
// RUN: %{build} -o %t_gpu_vnni.out %fp-model-precise -DOOB -DVNNI
// RUN: %{run} %t_gpu_vnni.out

// RUN: %{build} -o %t_gpu.out -ffp-model=precise -DOOB
// RUN: %{build} -o %t_gpu.out %fp-model-precise -DOOB
// RUN: %{run} %t_gpu.out

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_SLM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// RUN: %{build} -o %t_gpu.out -ffp-model=precise -DSLM
// RUN: %{build} -o %t_gpu.out %fp-model-precise -DSLM
// RUN: %{run} %t_gpu.out

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
// REQUIRES: aspect-ext_intel_matrix
// UNSUPPORTED: gpu-intel-dg2

// RUN: %{build} -o %t_vnni.out -DPREFETCH -DVNNI -ffp-model=precise
// RUN: %{build} -o %t_vnni.out -DPREFETCH -DVNNI %fp-model-precise
// RUN: %{run} %t_vnni.out

// RUN: %{build} -o %t.out -DPREFETCH -ffp-model=precise
// RUN: %{build} -o %t.out -DPREFETCH %fp-model-precise
// RUN: %{run} %t.out

// -ffp-model=precise is added to not depend on compiler defaults.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix

// RUN: %{build} -mllvm -inline-threshold=2000 -ffp-model=precise -o %t.out -DMANUAL_UNROLL -DVNNI
// RUN: %{build} -mllvm -inline-threshold=2000 %fp-model-precise -o %t.out -DMANUAL_UNROLL -DVNNI
// RUN: %{run} %t.out

// -mllvm -inline-threshold=2000 added as a workaround,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: aspect-ext_intel_matrix, gpu

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

// -mllvm -inline-threshold=2000 added as a workaround,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// DEFINE: %{ffpflags} = %if cl_options %{/clang:-ffp-model=fast%} %else %{-ffp-model=fast%}
// DEFINE: %{Oz} = %if cl_options %{/clang:-Oz%} %else %{-Oz%}
// DEFINE: %{O} = %if cl_options %{/clang:-O%} %else %{-O%}
// RUN: %{build} %debug_option %{ffpflags} -o %t.out
// RUN: %{build} %debug_option %fp-model-fast -o %t.out
// RUN: %{build} %debug_option -Os -o %t.out
// RUN: %{build} %debug_option %{Oz} -o %t.out
// RUN: %{build} %debug_option -Og -o %t.out
Expand Down
2 changes: 2 additions & 0 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def open_check_file(file_name):
config.substitutions.append(("%fPIC", ""))
config.substitutions.append(("%shared_lib", "/LD"))
config.substitutions.append(("%no_opt", "/Od"))
config.substitutions.append(("%fp-model-", "/fp:"))
else:
config.substitutions.append(
(
Expand All @@ -383,6 +384,7 @@ def open_check_file(file_name):
)
config.substitutions.append(("%shared_lib", "-shared"))
config.substitutions.append(("%no_opt", "-O0"))
config.substitutions.append(("%fp-model-", "-ffp-model="))

# Check if user passed verbose-print parameter, if yes, add VERBOSE_PRINT macro
if "verbose-print" in lit_config.params:
Expand Down
Loading