Skip to content

Commit

Permalink
test crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sdasgup3 committed Mar 16, 2024
1 parent dc4bc72 commit 03ae0eb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/buildAndTestCMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,15 @@ jobs:
STABLEHLO_ENABLE_BINDINGS_PYTHON: OFF
STABLEHLO_ENABLE_SANITIZER: address

- name: my runner
shell: bash
run: |
/home/runner/work/stablehlo/stablehlo/stablehlo-build/bin/stablehlo-opt /home/runner/work/stablehlo/stablehlo/stablehlo/conversions/linalg/tests/miscellaneous.mlir --stablehlo-legalize-to-linalg --split-input-file --canonicalize
- name: Build and Test StableHLO (with Python bindings)
shell: bash
run: |
./build_tools/github_actions/ci_build_cmake.sh "$LLVM_BUILD_DIR" "$STABLEHLO_BUILD_DIR"
env:
CMAKE_BUILD_TYPE: Release
STABLEHLO_ENABLE_BINDINGS_PYTHON: ON
STABLEHLO_ENABLE_BINDINGS_PYTHON: ON
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ cc_binary(
":tosa_passes",
"//stablehlo/tests:check_ops",
"//stablehlo/tests:test_utils",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:AllExtensions",
"@llvm-project//mlir:AllPassesAndDialects",
"@llvm-project//mlir:MlirOptLib",
Expand Down
2 changes: 1 addition & 1 deletion build_tools/github_actions/ci_build_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ cmake -GNinja \

# Build and Test StableHLO
cd "$STABLEHLO_BUILD_DIR" || exit
ninja check-stablehlo-ci
ninja
2 changes: 2 additions & 0 deletions examples/c++/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cc_binary(
],
deps = [
"//:stablehlo_ops",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:QuantOps",
Expand All @@ -38,6 +39,7 @@ cc_test(
],
deps = [
"//:stablehlo_ops",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:QuantOps",
Expand Down
3 changes: 3 additions & 0 deletions examples/c++/stablehlo_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "llvm/Support/PrettyStackTrace.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/IR/BuiltinOps.h"
Expand All @@ -20,6 +21,8 @@ limitations under the License.
#include "stablehlo/dialect/StablehloOps.h"

int main() {
llvm::EnablePrettyStackTrace(); // Enable pretty stack traces

mlir::MLIRContext context;

/** create module **/
Expand Down
2 changes: 2 additions & 0 deletions stablehlo/tools/StablehloOptMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "llvm/Support/PrettyStackTrace.h"
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
#include "mlir/Dialect/Tosa/Transforms/Passes.h"
#include "mlir/InitAllDialects.h"
Expand All @@ -28,6 +29,7 @@ limitations under the License.
#include "stablehlo/transforms/Passes.h"

int main(int argc, char **argv) {
llvm::EnablePrettyStackTrace(); // Enable pretty stack traces
mlir::registerAllPasses();
mlir::hlo::registerAllTestPasses();
mlir::stablehlo::registerPassPipelines();
Expand Down

0 comments on commit 03ae0eb

Please sign in to comment.