OptionA experimenting - #898
Draft
wenjung2007 wants to merge 1 commit into
Draft
wenjung2007 wants to merge 1 commit into
wenjung2007 wants to merge 1 commit into
Conversation
wenjung2007
marked this pull request as draft
September 10, 2026 17:19
datenglin
reviewed
Sep 11, 2026
| echo "==============================================================================" | ||
| echo "Build Successful!" | ||
| echo "Generated Wheel: ${WHEEL_PATH}" | ||
| echo "==============================================================================" No newline at end of file |
Collaborator
There was a problem hiding this comment.
echo "=== [7/7] Verifying Build Artifacts ==="
echo "Verifying dynamic loader symbols on native extension..."
patchelf --print-needed "${WORKSPACE_DIR}/tpu_sync/frameworks/torch/_tpu_raiden_torch.so" | grep "libpywrap_${TORCH_GLUE_SUFFIX}_common.so"
echo "Verifying Python import test..."
python3 -c "import torch; print('PyTorch loaded:', torch.__version__); from tpu_sync.frameworks.torch import _tpu_raiden_torch; print('TPU Sync torch module verified successfully!'); from tpu_sync.api.torch import kv_cache_manager; print('KV cache manager verified successfully!')"
to
echo "Installing generated wheel for verification..."
pip install --force-reinstall "${WHEEL_PATH}"
echo "Verifying Python import test from clean directory..."
(cd /tmp && python3 -c "import torch; print('PyTorch loaded:', torch.__version__); from tpu_sync.api.torch import torch_abi, kv_cache_manager; ext = torch_abi.load_extension('tpu_sync.frameworks.torch', '_tpu_raiden_torch'); print('TPU Sync torch module verified successfully:', ext); impl = kv_cache_manager._torch_impl(); print('KV cache manager verified successfully:', impl)")
datenglin
reviewed
Sep 11, 2026
| pkg = importlib.import_module(package) | ||
| # Works for regular and namespace packages alike (__file__ is None for the | ||
| # latter); __path__ always carries the package directory. | ||
| package_dir = pathlib.Path(next(iter(pkg.__path__))).resolve() |
Collaborator
There was a problem hiding this comment.
For your case, can you remove line 127 and 128 and use the following
package_dirs = [pathlib.Path(p).resolve() for p in pkg.__path__]
target_dir = None
built = []
for pdir in package_dirs:
suffixes = bundled_suffixes(pdir, stem)
if suffixes:
target_dir = pdir
built = suffixes
break
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.
No description provided.