From 7183562ca7f4eb9db574332b2230ddad18cd256e Mon Sep 17 00:00:00 2001 From: Ivan Radanov Ivanov Date: Fri, 21 Jun 2024 16:34:20 +0900 Subject: [PATCH] Enable pluto opt tests only when pluto is enabled --- tools/cgeist/Test/CUDA/polybench-cuda/gemm/gemm.cu | 2 +- tools/cgeist/Test/CUDA/polybench-cuda/lu/lu.cu | 2 +- tools/cgeist/Test/CUDA/polybench-cuda/seidel-2d/seidel-2d.cu | 2 +- tools/cgeist/Test/lit.cfg | 4 +++- tools/cgeist/Test/lit.site.cfg.in | 2 ++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/cgeist/Test/CUDA/polybench-cuda/gemm/gemm.cu b/tools/cgeist/Test/CUDA/polybench-cuda/gemm/gemm.cu index 9058a2219a63..0870ade4296c 100644 --- a/tools/cgeist/Test/CUDA/polybench-cuda/gemm/gemm.cu +++ b/tools/cgeist/Test/CUDA/polybench-cuda/gemm/gemm.cu @@ -1,6 +1,6 @@ // clang-format off // RUN: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm 1 10 10 10 -// RUN: cgeist %s %stdinclude %polymer_cudaopts -O3 -o %s.execm && %s.execm 1 10 10 10 +// RUN: [ "%polymer_pluto_enabled" == "" ] || cgeist %s %stdinclude %polymer_pluto_cudaopts -O3 -o %s.execm && %s.execm 1 10 10 10 // clang-format on /** * gemm.c: This file is part of the PolyBench/C 3.2 test suite. diff --git a/tools/cgeist/Test/CUDA/polybench-cuda/lu/lu.cu b/tools/cgeist/Test/CUDA/polybench-cuda/lu/lu.cu index 6edc03b28397..9a35a6f6020e 100644 --- a/tools/cgeist/Test/CUDA/polybench-cuda/lu/lu.cu +++ b/tools/cgeist/Test/CUDA/polybench-cuda/lu/lu.cu @@ -1,6 +1,6 @@ // clang-format off // RUN: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm 1 100 -// RUN: cgeist %s %stdinclude %cudaopts_polymer -O3 -o %s.execm && %s.execm 1 100 +// RUN: [ "%polymer_pluto_enabled" == "" ] || cgeist %s %stdinclude %polymer_pluto_cudaopts -O3 -o %s.execm && %s.execm 1 10 10 10 // clang-format on /** * lu.c: This file is part of the PolyBench/C 3.2 test suite. diff --git a/tools/cgeist/Test/CUDA/polybench-cuda/seidel-2d/seidel-2d.cu b/tools/cgeist/Test/CUDA/polybench-cuda/seidel-2d/seidel-2d.cu index 60e769a075d1..1d373c12e540 100644 --- a/tools/cgeist/Test/CUDA/polybench-cuda/seidel-2d/seidel-2d.cu +++ b/tools/cgeist/Test/CUDA/polybench-cuda/seidel-2d/seidel-2d.cu @@ -1,6 +1,6 @@ // clang-format off // RUN: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm 1 10 2 -// RUN: cgeist %s %stdinclude %polymer_cudaopts -O3 -o %s.execm && %s.execm 1 10 2 +// RUN: [ "%polymer_pluto_enabled" == "" ] || cgeist %s %stdinclude %polymer_pluto_cudaopts -O3 -o %s.execm && %s.execm 1 10 10 10 // clang-format on /** * seidel-2d.c: This file is part of the PolyBench/C 3.2 test suite. diff --git a/tools/cgeist/Test/lit.cfg b/tools/cgeist/Test/lit.cfg index 190a257dbc3c..c3855b175d61 100644 --- a/tools/cgeist/Test/lit.cfg +++ b/tools/cgeist/Test/lit.cfg @@ -74,4 +74,6 @@ config.substitutions.append(('%resourcedir', '-resource-dir=' + resource_dir)) config.substitutions.append(('%polyexec', config.test_source_root + '/polybench/utilities/polybench.c -D POLYBENCH_TIME -D POLYBENCH_NO_FLUSH_CACHE -D MINI_DATASET')) config.substitutions.append(('%polyverify', config.test_source_root + '/polybench/utilities/polybench.c -D POLYBENCH_DUMP_ARRAYS -D POLYBENCH_NO_FLUSH_CACHE -D MINI_DATASET')) config.substitutions.append(('%cudaopts', cudaopts)) -config.substitutions.append(('%polymer_cudaopts', cudaopts + ' --polyhedral-opt --raise-scf-to-affine')) +config.substitutions.append(('%polymer_pluto_cudaopts', cudaopts + ' --polyhedral-opt --raise-scf-to-affine')) +config.substitutions.append(('%polymer_enabled', config.polymer_enabled)) +config.substitutions.append(('%polymer_pluto_enabled', config.polymer_pluto_enabled)) diff --git a/tools/cgeist/Test/lit.site.cfg.in b/tools/cgeist/Test/lit.site.cfg.in index f3f734d12079..d1669f319406 100644 --- a/tools/cgeist/Test/lit.site.cfg.in +++ b/tools/cgeist/Test/lit.site.cfg.in @@ -11,6 +11,8 @@ config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@") config.polygeist_enable_cuda = "@POLYGEIST_ENABLE_CUDA@" config.cudart_static_path = "@CUDA_cudart_static_LIBRARY@" config.polygeist_enable_rocm = "@POLYGEIST_ENABLE_ROCM@" +config.polymer_enabled = "@POLYGEIST_ENABLE_POLYMER@" +config.polymer_pluto_enabled = "@POLYGEIST_POLYMER_ENABLE_PLUTO@" # Support substitution of the tools and build_mode with user parameters. # This is used when we can't determine the tool dir at configuration time.