fix: resolve FlyDSL MLIR symlinks for Python 3.12 in Docker#18
Closed
fix: resolve FlyDSL MLIR symlinks for Python 3.12 in Docker#18
Conversation
The FlyDSL build creates symlinks from _mlir Python files (ir.py, dialects/*.py, etc.) into the MLIR source tree. When the source tree is unavailable in the runtime image, these break and FlyDSL fails to import with "cannot import name 'ir' from '_mlir'". Dockerfile.wheels: - Dereference _mlir symlinks after wheel build so the source tree can be used standalone without the MLIR build artifacts - Export FlyDSL source tree to /flydsl_src/ for use by clean image Dockerfile.clean: - Install FlyDSL as editable from the exported source tree instead of the wheel, giving access to kernels/ and tests/ for profiling - Verify both flydsl import and kernel module availability
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.
Summary
_mlirPython files (ir.py, dialects/*.py) into the MLIR source tree, which doesn't exist in runtime images/flydsl_src/Root Cause
The
.flir/build/python_packages/flydsl/_mlir/directory contains symlinks like:These resolve inside the wheels builder stage but break in the clean runtime image where LLVM source is absent, causing:
Test plan
atom:wheels— FlyDSL symlinks dereferenced,/flydsl_src/exportedatom:clean-v3— FlyDSL editable install works with cpython-312 .so filesimport flydslandfrom _mlir import irsucceed