Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bazel] Add StableHLO registration dependency #1937

Conversation

sjain-stanford
Copy link
Member

@sjain-stanford sjain-stanford commented Mar 15, 2023

Fixes a broken bazel build from #1887 causing the following build error:

ERROR: /root/.cache/bazel/_bazel_root/b89349c08f7224396763d14fe35cba11/external/torch-mlir/BUILD.bazel:819:10: Compiling tools/torch-mlir-opt/torch-mlir-opt.cpp failed: (Exit 1): clang failed: error executing command /usr/lib/llvm-16/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer ... (remaining 366 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/torch-mlir/tools/torch-mlir-opt/torch-mlir-opt.cpp:16:10: fatal error: 'stablehlo/dialect/Register.h' file not found
#include "stablehlo/dialect/Register.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Target @torch-mlir//:torch-mlir-opt failed to build

GHA workflow with the fix:
https://github.com/sjain-stanford/torch-mlir/actions/runs/4421486154

@sjain-stanford sjain-stanford changed the title [Bazel] [StableHLO] Add @mlir-hlo//stablehlo:register dep [Bazel] [StableHLO] Add StabeHLO registration dependency to the bazel target Mar 15, 2023
@sjain-stanford sjain-stanford changed the title [Bazel] [StableHLO] Add StabeHLO registration dependency to the bazel target [Bazel] [StableHLO] Add StabeHLO registration dependency Mar 15, 2023
@sjain-stanford sjain-stanford changed the title [Bazel] [StableHLO] Add StabeHLO registration dependency [Bazel] Add StableHLO registration dependency Mar 15, 2023
@sjain-stanford sjain-stanford marked this pull request as ready for review March 15, 2023 00:35
@sjain-stanford sjain-stanford merged commit 91e0f38 into llvm:main Mar 15, 2023
@sjain-stanford sjain-stanford deleted the sambhav/fix_stablehlo_registration_dep_bazel branch March 15, 2023 03:04
gpetters94 pushed a commit to gpetters94/mlir-npcomp that referenced this pull request May 10, 2023
Fixes a broken bazel build from llvm#1887 causing the following build error:

```
ERROR: /root/.cache/bazel/_bazel_root/b89349c08f7224396763d14fe35cba11/external/torch-mlir/BUILD.bazel:819:10: Compiling tools/torch-mlir-opt/torch-mlir-opt.cpp failed: (Exit 1): clang failed: error executing command /usr/lib/llvm-16/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer ... (remaining 366 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/torch-mlir/tools/torch-mlir-opt/torch-mlir-opt.cpp:16:10: fatal error: 'stablehlo/dialect/Register.h' file not found
#include "stablehlo/dialect/Register.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Target @torch-mlir//:torch-mlir-opt failed to build
```

GHA workflow with the fix:
https://github.com/sjain-stanford/torch-mlir/actions/runs/4421486154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants