Skip to content

fix(rocm): keep the mps-parser wheel from including WheelHelpers via the wrong source dir - #6

Merged
awelling2801 merged 1 commit into
amd-integrationfrom
fix/rocopt-mps-parser-wheel-build
Oct 7, 2026
Merged

awelling2801 merged 1 commit into
amd-integrationfrom
fix/rocopt-mps-parser-wheel-build

Conversation

@awelling2801

Copy link
Copy Markdown

Problem

The ROCm post-merge pipeline for release-rocopt-26.07 fails building the rocopt_mps_parser wheel:

Building wheel for rocopt_mps_parser (pyproject.toml): finished with status 'error'
Failed to build rocopt_mps_parser

Root cause

python/cuopt/cuopt/linear_programming/data_model/CMakeLists.txt is add_subdirectory()'d by two different CMake projects:

  1. python/cuopt (project cuopt-python) — building the main cuopt wheel
  2. python/cuopt/cuopt/linear_programming (project mpsparser-python) — building the standalone rocopt_mps_parser wheel

PR #5 (d77872d) added include(${CMAKE_SOURCE_DIR}/cmake/Modules/WheelHelpers.cmake) to install libmps_parser.so next to data_model_wrapper's RPATH=$ORIGIN extension. CMAKE_SOURCE_DIR resolves correctly for case 1 (python/cuopt, which has cmake/Modules/WheelHelpers.cmake) but not case 2, where CMAKE_SOURCE_DIR is python/cuopt/cuopt/linear_programming and no such file exists there — so the cuopt_mps_parser wheel's CMake configure fails.

Fix

Gate the WheelHelpers.cmake include on PROJECT_NAME STREQUAL "cuopt-python" and resolve it relative to this file instead of CMAKE_SOURCE_DIR. The mpsparser-python project already installs libmps_parser.so beside its own extensions, so it doesn't need (and must not run) this install step.

Validation

Built the real dockerfile.rocm image end-to-end on an MI300X node with this branch (same target list as the failing CI step: libmps_parser libcuopt cuopt cuopt_mps_parser cuopt_server cuopt_sh_client):

>>> Build succeeded in 23m 48s
BUILD result=ok image=rocopt:fix-rocopt-mps-parser-wheel-build sha_tag=rocopt:230dafa

Then smoke-tested the built image on real GPU hardware:

cuopt: .../site-packages/cuopt/__init__.py
cuopt_mps_parser: .../site-packages/cuopt_mps_parser/__init__.py
data_model_wrapper: .../site-packages/cuopt/linear_programming/data_model/data_model_wrapper.cpython-313-x86_64-linux-gnu.so
ALL IMPORTS OK

Made with Cursor

…the wrong source dir

data_model/CMakeLists.txt is built by both the cuopt and rocopt_mps_parser projects. The libmps_parser.so install included WheelHelpers.cmake through CMAKE_SOURCE_DIR, which only exists for the cuopt wheel, so the rocopt_mps_parser build failed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@awelling2801
awelling2801 merged commit 7bcdef0 into amd-integration Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant