Skip to content

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

Merged
echuraev merged 1 commit intoapache:mainfrom
tqchen:tarlib
May 19, 2023
Merged

[CONTRIB] Enable create_staticlib to take in tar files#14876
echuraev merged 1 commit intoapache:mainfrom
tqchen:tarlib

Conversation

@tqchen
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

Comment thread python/tvm/contrib/cc.py Outdated
Comment thread python/tvm/contrib/cc.py
Comment thread python/tvm/contrib/cc.py Outdated
temp = _utils.tempdir()
temp_output = temp.relpath(libname)
cmd = [ar, "-crs", temp_output]
objects = _tar.untar_files(temp, inputs)
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.

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
Copy Markdown
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
Copy Markdown
Member

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

Copy link
Copy Markdown
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.
@tqchen tqchen deleted the tarlib branch February 15, 2025 14:19
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