[NFC] Rename external -> externals (#699)

pull/709/head snapshot-20220326.348
Ahmed S. Taei 2022-03-26 09:12:27 -07:00 committed by GitHub
parent 5d7a6c2976
commit 8383497704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 9 additions and 9 deletions

View File

@ -26,7 +26,7 @@ jobs:
submodules: 'true'
- name: Install MLIR Python depends
run: |
python -m pip install -r $GITHUB_WORKSPACE/external/llvm-project/mlir/python/requirements.txt
python -m pip install -r $GITHUB_WORKSPACE/externals/llvm-project/mlir/python/requirements.txt
- name: Install PyTorch nightly depends
run: |
python -m pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
@ -45,7 +45,7 @@ jobs:
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake $GITHUB_WORKSPACE/external/llvm-project/llvm -GNinja \
cmake $GITHUB_WORKSPACE/externals/llvm-project/llvm -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_LINKER=lld \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "external/llvm-project"]
path = external/llvm-project
path = externals/llvm-project
url = https://github.com/llvm/llvm-project.git

View File

@ -39,7 +39,7 @@ endmacro()
torch_mlir_add_llvm_external_project(
torch-mlir-dialects
TORCH_MLIR_DIALECTS
${CMAKE_CURRENT_SOURCE_DIR}/external/llvm-external-projects/torch-mlir-dialects)
${CMAKE_CURRENT_SOURCE_DIR}/externals/llvm-external-projects/torch-mlir-dialects)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# Out-of-tree build
@ -80,7 +80,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(TORCH-MLIR_BUILT_STANDALONE 1)
set(BACKEND_PACKAGE_STRING "LLVM ${LLVM_PACKAGE_VERSION}")
add_subdirectory(external/llvm-external-projects/torch-mlir-dialects)
add_subdirectory(externals/llvm-external-projects/torch-mlir-dialects)
else()
# In-tree build with LLVM_EXTERNAL_PROJECTS=torch-mlir
# FIXME: This should really be inherited from the LLVM tree. In particular,

View File

@ -64,10 +64,10 @@ cmake -GNinja -Bbuild \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS="torch-mlir;torch-mlir-dialects" \
-DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR=`pwd` \
-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR=`pwd`/external/llvm-external-projects/torch-mlir-dialects \
-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR=`pwd`/externals/llvm-external-projects/torch-mlir-dialects \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DLLVM_TARGETS_TO_BUILD=host \
external/llvm-project/llvm
externals/llvm-project/llvm
# Additional quality of life CMake flags:
# Enable ccache:

View File

@ -12,7 +12,7 @@
set -eu -o errtrace
project_dir="$(cd $(dirname $0)/.. && pwd)"
llvm_project_dir="$project_dir/external/llvm-project"
llvm_project_dir="$project_dir/externals/llvm-project"
build_dir="$project_dir/build"
cmake -GNinja -B"$build_dir" "$llvm_project_dir/llvm" \
@ -21,7 +21,7 @@ cmake -GNinja -B"$build_dir" "$llvm_project_dir/llvm" \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS="torch-mlir;torch-mlir-dialects" \
-DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR="$project_dir" \
-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR=${project_dir}/external/llvm-external-projects/torch-mlir-dialects \
-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR=${project_dir}/externals/llvm-external-projects/torch-mlir-dialects \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_TARGETS_TO_BUILD=host