Skip to content

Add build script for torch-c-dlpack-ext - #8561

Open
Daniel-Schenker wants to merge 4 commits into
ppc64le:masterfrom
Daniel-Schenker:torch_c_dlpack_ext-build-script
Open

Add build script for torch-c-dlpack-ext#8561
Daniel-Schenker wants to merge 4 commits into
ppc64le:masterfrom
Daniel-Schenker:torch_c_dlpack_ext-build-script

Conversation

@Daniel-Schenker

Copy link
Copy Markdown
Contributor

Checklist

  • Have you checked and followed all the points mention in the CONTRIBUTING.MD
  • Have you validated script on UBI 9 container (ubi10)
  • Did you run the script(s) on fresh container with set -e option enabled and observe success ?
  • Did you have Legal approvals for patch files ?

This PR adds the build script for torch-c-dlpack-ext package. This is an interesting one as this package is an add-on to the apache-tvm-ffi package, and therefore lives in the same GitHub repository. Additionally there is some weirdness with versions as the version of torch-c-dlpack-ext seems to be hard linked to the version of apache-tvm-ffi that is installed when building. Do let me know if there are any modifications needed to the build script or build info files.

@Daniel-Schenker

Copy link
Copy Markdown
Contributor Author

@cdeepali I do not have the ability to add you as a reviewer so I will just ping you here for now.

Comment thread t/torch-c-dlpack-ext/build_info.json Outdated
python3.12 -m build --wheel --no-isolation

echo "Built wheel:"
ls dist/torch_c_dlpack_ext-*.whl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls copy the wheel to the $CURRENT_DIR/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add basic import test for the wheel.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

@cdeepali

cdeepali commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@Daniel-Schenker Sure, I have added a suggestion and comment. Pls take a look.

Daniel-Schenker and others added 2 commits August 5, 2026 13:00
Co-authored-by: Deepali <70963368+cdeepali@users.noreply.github.com>
@Daniel-Schenker

Copy link
Copy Markdown
Contributor Author

@cdeepali I have applied the suggestion and addressed your comment by adding an install step and a basic import test. Please let me know if it looks good.

@Daniel-Schenker

Copy link
Copy Markdown
Contributor Author

@cdeepali Looks like its failing due to version tag issues:
error: pathspec '0.1.5' did not match any file(s) known to git

I had a feeling this might happen. I think the correct solution is to actually checkout the overarching version of apache-tvm-ffi that is required, and the version of torch-c-dlpack-ext is inferred from that.

@Daniel-Schenker

Copy link
Copy Markdown
Contributor Author

I have updated build_info.json to actually point to the desired apache-tvm-ffi version instead. I think this should get us in the right place. Lets see.

@Daniel-Schenker

Copy link
Copy Markdown
Contributor Author

@cdeepali Do you have any idea why it is still installing apache-tvm-ffi v0.1.5? It also is still trying to checkout "0.1.5" and erroring out. Is there some cached build_info.json that is being used or something?

@cdeepali

cdeepali commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

A fix has been added in the CI for this issue and I have tested in PR #8567. In addition to the fix in CI, a correction was needed in the build script metadata

@cdeepali

cdeepali commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@Daniel-Schenker I can merge PR 8567 if that looks fine to you.

@Daniel-Schenker

Copy link
Copy Markdown
Contributor Author

@cdeepali Looks good to me. Thanks!

@cdeepali

cdeepali commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thanks @Daniel-Schenker. We have merged PR #8567

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.

2 participants