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

CI: prepare CI for ccache updates for MSVC/Windows #2120

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ jobs:
shell: bash
run: ./build_tools/python_deploy/build_windows_ci.sh

- name: Print ccache configuration and statistics
- name: Print ccache statistics
shell: bash
run: ccache --show-config --show-stats --print-stats
run: ccache --show-stats
17 changes: 1 addition & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,6 @@ torch_mlir_add_llvm_external_project(

option(TORCH_MLIR_OUT_OF_TREE_BUILD "Specifies an out of tree build" OFF)

# Adjustments to use ccache on Windows
if (WIN32)
find_program(ccache_exe ccache)
if(ccache_exe)
file(COPY_FILE ${ccache_exe} ${CMAKE_BINARY_DIR}/cl.exe ONLY_IF_DIFFERENT)
set(CMAKE_VS_GLOBALS
"CLToolExe=cl.exe"
"CLToolPath=${CMAKE_BINARY_DIR}"
"TrackFileAccess=false"
"UseMultiToolTask=true"
"DebugInformationFormat=OldStyle"
)
endif()
endif()

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR TORCH_MLIR_OUT_OF_TREE_BUILD)
message(STATUS "Torch-MLIR out-of-tree build.")
# Out-of-tree build
Expand Down Expand Up @@ -243,4 +228,4 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
DEPENDS torch-mlir-headers
COMPONENT torch-mlir-headers)
endif()
endif()
endif()
3 changes: 2 additions & 1 deletion build_tools/python_deploy/build_windows_ci.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail

echo "Building torch-mlir"

Expand All @@ -16,6 +17,6 @@ cmake -GNinja -Bbuild \
-DPython3_EXECUTABLE="$(which python)" \
$GITHUB_WORKSPACE/externals/llvm-project/llvm

cmake --build build
cmake --build build --config Release

echo "Build completed successfully"
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def run(self):
cmake_args, cwd=cmake_build_dir)
subprocess.check_call(["cmake",
"--build", ".",
"--config", "Release",
"--target", "TorchMLIRPythonModules"],
cwd=cmake_build_dir)

Expand Down