Skip to content

Commit 7515cc6

Browse files
committed
Fix tests
1 parent 71a2b1f commit 7515cc6

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

test/polygeist-opt/pgo.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ module {
2323
// CHECK: %[[VAL_0:.*]] = llvm.mlir.constant(2 : i32) : i32
2424
// CHECK: %[[VAL_1:.*]] = llvm.mlir.constant(0 : i32) : i32
2525
// CHECK: %[[VAL_2:.*]] = llvm.mlir.constant(1 : i32) : i32
26-
// CHECK: %[[VAL_3:.*]] = llvm.mlir.addressof @kernelId.0 : !llvm.ptr<array<70 x i8>>
27-
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_3]][0, 0] : (!llvm.ptr<array<70 x i8>>) -> !llvm.ptr<i8>
26+
// CHECK: %[[VAL_3:.*]] = llvm.mlir.addressof @kernelId.0 : !llvm.ptr<array<[[LEN:.*]] x i8>>
27+
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_3]][0, 0] : (!llvm.ptr<array<[[LEN]] x i8>>) -> !llvm.ptr<i8>
2828
// CHECK: %[[VAL_5:.*]] = llvm.call @mgpurtPGOGetAlternative(%[[VAL_4]], %[[VAL_0]]) : (!llvm.ptr<i8>, i32) -> i32
2929
// CHECK: %[[VAL_6:.*]] = llvm.icmp "eq" %[[VAL_5]], %[[VAL_1]] : i32
3030
// CHECK: llvm.cond_br %[[VAL_6]], ^bb1, ^bb2

tools/cgeist/Test/Verification/cudasymbols.cu renamed to tools/cgeist/Test/Verification/CUDA/cudasymbols.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cgeist %s --cuda-lower --cuda-gpu-arch=sm_60 -nocudalib -nocudainc %resourcedir --function=* -S -emit-llvm-dialect -output-intermediate-gpu=1 -emit-cuda -c | FileCheck %s
33
// TODO only do this test if we have a cuda build
44

5-
#include "Inputs/cuda.h"
5+
#include "../Inputs/cuda.h"
66
#include "__clang_cuda_builtin_vars.h"
77

88
__device__ float dev_array[2];

tools/cgeist/Test/lit.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
1717

1818
# suffixes: A list of file extensions to treat as test files. This is overriden
1919
# by individual lit.local.cfg files in the test subdirectories.
20+
2021
config.suffixes = ['.c', '.cpp', '.cu']
2122

2223
# excludes: A list of directories or files to exclude from the testsuite even
2324
# if they match the suffixes pattern.
24-
#config.excludes = ['Inputs']
25+
config.excludes = []
26+
if config.polygeist_enable_cuda == "0":
27+
config.excludes += ['CUDA']
28+
if config.polygeist_enable_rocm == "0":
29+
config.excludes += ['ROCm']
2530

2631
# test_source_root: The root path where tests are located.
2732
config.test_source_root = os.path.dirname(__file__)

tools/cgeist/Test/lit.site.cfg.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
88
config.mlir_clang_obj_root = "@MLIR_CLANG_BINARY_DIR@"
99
config.target_triple = "@TARGET_TRIPLE@"
1010
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
11+
config.polygeist_enable_cuda = "@POLYGEIST_ENABLE_CUDA@"
12+
config.polygeist_enable_rocm = "@POLYGEIST_ENABLE_ROCM@"
1113

1214
# Support substitution of the tools and build_mode with user parameters.
1315
# This is used when we can't determine the tool dir at configuration time.

0 commit comments

Comments
 (0)