Skip to content

Commit b4619f2

Browse files
committed
test
1 parent b1d1f2d commit b4619f2

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/mlir-tensorrt-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
default: ""
99
type: string
1010
pypi-release:
11-
description: 'Whether to build pypi wheels'
11+
description: 'Flag to build and publish pypi wheels'
1212
default: false
1313
type: boolean
1414

@@ -209,7 +209,7 @@ jobs:
209209
generate_release_notes: false
210210
draft: true
211211
prerelease: true
212-
212+
213213
- name: Upload wheels to test PyPI
214214
if: ${{ inputs.pypi-release == true }}
215215
uses: pypa/gh-action-pypi-publish@release/v1
@@ -218,7 +218,7 @@ jobs:
218218
repository-url: https://test.pypi.org/legacy/
219219
user: __token__
220220
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
221-
221+
222222
# pypi-publish:
223223
# name: Publish to PyPI (requires approval)
224224
# needs: mlir-tensorrt-wheel-build

mlir-tensorrt/integrations/python/setup_utils.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
Utility functions used in the setup.py files for the Python packages.
33
"""
44

5+
import atexit
56
import datetime
67
import os
78
import re
89
import shutil
10+
import subprocess
911
import sys
10-
from pathlib import Path
1112
import tempfile
13+
from pathlib import Path
14+
1215
import setuptools
13-
import subprocess
14-
import atexit
1516

1617
TENSORRT_VERSION = os.getenv("MLIR_TRT_DOWNLOAD_TENSORRT_VERSION", "10.12")
1718

@@ -63,10 +64,12 @@ def get_nightly_version() -> str:
6364
datestring = datetime.date.today().strftime("%Y%m%d")
6465
return append_version_feature_flags(f"{get_base_version()}.dev{datestring}")
6566

67+
6668
def get_pypi_version() -> str:
6769
# wheel upload to pypi need to follow the version specification in https://packaging.python.org/en/latest/specifications/core-metadata/
6870
return f"{get_base_version()}"
6971

72+
7073
def cleanup_dir(dir: Path, should_cleanup: bool, comment: str = ""):
7174
prefix = "Cleaning up" if should_cleanup else "Not cleaning up"
7275
log(f"{prefix} {comment} at {dir}")
@@ -157,7 +160,7 @@ def run_cmake_build(python_package_name: str, python_wheel_staging_dir: Path):
157160
log(f"Building MLIR-TensorRT in {build_dir}")
158161
log(f"Installing to {install_dir}")
159162

160-
# Retrieve the path to the isolated Python site where the wheel build is occuring.
163+
# Retrieve the path to the isolated Python site where the wheel build is occurring.
161164
# That is where the Python build dependencies (the packages listed in
162165
# 'build-requires' in the pyproject.toml) are available. The actual CMake build
163166
# may invoke the Python interpreter (in order to e.g. generate custom MLIR files
@@ -210,7 +213,7 @@ def run_cmake_build(python_package_name: str, python_wheel_staging_dir: Path):
210213
subprocess.check_call(build_cmd, cwd=project_root)
211214

212215
# Install
213-
install_cmd = ["cmake", "--install", str(build_dir), "--strip"]
216+
install_cmd = ["cmake", "--install", str(build_dir)]
214217

215218
log(f"Install command: {' '.join(install_cmd)}")
216219
subprocess.check_call(install_cmd, cwd=project_root)

0 commit comments

Comments
 (0)