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

[Target] Support obtain l2 cache size from target #16039

Merged
merged 2 commits into from Nov 7, 2023

Conversation

Ubospica
Copy link
Contributor

@Ubospica Ubospica commented Nov 2, 2023

This PR supports obtain l2 cache size from target. The API is

target.l2_cache_size_bytes

The l2 cache size is hardcoded in src/target/tag.cc.

This is useful for specializing schedule rules for different targets.

This PR is followup of #15332

cc @yzh119 @zxybazh

Copy link
Member

@zxybazh zxybazh left a comment

Choose a reason for hiding this comment

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

Thanks a lot for sending this PR! Adding new target attribute makes sense to me as it could be beneficial to all users of this target tag. IMHO we don't need to introduce new function to support add_config as it's pretty much the same as set_config. Other than this LGTM.

CC: @junrushao

include/tvm/target/tag.h Outdated Show resolved Hide resolved
Copy link
Member

@zxybazh zxybazh left a comment

Choose a reason for hiding this comment

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

Thanks again for the feedback, I did anther round of review and please feel free to reply in the thread!

include/tvm/target/tag.h Outdated Show resolved Hide resolved
src/target/target_kind.cc Show resolved Hide resolved
include/tvm/target/tag.h Show resolved Hide resolved
Copy link
Member

@zxybazh zxybazh left a comment

Choose a reason for hiding this comment

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

LGTM.

@Ubospica
Copy link
Contributor Author

Ubospica commented Nov 7, 2023

@zxybazh Thanks for the review

@zxybazh zxybazh merged commit 448de89 into apache:main Nov 7, 2023
19 checks passed
Ubospica added a commit to Ubospica/tvm-develop that referenced this pull request Nov 13, 2023
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.

None yet

2 participants