Skip to content

Commit f9c3285

Browse files
justinrosnerumangyadav
authored andcommitted
Add hip-python to MITuna venv (#2332)
* Add hip-python to MITuna venv * Fix tuna script * Log errors * More venv tests * More test changes * Remove Dockerfile changes * Attend to Copilot comments
1 parent 0c11e33 commit f9c3285

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

mlir/utils/tuna/tuna-script.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,12 @@ if [ "${VIRTUAL_ENV:-}" = "" ]; then
158158
source /tuna-venv/bin/activate
159159
fi
160160

161+
# Ensure hip-python is importable
162+
if ! python3 -c "from hip import hip" 2>/dev/null; then
163+
HIP_PY_DIR=$(mktemp -d)
164+
python3 -m pip install --index-url https://test.pypi.org/simple/ \
165+
--target "$HIP_PY_DIR" hip-python
166+
export PYTHONPATH="${HIP_PY_DIR}:${PYTHONPATH:-}"
167+
fi
168+
161169
tuna_run "$OP" "$TUNING_SPACE"

0 commit comments

Comments
 (0)