Repository navigation
fix(rocm): keep the mps-parser wheel from including WheelHelpers via the wrong source dir - #6
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The ROCm post-merge pipeline for
release-rocopt-26.07fails building therocopt_mps_parserwheel:Root cause
python/cuopt/cuopt/linear_programming/data_model/CMakeLists.txtisadd_subdirectory()'d by two different CMake projects:python/cuopt(projectcuopt-python) — building the maincuoptwheelpython/cuopt/cuopt/linear_programming(projectmpsparser-python) — building the standalonerocopt_mps_parserwheelPR #5 (d77872d) added
include(${CMAKE_SOURCE_DIR}/cmake/Modules/WheelHelpers.cmake)to installlibmps_parser.sonext todata_model_wrapper'sRPATH=$ORIGINextension.CMAKE_SOURCE_DIRresolves correctly for case 1 (python/cuopt, which hascmake/Modules/WheelHelpers.cmake) but not case 2, whereCMAKE_SOURCE_DIRispython/cuopt/cuopt/linear_programmingand no such file exists there — so thecuopt_mps_parserwheel's CMake configure fails.Fix
Gate the
WheelHelpers.cmakeinclude onPROJECT_NAME STREQUAL "cuopt-python"and resolve it relative to this file instead ofCMAKE_SOURCE_DIR. Thempsparser-pythonproject already installslibmps_parser.sobeside its own extensions, so it doesn't need (and must not run) this install step.Validation
Built the real
dockerfile.rocmimage 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):Then smoke-tested the built image on real GPU hardware:
Made with Cursor