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

View File

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