File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ module {
23
23
// CHECK: %[[VAL_0:.*]] = llvm.mlir.constant(2 : i32) : i32
24
24
// CHECK: %[[VAL_1:.*]] = llvm.mlir.constant(0 : i32) : i32
25
25
// 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>
28
28
// CHECK: %[[VAL_5:.*]] = llvm.call @mgpurtPGOGetAlternative(%[[VAL_4]], %[[VAL_0]]) : (!llvm.ptr<i8>, i32) -> i32
29
29
// CHECK: %[[VAL_6:.*]] = llvm.icmp "eq" %[[VAL_5]], %[[VAL_1]] : i32
30
30
// CHECK: llvm.cond_br %[[VAL_6]], ^bb1, ^bb2
Original file line number Diff line number Diff line change 2
2
// 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
3
3
// TODO only do this test if we have a cuda build
4
4
5
- #include " Inputs/cuda.h"
5
+ #include " ../ Inputs/cuda.h"
6
6
#include " __clang_cuda_builtin_vars.h"
7
7
8
8
__device__ float dev_array[2 ];
Original file line number Diff line number Diff line change @@ -17,11 +17,16 @@ config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
17
17
18
18
# suffixes: A list of file extensions to treat as test files. This is overriden
19
19
# by individual lit.local.cfg files in the test subdirectories.
20
+
20
21
config .suffixes = ['.c' , '.cpp' , '.cu' ]
21
22
22
23
# excludes: A list of directories or files to exclude from the testsuite even
23
24
# 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' ]
25
30
26
31
# test_source_root: The root path where tests are located.
27
32
config .test_source_root = os .path .dirname (__file__ )
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
8
8
config.mlir_clang_obj_root = "@MLIR_CLANG_BINARY_DIR@"
9
9
config.target_triple = "@TARGET_TRIPLE@"
10
10
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@"
11
13
12
14
# Support substitution of the tools and build_mode with user parameters.
13
15
# This is used when we can't determine the tool dir at configuration time.
You can’t perform that action at this time.
0 commit comments