From d49e19f0ccc01ab4ce46b61f21edf08d6cbcfea8 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 08:54:32 -0700 Subject: [PATCH 01/11] fix(TRI-286): use manylinux2014_x86_64 platform tag for tritonclient wheel manylinux1 (glibc 2.5 / CentOS 5) is deprecated and inconsistent with the aarch64 and ppc64le builds which already use manylinux2014. Kitmaker K2 wheel validation may reject a manylinux1-tagged wheel built in a modern Ubuntu container. Align x86_64 with the other architectures. --- src/python/library/build_wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 73f727d0d..b27d69c96 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -202,7 +202,7 @@ def sed(pattern, replace, source, dest=None): elif os.uname().machine == "ppc64le": platform_name = "manylinux2014_ppc64le" else: - platform_name = "manylinux1_x86_64" + platform_name = "manylinux2014_x86_64" args = ["python3", "setup.py", "bdist_wheel", "--plat-name", platform_name] else: args = ["python3", "setup.py", "bdist_wheel"] From dd4272dd2766c2ead0f45999bb3cb94abb982ef5 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 08:58:33 -0700 Subject: [PATCH 02/11] fix(TRI-286): correct x86_64 manylinux platform tag to match Ubuntu 24.04 build host Wheels built on Ubuntu 24.04 (glibc 2.39) cannot honestly claim manylinux1 or manylinux2014 compatibility; auditwheel/K2 validation will reject them. Use manylinux_2_39_x86_64 (PEP 600 style) which accurately reflects the minimum glibc required by a Ubuntu 24.04 build. aarch64/ppc64le tags left as-is pending confirmation of their build host OS. TODO: add auditwheel repair step to auto-detect actual minimum glibc per arch. --- src/python/library/build_wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index b27d69c96..21c105b8f 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -202,7 +202,7 @@ def sed(pattern, replace, source, dest=None): elif os.uname().machine == "ppc64le": platform_name = "manylinux2014_ppc64le" else: - platform_name = "manylinux2014_x86_64" + platform_name = "manylinux_2_39_x86_64" args = ["python3", "setup.py", "bdist_wheel", "--plat-name", platform_name] else: args = ["python3", "setup.py", "bdist_wheel"] From ffe126d8b8e888a032400555991f4b37b2589ba7 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 09:02:01 -0700 Subject: [PATCH 03/11] fix(TRI-286): auto-discover manylinux platform tag via auditwheel repair MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the hard-coded per-arch manylinux tags with auditwheel repair, which introspects the wheel's native extensions and emits the correct manylinux_2_X_{arch} tag based on actual glibc symbol requirements. Build flow for --linux: 1. python setup.py bdist_wheel --plat-name linux_{arch} (bare tag — honest but not pip-installable as-is) 2. auditwheel repair → manylinux_2_X_{arch} wheel in dest-dir (scans .so files, determines minimum glibc, bundles non-system libs) This handles x86_64, aarch64, and ppc64le uniformly without manual version pinning and adapts automatically when the build host OS changes. Requires: pip install auditwheel (add to SDK image or CI job setup) --- src/python/library/build_wheel.py | 45 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 21c105b8f..9bd97b72b 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -195,25 +195,40 @@ def sed(pattern, replace, source, dest=None): cpdir("requirements", os.path.join(FLAGS.whl_dir, "requirements")) os.chdir(FLAGS.whl_dir) + wenv = os.environ.copy() + wenv["VERSION"] = FLAGS.triton_version + print("=== Building wheel") if FLAGS.linux: - if os.uname().machine == "aarch64": - platform_name = "manylinux2014_aarch64" - elif os.uname().machine == "ppc64le": - platform_name = "manylinux2014_ppc64le" - else: - platform_name = "manylinux_2_39_x86_64" - args = ["python3", "setup.py", "bdist_wheel", "--plat-name", platform_name] - else: - args = ["python3", "setup.py", "bdist_wheel"] + arch = os.uname().machine + # Build with a bare linux_{arch} tag first. auditwheel will inspect + # the wheel's native extensions, find the highest glibc symbol version + # they actually require, and emit a correctly-tagged manylinux wheel. + p = subprocess.Popen( + ["python3", "setup.py", "bdist_wheel", "--plat-name", f"linux_{arch}"], + env=wenv, + ) + p.wait() + fail_if(p.returncode != 0, "setup.py failed") - wenv = os.environ.copy() - wenv["VERSION"] = FLAGS.triton_version - p = subprocess.Popen(args, env=wenv) - p.wait() - fail_if(p.returncode != 0, "setup.py failed") + dist_dir = os.path.join(os.getcwd(), "dist") + wheels = [w for w in os.listdir(dist_dir) if w.endswith(".whl")] + fail_if(len(wheels) != 1, f"expected 1 wheel in dist/, found: {wheels}") + wheel_path = os.path.join(dist_dir, wheels[0]) - cpdir("dist", FLAGS.dest_dir) + print(f"=== Running auditwheel repair on {wheels[0]}") + r = subprocess.run( + ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], + ) + fail_if(r.returncode != 0, "auditwheel repair failed") + else: + p = subprocess.Popen( + ["python3", "setup.py", "bdist_wheel"], + env=wenv, + ) + p.wait() + fail_if(p.returncode != 0, "setup.py failed") + cpdir("dist", FLAGS.dest_dir) print("=== Output wheel file is in: {}".format(FLAGS.dest_dir)) touch(os.path.join(FLAGS.dest_dir, "stamp.whl")) From aed4ba4279f9d8f319f6c2ffb3d2ddd5c2f605df Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 09:03:30 -0700 Subject: [PATCH 04/11] fix(TRI-286): fall back to copy-as-is if wheel has no native extensions auditwheel repair raises NonPlatformWheel and exits non-zero when the wheel contains no .so files. Guard with auditwheel show first; if the wheel is pure-Python, copy it directly without retagging. --- src/python/library/build_wheel.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 9bd97b72b..289f0361b 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -217,10 +217,17 @@ def sed(pattern, replace, source, dest=None): wheel_path = os.path.join(dist_dir, wheels[0]) print(f"=== Running auditwheel repair on {wheels[0]}") - r = subprocess.run( - ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], - ) - fail_if(r.returncode != 0, "auditwheel repair failed") + # auditwheel show exits non-zero for pure-Python wheels (NonPlatformWheel). + # In that case the wheel has no glibc dependencies; copy it as-is. + show = subprocess.run(["auditwheel", "show", wheel_path], capture_output=True) + if show.returncode != 0: + print("=== No native extensions found; copying wheel as-is") + cpdir(dist_dir, FLAGS.dest_dir) + else: + r = subprocess.run( + ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], + ) + fail_if(r.returncode != 0, "auditwheel repair failed") else: p = subprocess.Popen( ["python3", "setup.py", "bdist_wheel"], From 75036b485b04baf1561b1230de689070f70006ab Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 09:03:54 -0700 Subject: [PATCH 05/11] =?UTF-8?q?fix(TRI-286):=20simplify=20auditwheel=20r?= =?UTF-8?q?epair=20=E2=80=94=20remove=20show=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The --linux wheel always contains native extensions (shared memory, gRPC, HTTP); the NonPlatformWheel fallback is unnecessary and masks real build errors. Call auditwheel repair directly. --- src/python/library/build_wheel.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 289f0361b..9bd97b72b 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -217,17 +217,10 @@ def sed(pattern, replace, source, dest=None): wheel_path = os.path.join(dist_dir, wheels[0]) print(f"=== Running auditwheel repair on {wheels[0]}") - # auditwheel show exits non-zero for pure-Python wheels (NonPlatformWheel). - # In that case the wheel has no glibc dependencies; copy it as-is. - show = subprocess.run(["auditwheel", "show", wheel_path], capture_output=True) - if show.returncode != 0: - print("=== No native extensions found; copying wheel as-is") - cpdir(dist_dir, FLAGS.dest_dir) - else: - r = subprocess.run( - ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], - ) - fail_if(r.returncode != 0, "auditwheel repair failed") + r = subprocess.run( + ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], + ) + fail_if(r.returncode != 0, "auditwheel repair failed") else: p = subprocess.Popen( ["python3", "setup.py", "bdist_wheel"], From d6fbfb1519a45c71dfe6f3d6e5ec8fced1291e27 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 11:17:46 -0700 Subject: [PATCH 06/11] fix(TRI-286): fall back to auditwheel addtag for pure Python wheels auditwheel repair fails when the wheel has no native ELF extensions. tritonclient is pure Python, so repair exits with "no ELF executable or shared library file found". Fall back to auditwheel addtag, which stamps the correct manylinux platform tag without requiring .so files. --- src/python/library/build_wheel.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 9bd97b72b..fef68b1de 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -219,8 +219,21 @@ def sed(pattern, replace, source, dest=None): print(f"=== Running auditwheel repair on {wheels[0]}") r = subprocess.run( ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], + capture_output=True, + text=True, ) - fail_if(r.returncode != 0, "auditwheel repair failed") + sys.stdout.write(r.stdout) + sys.stderr.write(r.stderr) + + if r.returncode != 0 and "no ELF" in r.stdout: + # Pure Python wheel — no native extensions to bundle. + # Fall back to auditwheel addtag to stamp the manylinux platform tag. + print(f"=== Pure Python wheel, falling back to auditwheel addtag") + r = subprocess.run( + ["auditwheel", "addtag", wheel_path, "--wheel-dir", FLAGS.dest_dir], + ) + + fail_if(r.returncode != 0, "auditwheel repair/addtag failed") else: p = subprocess.Popen( ["python3", "setup.py", "bdist_wheel"], From daf92f63732f1e925fae5ebeb30f6718f1af79a4 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 12:09:31 -0700 Subject: [PATCH 07/11] fix(TRI-286): check r.stderr for auditwheel no-ELF detection auditwheel's logging goes to stderr (Python logging module default), not stdout. The previous check `"no ELF" in r.stdout` never matched, so the addtag fallback was never triggered and the build failed. --- src/python/library/build_wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index fef68b1de..56e8613e1 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -225,7 +225,7 @@ def sed(pattern, replace, source, dest=None): sys.stdout.write(r.stdout) sys.stderr.write(r.stderr) - if r.returncode != 0 and "no ELF" in r.stdout: + if r.returncode != 0 and "no ELF" in r.stderr: # Pure Python wheel — no native extensions to bundle. # Fall back to auditwheel addtag to stamp the manylinux platform tag. print(f"=== Pure Python wheel, falling back to auditwheel addtag") From 9cd547cec9ed07dd9f288fa4c9f7945338d01f68 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 13:11:55 -0700 Subject: [PATCH 08/11] fix(TRI-286): use wheel tags fallback for pure Python wheels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit auditwheel repair fails on pure Python wheels (no ELF). Two bugs fixed: 1. Check r.stderr (not r.stdout) for the "no ELF" sentinel — auditwheel logs via Python's logging module which writes to stderr. 2. Use `python -m wheel tags --remove` instead of `auditwheel addtag`; the addtag subcommand was removed in auditwheel 6.0. Copy the wheel to dest_dir first, then retag in-place so the output lands in the right location. Local reproducer confirms mypkg-1.0-py3-none-manylinux_2_28_x86_64.whl is produced correctly. --- src/python/library/build_wheel.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 56e8613e1..1b2b71527 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -227,10 +227,26 @@ def sed(pattern, replace, source, dest=None): if r.returncode != 0 and "no ELF" in r.stderr: # Pure Python wheel — no native extensions to bundle. - # Fall back to auditwheel addtag to stamp the manylinux platform tag. - print(f"=== Pure Python wheel, falling back to auditwheel addtag") + # Fall back to `wheel tags` to stamp the manylinux platform tag. + # (auditwheel addtag was removed in auditwheel 6.0) + arch = os.uname().machine + manylinux_tag = f"manylinux_2_28_{arch}" + print( + f"=== Pure Python wheel, falling back to wheel tags ({manylinux_tag})" + ) + copied = os.path.join(FLAGS.dest_dir, os.path.basename(wheel_path)) + shutil.copy(wheel_path, copied) r = subprocess.run( - ["auditwheel", "addtag", wheel_path, "--wheel-dir", FLAGS.dest_dir], + [ + "python3", + "-m", + "wheel", + "tags", + "--platform-tag", + manylinux_tag, + "--remove", + copied, + ], ) fail_if(r.returncode != 0, "auditwheel repair/addtag failed") From 0663dfd4f8449ee37184a2832d53840373e32fd5 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 16:01:37 -0700 Subject: [PATCH 09/11] =?UTF-8?q?fix(TRI-286):=20simplify=20build=5Fwheel.?= =?UTF-8?q?py=20=E2=80=94=20remove=20auditwheel=20for=20pure=20Python=20wh?= =?UTF-8?q?eel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After PR #797 removed libcshm.so (C shared memory shim), tritonclient has no native extensions. shared_memory is pure Python (mmap/ctypes) and cuda_shared_memory uses cuda.bindings (pure Python package). A single py3-none-any wheel is correct and sufficient for all platforms. Remove the --plat-name linux_{arch} / auditwheel repair complexity from the --linux build path. Both --linux and non-linux paths now produce py3-none-any via a simple bdist_wheel invocation. --- src/python/library/build_wheel.py | 66 ++++--------------------------- 1 file changed, 7 insertions(+), 59 deletions(-) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 1b2b71527..6ae5ae530 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -199,65 +199,13 @@ def sed(pattern, replace, source, dest=None): wenv["VERSION"] = FLAGS.triton_version print("=== Building wheel") - if FLAGS.linux: - arch = os.uname().machine - # Build with a bare linux_{arch} tag first. auditwheel will inspect - # the wheel's native extensions, find the highest glibc symbol version - # they actually require, and emit a correctly-tagged manylinux wheel. - p = subprocess.Popen( - ["python3", "setup.py", "bdist_wheel", "--plat-name", f"linux_{arch}"], - env=wenv, - ) - p.wait() - fail_if(p.returncode != 0, "setup.py failed") - - dist_dir = os.path.join(os.getcwd(), "dist") - wheels = [w for w in os.listdir(dist_dir) if w.endswith(".whl")] - fail_if(len(wheels) != 1, f"expected 1 wheel in dist/, found: {wheels}") - wheel_path = os.path.join(dist_dir, wheels[0]) - - print(f"=== Running auditwheel repair on {wheels[0]}") - r = subprocess.run( - ["auditwheel", "repair", wheel_path, "--wheel-dir", FLAGS.dest_dir], - capture_output=True, - text=True, - ) - sys.stdout.write(r.stdout) - sys.stderr.write(r.stderr) - - if r.returncode != 0 and "no ELF" in r.stderr: - # Pure Python wheel — no native extensions to bundle. - # Fall back to `wheel tags` to stamp the manylinux platform tag. - # (auditwheel addtag was removed in auditwheel 6.0) - arch = os.uname().machine - manylinux_tag = f"manylinux_2_28_{arch}" - print( - f"=== Pure Python wheel, falling back to wheel tags ({manylinux_tag})" - ) - copied = os.path.join(FLAGS.dest_dir, os.path.basename(wheel_path)) - shutil.copy(wheel_path, copied) - r = subprocess.run( - [ - "python3", - "-m", - "wheel", - "tags", - "--platform-tag", - manylinux_tag, - "--remove", - copied, - ], - ) - - fail_if(r.returncode != 0, "auditwheel repair/addtag failed") - else: - p = subprocess.Popen( - ["python3", "setup.py", "bdist_wheel"], - env=wenv, - ) - p.wait() - fail_if(p.returncode != 0, "setup.py failed") - cpdir("dist", FLAGS.dest_dir) + p = subprocess.Popen( + ["python3", "setup.py", "bdist_wheel"], + env=wenv, + ) + p.wait() + fail_if(p.returncode != 0, "setup.py failed") + cpdir("dist", FLAGS.dest_dir) print("=== Output wheel file is in: {}".format(FLAGS.dest_dir)) touch(os.path.join(FLAGS.dest_dir, "stamp.whl")) From 9fe178e2d0630c56671995c4d8ba36a79c2c7cb6 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 16:24:40 -0700 Subject: [PATCH 10/11] fix(TRI-286): remove perf_analyzer bundling from wheel build perf_analyzer is always distributed separately and never bundled into the tritonclient wheel. Remove the --perf-analyzer argument from build_wheel.py, the TRITON_PACKAGE_PERF_ANALYZER guard from CMakeLists.txt, and the dead data_files branch from setup.py. --- src/python/library/CMakeLists.txt | 4 ---- src/python/library/build_wheel.py | 19 ------------------- src/python/library/setup.py | 2 -- 3 files changed, 25 deletions(-) diff --git a/src/python/library/CMakeLists.txt b/src/python/library/CMakeLists.txt index 815f68fac..3bb837025 100644 --- a/src/python/library/CMakeLists.txt +++ b/src/python/library/CMakeLists.txt @@ -99,9 +99,6 @@ if (NOT WIN32) ${WHEEL_DEPENDS} ) - if (${TRITON_PACKAGE_PERF_ANALYZER}) - set(perf_analyzer_arg --perf-analyzer ${CMAKE_INSTALL_PREFIX}/bin/perf_analyzer) - endif() set(linux_wheel_stamp_file "linux_stamp.whl") add_custom_command( OUTPUT "${linux_wheel_stamp_file}" @@ -110,7 +107,6 @@ if (NOT WIN32) "${CMAKE_CURRENT_SOURCE_DIR}/build_wheel.py" --dest-dir "${CMAKE_CURRENT_BINARY_DIR}/linux" --linux - ${perf_analyzer_arg} DEPENDS ${LINUX_WHEEL_DEPENDS} ) diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index 6ae5ae530..cdd313657 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -83,14 +83,6 @@ def sed(pattern, replace, source, dest=None): required=False, help="Include linux specific artifacts.", ) - parser.add_argument( - "--perf-analyzer", - type=str, - required=False, - default=None, - help="perf-analyzer path.", - ) - FLAGS = parser.parse_args() FLAGS.triton_version = None @@ -179,17 +171,6 @@ def sed(pattern, replace, source, dest=None): os.path.join(FLAGS.whl_dir, "tritonclient/utils/cuda_shared_memory"), ) - # Copy the pre-compiled perf_analyzer binary - if FLAGS.perf_analyzer is not None: - # The permission bits need to be copied to along with the executable - shutil.copy( - FLAGS.perf_analyzer, os.path.join(FLAGS.whl_dir, "perf_analyzer") - ) - - # Create a symbolic link for backwards compatibility - if not os.path.exists(os.path.join(FLAGS.whl_dir, "perf_client")): - os.symlink("perf_analyzer", os.path.join(FLAGS.whl_dir, "perf_client")) - shutil.copyfile("LICENSE.txt", os.path.join(FLAGS.whl_dir, "LICENSE.txt")) shutil.copyfile("setup.py", os.path.join(FLAGS.whl_dir, "setup.py")) cpdir("requirements", os.path.join(FLAGS.whl_dir, "requirements")) diff --git a/src/python/library/setup.py b/src/python/library/setup.py index fd8304619..0f0398ea0 100755 --- a/src/python/library/setup.py +++ b/src/python/library/setup.py @@ -81,8 +81,6 @@ def req_file(filename, folder="requirements"): data_files = [ ("", ["LICENSE.txt"]), ] -if (PLATFORM_FLAG != "any") and ("@TRITON_PACKAGE_PERF_ANALYZER@" == "ON"): - data_files += [("bin", ["perf_analyzer", "perf_client"])] setup( name="tritonclient", From 97ecddd071d91bf8f8971aad5b03d79c97cb1007 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Wed, 15 Apr 2026 17:11:46 -0700 Subject: [PATCH 11/11] fix(TRI-286): make shm utils unconditional, drop --linux flag and linux-client-wheel shared_memory and cuda_shared_memory are pure Python after PR #797 removed libcshm.so. There is no longer a reason to gate them behind --linux. Include them unconditionally in the single generic wheel, guarded only by os.path.isdir so the build still works on platforms where those subdirectories are absent. Remove --linux argument from build_wheel.py and drop the linux-client-wheel cmake target entirely. A single py3-none-any wheel now contains all tritonclient modules. --- src/python/library/CMakeLists.txt | 36 ------------------------------- src/python/library/build_wheel.py | 14 ++++-------- 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/src/python/library/CMakeLists.txt b/src/python/library/CMakeLists.txt index 3bb837025..0c24d5b06 100644 --- a/src/python/library/CMakeLists.txt +++ b/src/python/library/CMakeLists.txt @@ -93,29 +93,6 @@ add_custom_target( # # Linux specific Wheel file. Compatible with x86, x64 and aarch64 # -if (NOT WIN32) - # Can generate linux specific wheel file on linux systems only. - set(LINUX_WHEEL_DEPENDS - ${WHEEL_DEPENDS} - ) - - set(linux_wheel_stamp_file "linux_stamp.whl") - add_custom_command( - OUTPUT "${linux_wheel_stamp_file}" - COMMAND python3 - ARGS - "${CMAKE_CURRENT_SOURCE_DIR}/build_wheel.py" - --dest-dir "${CMAKE_CURRENT_BINARY_DIR}/linux" - --linux - DEPENDS ${LINUX_WHEEL_DEPENDS} - ) - - add_custom_target( - linux-client-wheel ALL - DEPENDS - "${linux_wheel_stamp_file}" - ) -endif() # NOT WIN32 if(${TRITON_ENABLE_PYTHON_GRPC}) add_dependencies( @@ -123,13 +100,6 @@ if(${TRITON_ENABLE_PYTHON_GRPC}) grpc-service-py-library proto-py-library ) - if (NOT WIN32) - add_dependencies( - linux-client-wheel - grpc-service-py-library proto-py-library - ) - endif() # NOT WIN32 - file( GLOB generated-py ${CMAKE_CURRENT_BINARY_DIR}/../../core/*_pb2.py @@ -147,9 +117,3 @@ install( CODE "file(INSTALL \${_Wheel} DESTINATION \"${CMAKE_INSTALL_PREFIX}/python\")" ) -if (NOT WIN32) - install( - CODE "file(GLOB _Wheel \"${CMAKE_CURRENT_BINARY_DIR}/linux/triton*.whl\")" - CODE "file(INSTALL \${_Wheel} DESTINATION \"${CMAKE_INSTALL_PREFIX}/python\")" - ) -endif() # NOT WIN32 diff --git a/src/python/library/build_wheel.py b/src/python/library/build_wheel.py index cdd313657..7d1455002 100755 --- a/src/python/library/build_wheel.py +++ b/src/python/library/build_wheel.py @@ -77,12 +77,6 @@ def sed(pattern, replace, source, dest=None): parser.add_argument( "--dest-dir", type=str, required=True, help="Destination directory." ) - parser.add_argument( - "--linux", - action="store_true", - required=False, - help="Include linux specific artifacts.", - ) FLAGS = parser.parse_args() FLAGS.triton_version = None @@ -110,9 +104,8 @@ def sed(pattern, replace, source, dest=None): cpdir("tritonhttpclient", os.path.join(FLAGS.whl_dir, "tritonhttpclient")) if os.path.isdir("tritongrpcclient"): cpdir("tritongrpcclient", os.path.join(FLAGS.whl_dir, "tritongrpcclient")) - if FLAGS.linux: - if os.path.isdir("tritonshmutils"): - cpdir("tritonshmutils", os.path.join(FLAGS.whl_dir, "tritonshmutils")) + if os.path.isdir("tritonshmutils"): + cpdir("tritonshmutils", os.path.join(FLAGS.whl_dir, "tritonshmutils")) if os.path.isdir("tritonclient/grpc"): cpdir("tritonclient/grpc", os.path.join(FLAGS.whl_dir, "tritonclient/grpc")) @@ -161,11 +154,12 @@ def sed(pattern, replace, source, dest=None): os.path.join(FLAGS.whl_dir, "tritonclient/utils/_shared_memory_tensor.py"), ) - if FLAGS.linux: + if os.path.isdir("tritonclient/utils/shared_memory"): cpdir( "tritonclient/utils/shared_memory", os.path.join(FLAGS.whl_dir, "tritonclient/utils/shared_memory"), ) + if os.path.isdir("tritonclient/utils/cuda_shared_memory"): cpdir( "tritonclient/utils/cuda_shared_memory", os.path.join(FLAGS.whl_dir, "tritonclient/utils/cuda_shared_memory"),