Skip to content

Conversation

sjain-stanford
Copy link
Member

@sjain-stanford sjain-stanford commented Aug 16, 2022

A follow-on to #1225 to launch bazel builds in GHA (as well as locally) inside a docker container. Requires #1225 to land first.

Review just the following files (non bazel diffs are split into #1225 for ease of review):

  • .github/workflows/bazelBuildAndTest.yml
  • build_tools/docker/run_bazel_build.sh
  • utils/bazel/.bazelrc

Comment on lines 5 to 6
build --action_env=CC=clang-10
build --action_env=CXX=clang-cpp-10
Copy link
Member Author

@sjain-stanford sjain-stanford Aug 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asaadaldien PTAL. Previously we'd decided to not send this upstream because clang on GHA VMs was already new, but with Ubuntu 18 container the default clang is old and fails with the AVX errors.

git \
python3-pip \
wget \
clang-10 \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asaadaldien PTAL. Previously we'd decided to not send this upstream because clang on GHA VMs was already new, but with Ubuntu 18 container the default clang is old and fails with the AVX errors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this breaks CMake workflow because it is looking for clang and not clang-10 :) Looking into a way to symbolic link so as to not update every -DCMAKE_C_COMPILER=clang with -DCMAKE_C_COMPILER=clang-10.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is what I need: https://man7.org/linux/man-pages/man1/update-alternatives.1.html (and we're already doing this for python).

Comment on lines +29 to +30
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 10
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asaadaldien with this we can avoid having to configure both bazel and cmake builds to pick the specific version.

@powderluv
Copy link
Collaborator

Do you have a hard requirement for Ubuntu 18.04 ? The reason we moved to 22.04 in the CI is to get newer tools and python version by default

@powderluv
Copy link
Collaborator

You could add Bazel as an option in #1234 and then anyone building other CIs / Releases can also test Bazel builds locally via docker.

@sjain-stanford
Copy link
Member Author

You could add Bazel as an option in #1234 and then anyone building other CIs / Releases can also test Bazel builds locally via docker.

@powderluv we'd like to avoid coupling Bazel CI with the CMake release builds and merge gating CI because it is a very orthogonal flow with almost nothing in common (deps, build, test scripts etc). It adds to the complexity but with little to no ROI. We believe this is acceptable since users do not have to fix a broken bazel build (requiring them to run things locally), but if users want to help fix bazel builds, we'll provide easy-to-run scripts to repro bazel CI locally. Please LMK if you see any strong reasons against this.

@sjain-stanford
Copy link
Member Author

Closing as this was coupled with the earlier Dockerize CI PR (#1225 ). Will send a separate one out for dockerizing bazel CI.

@silvasean
Copy link
Contributor

+1 to not coupling Bazel. With our current policy, it should definitely be kept as an orthogonal thing.

qedawkins pushed a commit to nod-ai/torch-mlir that referenced this pull request Oct 3, 2022
* - Doxygen Java API calls
- Fix onnx.ai/onnx-mlir page frame
- Fix JNI wrapper input/output signature functions

Signed-off-by: Gong Su <[email protected]>

* Fix doxygen-docs-publish.yml

Signed-off-by: Gong Su <[email protected]>

Co-authored-by: Ettore Tiotto <[email protected]>
@sjain-stanford sjain-stanford deleted the sambhav/dockerize_bazel branch November 10, 2022 19:53
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.

3 participants