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

[Release] Fix binary name for downstream compatibility #3752

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
replace other instances of torch-mlir-core
  • Loading branch information
sjain-stanford committed Oct 2, 2024
commit 7c03365e62c82926ecd5c428b099ab5598b2292d
32 changes: 17 additions & 15 deletions build_tools/python_deploy/build_linux_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TM_PYTHON_VERSIONS="${TM_PYTHON_VERSIONS:-cp38-cp38 cp310-cp310 cp311-cp311}"
# Location to store Release wheels
TM_OUTPUT_DIR="${TM_OUTPUT_DIR:-${this_dir}/wheelhouse}"
# What "packages to build"
TM_PACKAGES="${TM_PACKAGES:-torch-mlir torch-mlir-core}"
TM_PACKAGES="${TM_PACKAGES:-torch-mlir torch-mlir-ext}"
# Use pre-built Pytorch
TM_USE_PYTORCH_BINARY="${TM_USE_PYTORCH_BINARY:-ON}"
# Skip running tests if you want quick iteration
Expand Down Expand Up @@ -83,12 +83,12 @@ function run_on_host() {
fi
mkdir -p "${TM_OUTPUT_DIR}"
case "$package" in
torch-mlir)
torch-mlir-ext)
TM_CURRENT_DOCKER_IMAGE=${TM_RELEASE_DOCKER_IMAGE}
export USERID=0
export GROUPID=0
;;
torch-mlir-core)
torch-mlir)
TM_CURRENT_DOCKER_IMAGE=${TM_RELEASE_DOCKER_IMAGE}
export USERID=0
export GROUPID=0
Expand Down Expand Up @@ -158,22 +158,22 @@ function run_in_docker() {
export PATH=$python_dir/bin:$orig_path
echo ":::: Python version $(python3 --version)"
case "$package" in
torch-mlir)
clean_wheels torch_mlir "$python_version"
build_torch_mlir "$TM_TORCH_VERSION"
torch-mlir-ext)
clean_wheels torch_mlir_ext "$python_version"
build_torch_mlir_ext "$TM_TORCH_VERSION"

# Disable audit wheel until we can fix ODR torch issues. See
# https://github.com/llvm/torch-mlir/issues/1709
#
#run_audit_wheel torch_mlir "$python_version"
#run_audit_wheel torch_mlir_ext "$python_version"

clean_build torch_mlir "$python_version"
clean_build torch_mlir_ext "$python_version"
;;
torch-mlir-core)
clean_wheels torch_mlir_core "$python_version"
build_torch_mlir_core
run_audit_wheel torch_mlir_core "$python_version"
clean_build torch_mlir_core "$python_version"
torch-mlir)
clean_wheels torch_mlir "$python_version"
build_torch_mlir
run_audit_wheel torch_mlir "$python_version"
clean_build torch_mlir "$python_version"
;;
out-of-tree)
setup_venv "$python_version" "$TM_TORCH_VERSION"
Expand Down Expand Up @@ -431,7 +431,7 @@ function clean_build() {
rm -rf /main_checkout/torch-mlir/build /main_checkout/torch-mlir/llvm-build /main_checkout/torch-mlir/docker_venv /main_checkout/torch-mlir/libtorch
}

function build_torch_mlir() {
function build_torch_mlir_ext() {
# Disable LTC build for releases
export TORCH_MLIR_ENABLE_LTC=0
local torch_version="$1"
Expand Down Expand Up @@ -470,7 +470,9 @@ function run_audit_wheel() {
rm "$generic_wheel"
}

function build_torch_mlir_core() {
function build_torch_mlir() {
# Disable LTC build for releases
export TORCH_MLIR_ENABLE_LTC=0
python -m pip install --no-cache-dir -r /main_checkout/torch-mlir/build-requirements.txt
CMAKE_GENERATOR=Ninja \
TORCH_MLIR_PYTHON_PACKAGE_VERSION=${TORCH_MLIR_PYTHON_PACKAGE_VERSION} \
Expand Down
14 changes: 7 additions & 7 deletions build_tools/python_deploy/build_macos_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ function run() {
export PATH=$python_dir/bin:$orig_path
echo ":::: Python version $(python3 --version)"
case "$package" in
torch-mlir-ext)
clean_wheels torch_mlir_ext "$python_version"
build_torch_mlir_ext torch_mlir_ext "$python_version"
run_audit_wheel torch_mlir_ext "$python_version"
;;
torch-mlir)
clean_wheels torch_mlir "$python_version"
build_torch_mlir torch_mlir "$python_version"
run_audit_wheel torch_mlir "$python_version"
;;
torch-mlir-core)
clean_wheels torch_mlir_core "$python_version"
build_torch_mlir_core torch_mlir_core "$python_version"
run_audit_wheel torch_mlir_core "$python_version"
;;
*)
echo "Unrecognized package '$package'"
exit 1
Expand All @@ -75,7 +75,7 @@ function run() {
done
}

function build_torch_mlir() {
function build_torch_mlir_ext() {
local wheel_basename="$1"
local python_version="$2"
rm -rf "$output_dir"/build_venv
Expand All @@ -93,7 +93,7 @@ function build_torch_mlir() {
rm -rf "$output_dir"/build_venv
}

function build_torch_mlir_core() {
function build_torch_mlir() {
local wheel_basename="$1"
local python_version="$2"
rm -rf "$output_dir"/build_venv
Expand Down
Loading