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

Rename AQT#2 LayoutType -> Layout #1049

Merged
merged 3 commits into from
Oct 10, 2024
Merged

Rename AQT#2 LayoutType -> Layout #1049

merged 3 commits into from
Oct 10, 2024

Conversation

jainapurva
Copy link
Contributor

@jainapurva jainapurva commented Oct 10, 2024

PR changes:

Current Layout/Layout type confusing and not corresponding to pytorch layout

  • Current LayoutType class and aqt.layout_type corresponds to tensor.layout in pytorch
  • Rename
    - “LayoutType” to “Layout”
    - “aqt.layout_type” to “aqt._layout” for more alignment with pytorch native Tensor
    - _layout -> layout for public API

This change also breaks backwards compatibility for all users that explicitly defined the layout_type parameter:

BC-breaking note:

Prev PR: #1046 -> Layout renamed to TensorImpl

# Before
class AQTLayout(TorchAOBaseTensor):
...

# After
class AQTTensorImpl(TorchAOBaseTensor):
...
  • LayoutType's renamed to Layout
  • For quant_api's () the layout_type param has been renamed to layout.
  • Affected APIs:
    - int4_weight_only
    - int8_dynamic_activation_int8_weight
    - int8_dynamic_activation_int8_semi_sparse_weight
# Before change
def int4_weight_only(group_size=128, layout_type=TensorCoreTiledLayoutType(inner_k_tiles=8), use_hqq=False):
...

quantize_(int4_weight_only(group_size=128, layout_type=TensorCoreTiledLayoutType(inner_k_tiles=8), use_hqq=False))

# After change
def int4_weight_only(group_size=128, layout=TensorCoreTiledLayout(inner_k_tiles=8), use_hqq=False):
...

quantize_(int4_weight_only(group_size=128, layout=TensorCoreTiledLayout(inner_k_tiles=8), use_hqq=False))

Copy link

pytorch-bot bot commented Oct 10, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1049

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit ffd36e3 with merge base fa6d156 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 10, 2024
@jainapurva jainapurva force-pushed the aqt_rename_layout_type branch from 1958a97 to 1b027ef Compare October 10, 2024 05:21
@jainapurva jainapurva requested a review from jerryzh168 October 10, 2024 06:17
@jainapurva jainapurva force-pushed the aqt_rename_layout_type branch from b9f7da9 to ddf1143 Compare October 10, 2024 16:01
@jainapurva jainapurva force-pushed the aqt_rename_layout_type branch from ddf1143 to ffd36e3 Compare October 10, 2024 16:30
Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

Looks good, can you update the summary with bc breaking note? maybe we just need one for both PRs

@jainapurva jainapurva added the topic: bc-breaking Use this tag if this PR breaks backward compatibility label Oct 10, 2024
@jainapurva jainapurva marked this pull request as ready for review October 10, 2024 21:46
@jainapurva jainapurva merged commit 7038f8b into main Oct 10, 2024
17 checks passed
jainapurva added a commit that referenced this pull request Oct 15, 2024
yanbing-j pushed a commit to yanbing-j/ao that referenced this pull request Dec 9, 2024
…ai_api (pytorch#1049)

* Merge the OpenAI files and rename them to openai_api

* Updating import with new file name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: bc-breaking Use this tag if this PR breaks backward compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants