[Bazel] Fix clang version, missing mhlo deps and add reqs files (#1898)

* Fix clang version, missing mhlo deps and add reqs files
pull/1905/head snapshot-20230225.760
Ahmed S. Taei 2023-02-24 15:07:34 -08:00 committed by GitHub
parent de05ad5aaa
commit 3bed35c0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -13,12 +13,12 @@ RUN apt-get update && \
unzip
# Install clang
ARG REPO_NAME="deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
ARG REPO_NAME="deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
RUN echo $REPO_NAME >> /etc/apt/sources.list.d/llvm.list && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-get update && \
apt-get install -y \
clang
clang-16
# Install bazel
ARG ARCH="x86_64"
@ -29,6 +29,8 @@ RUN wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSIO
# Install torch-mlir requirements
COPY requirements.txt /opt/app/requirements.txt
COPY build-requirements.txt /opt/app/build-requirements.txt
COPY test-requirements.txt /opt/app/test-requirements.txt
COPY torchvision-requirements.txt /opt/app/torchvision-requirements.txt
COPY pytorch-requirements.txt /opt/app/pytorch-requirements.txt
WORKDIR /opt/app
RUN python3 -m pip install --upgrade pip

View File

@ -449,6 +449,7 @@ cc_library(
":TorchMLIRTorchConversionDialect",
"@llvm-project//mlir:Dialect",
"@mlir-hlo//:mlir_hlo",
"@mlir-hlo//:transforms_passes",
],
)
@ -460,6 +461,9 @@ cc_library(
hdrs = [
"include/torch-mlir/Conversion/Passes.h",
],
defines = [
"TORCH_MLIR_ENABLE_STABLEHLO",
],
strip_include_prefix = "include",
deps = [
":TorchMLIRTorchConversionToMLProgram",