Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CONTRIB] Enable create_staticlib to take in tar files #14876

Merged
merged 1 commit into from
May 19, 2023

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented May 18, 2023

This PR enahnces create_staticlib to take tar files which can be handy when combining multiple libs into a single a file.

@tvm-bot
Copy link
Collaborator

tvm-bot commented May 18, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: contrib See #10317 for details

Generated by tvm-bot

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

LGTM!

python/tvm/contrib/cc.py Outdated Show resolved Hide resolved
python/tvm/contrib/cc.py Show resolved Hide resolved
temp = _utils.tempdir()
temp_output = temp.relpath(libname)
cmd = [ar, "-crs", temp_output]
objects = _tar.untar_files(temp, inputs)
Copy link
Contributor

Choose a reason for hiding this comment

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

I took a look in the implementation of untar_files and it is not clear to me why you need this function? From my point of view, you can use cmd += inputs.

Also, the second concern is that from the name of the function untar_files, I have concluded that it works with archives and extract files from it. But it is not clear, without reading the implementation of the function, how it works with list of non-tar files.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the comment, i changed to a longer name

This PR enahnces create_staticlib to take tar files
which can be handy when combining multiple libs into a
single a file.
@junrushao
Copy link
Member

@echuraev Let's get another round of review and get it in!

Copy link
Contributor

@echuraev echuraev left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@echuraev echuraev merged commit af06b30 into apache:main May 19, 2023
mei-ye pushed a commit to mei-ye/tvm that referenced this pull request Jun 1, 2023
This PR enahnces create_staticlib to take tar files
which can be handy when combining multiple libs into a
single a file.
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.

4 participants