Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanradanov committed May 17, 2024
1 parent 7b00833 commit 4b7d95d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 10 deletions.
18 changes: 12 additions & 6 deletions lib/polygeist/Passes/AffineOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,24 @@ std::unique_ptr<Pass> mlir::polygeist::createAffineOptPass() {

#else

#include <cstdlib>
#include <memory>

#include "PassDetails.h"

#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"

namespace mlir {
class Pass;
}

using namespace mlir;
using namespace polygeist;
namespace {
struct AffineOptPass : public AffineOptBase<AffineOptPass> {
void runOnOperation() override {}
};
} // namespace
std::unique_ptr<mlir::Pass> mlir::polygeist::createAffineOptPass() {
abort();
return nullptr;
return std::make_unique<AffineOptPass>();
}

#endif
1 change: 1 addition & 0 deletions test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
config.substitutions.append(('%llvm_obj_root', config.llvm_obj_root))
config.substitutions.append(('%polygeist_src_root', config.polygeist_src_root))
config.substitutions.append(('%polygeist_obj_root', config.polygeist_obj_root))
config.substitutions.append(('%polymer_enabled', config.polymer_enabled))

llvm_config.with_system_environment(['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP'])

Expand Down
1 change: 1 addition & 0 deletions test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ config.polygeist_obj_root = "@POLYGEIST_BINARY_DIR@"
config.polygeist_tools_dir = "@POLYGEIST_TOOLS_DIR@"
config.polygeist_shlib_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
config.verilator_path = "@VERILATOR_PATH@"
config.polymer_enabled = "@POLYGEIST_ENABLE_POLYMER@"

# Support substitution of the tools_dir with user parameters. This is
# used when we can't determine the tool dir at configuration time.
Expand Down
2 changes: 1 addition & 1 deletion test/polygeist-opt/affine-opt.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: polygeist-opt --affine-opt %s 2>&1 | FileCheck %s
// RUN: if [ %polymer_enabled == 1 ]; then polygeist-opt --affine-opt %s 2>&1 | FileCheck %s; fi

// CHECK: <OpenScop>
// CHECK: </OpenScop>
Expand Down
3 changes: 2 additions & 1 deletion tools/cgeist/Test/CUDA/polybench-cuda/3mm/3mm.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// clang-format off
// XFAIL: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm
// XFAIL: *
// RUN: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm
// clang-format on
/**
* 3mm.c: This file is part of the PolyBench/C 3.2 test suite.
Expand Down
3 changes: 2 additions & 1 deletion tools/cgeist/Test/CUDA/polybench-cuda/mvt/mvt.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// clang-format off
// XFAIL: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm
// XFAIL: *
// RUN: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm
// clang-format on
/**
* mvt.c: This file is part of the PolyBench 3.0 test suite.
Expand Down
3 changes: 2 additions & 1 deletion tools/cgeist/Test/CUDA/polybench-cuda/reduction/reduction.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// clang-format off
// XFAIL: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm 10
// XFAIL: *
// RUN: cgeist %s %stdinclude %cudaopts -O3 -o %s.execm && %s.execm 10
// clang-format on
// This program performs sum reduction with an optimization
// removing warp divergence
Expand Down

0 comments on commit 4b7d95d

Please sign in to comment.