Repository navigation
[mkldnn][24/N] Let inner_product_forward_expected_weights_desc take an Attr - #206279
frost-intel wants to merge 5 commits into
Conversation
[ghstack-poisoned]
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - OUTDATED (earlier commit) - Ready for human review:
Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/206279
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9513082 with merge base d54e485 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
…n Attr ## Linked issue or supporting maintainer Part of #154444 ## BC-breaking? No ## Summary (human written only) Changing `inner_product_forward_expected_weights_desc` to take an `Attr` parameter as its last argument, allowing the packed weight layout to depend on primitive attributes. This was requested by mriganks-amd for upcoming ZenDNN fp16 accumulation support. ## Agent details (if applicable) Developed with assistance from Claude Opus 5.5. > Part of #154444. Requested by AMD for ZenDNN fp16 accumulation (#204794). > > `inner_product_forward_expected_weights_desc` now takes `const Attr& attr = Attr()` as its last parameter and passes it to the `dnnl::inner_product_forward::primitive_desc`, as `matmul_forward_expected_weights_desc` already does. The packed weight layout can depend on primitive attributes. For example, with ZenDNN's fp16 "any" accumulation mode, a weight packed with default attributes runs on brgemm even with the mode set. Callers can now pack with the attributes they compute with. > > No behavior change: the only caller, `mkldnn_reorder_linear_weight` in `MKLDNNConversions.cpp`, does not pass `attr`, and a default `Attr` is an empty `dnnl::primitive_attr`, which is what oneDNN uses when no attributes are given. This is an API addition on top of the port; ideep's version takes no attributes. > > Testing: compiles with `-Wall -Wextra -Wsign-compare -Werror` in release and debug builds; `test_mkldnn`, the mkldnn conv tests and the quantized conv/linear tests pass at the tip. ghstack-source-id: be5695a Pull-Request: #206279
[ghstack-poisoned]
[ghstack-poisoned]
There was a problem hiding this comment.
Automated review of 978dc67: nothing blocking; ready for human review.
The PR adds a trailing const Attr& attr = Attr() parameter to inner_product_forward_expected_weights_desc and passes it to dnnl::inner_product_forward::primitive_desc, so the packed weight layout can depend on primitive attributes. Recommendation: Approve. The review found nothing blocking: behavior is unchanged for existing callers, the API stays source-compatible, and it follows the existing matmul pattern.
This review is AI-generated and advisory. Each new automated review replaces the previous one. Report a bad review
|
Starting merge as part of PR stack under #206630 |
## Linked issue or supporting maintainer Part of #154444 ## BC-breaking? No ## Summary (human written only) Rename all itensor functions to `memory_*` to eliminate all itensor references in ideep port. ## Agent details (if applicable) Developed with assistance from Claude Opus 5.5. > Part of #154444 (remove the ideep submodule). > > Follows the `ITensor` -> `MkldnnMemory` rename. The helpers that convert between `at::Tensor` and `MkldnnMemory` drop their `itensor` prefix. This is a mechanical rename with no behavior change: > - `itensor_from_mkldnn` -> `memory_from_mkldnn` > - `itensor_from_tensor` -> `memory_from_tensor` > - `itensor_from_const_tensor` -> `memory_from_const_tensor` > - `itensor_view_from_dense` -> `memory_view_from_dense` > - `itensor_view_from_const_dense` -> `memory_view_from_const_dense` > - `itensor_view_from_dense_impl` -> `memory_view_from_dense_impl` (file-local) > - `new_with_itensor_mkldnn` -> `new_with_mkldnn_memory` > - `typed_itensor_view_from_dense` -> `typed_mkldnn_memory_view_from_dense` (file-local) > > These are internal ATen helpers declared in `MKLDNNCommon.h`, so their exported symbol names change, as with the helpers in 21/N. Pull Request resolved: #206630 Approved by: https://github.com/albanD ghstack dependencies: #205978, #205979, #205980, #206276, #206277, #206278, #206279
…c take an Attr (#206279)" This reverts commit c067e37. Reverted #206279 on behalf of https://github.com/izaitsevfb due to Breaks Meta-internal tests that OSS CI does not run ([comment](#206276 (comment)))
|
@frost-intel your PR has been reverted as part of the stack under #206276. |
|
@soulitzer has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Stack from ghstack (oldest at bottom):
Linked issue or supporting maintainer
Part of #154444
BC-breaking?
No
Summary (human written only)
Changing
inner_product_forward_expected_weights_descto take anAttrparameter as its last argument, allowing the packed weight layout to depend on primitive attributes. This was requested by @mriganks-amd for upcoming ZenDNN fp16 accumulation support.Agent details (if applicable)
Developed with assistance from Claude Opus 5.5.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @aditew01
Differential Revision: D135688234