Repository navigation
[mkldnn][25/N] Rename the itensor helpers for MkldnnMemory - #206630
frost-intel wants to merge 3 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:
Findings (3): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/206630
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f243caa with merge base d54e485 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
## 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. ghstack-source-id: 49311af Pull-Request: #206630
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@frost-intel your PR has been reverted as part of the stack under #206276. |
…206630)" This reverts commit bcfd834. Reverted #206630 on behalf of https://github.com/izaitsevfb due to Breaks Meta-internal tests that OSS CI does not run ([comment](#206276 (comment)))
There was a problem hiding this comment.
Automated review of 7b3b7e3: nothing blocking; ready for human review.
This PR renames the itensor_* and new_with_itensor_mkldnn helpers in MKLDNNCommon.h to memory_* and new_with_mkldnn_memory and updates every call site; the rename is mechanical, complete and preserves behavior. Recommendation: Approve. The three remaining points are non-blocking cleanups, and whoever relands it (the PR carries the Reverted label) should confirm the cause of the revert, likely an internal or out-of-tree caller of the exported symbols.
⚪ 3 non-blocking findings are attached to the code below, collapsed.
This review is AI-generated and advisory. Each new automated review replaces the previous one. Report a bad review
| @@ -125,7 +125,7 @@ static void check_shape_forward(const Tensor& input, | |||
| } | |||
|
|
|||
| #define MKLDNNTensor(itensor, options) \ | |||
There was a problem hiding this comment.
⚪ Leftover itensor names (non-blocking).
The PR edits the body of #define MKLDNNTensor(itensor, options) but keeps itensor as its parameter name, including std::move(itensor) (Conv.cpp:127-129). aten/src/ATen/native/mkldnn/Matmul.cpp:537 still says // Create ITensors for oneDNN computation, though the code below it builds a mkldnn::MkldnnMemory. These are the last itensor references in the mkldnn code (not counting the unrelated ITensorListRef), which goes against the description's goal to "eliminate all itensor references". Rename the parameter (for example to memory) and update the comment.
| @@ -241,7 +241,7 @@ Operation createUnaryOp( | |||
| c10::impl::ExcludeDispatchKeyGuard edkg(c10::autograd_dispatch_keyset); | |||
| // we cast `a` to an `ideep::tensor`, so we can get at its descriptor | |||
There was a problem hiding this comment.
⚪ Stale comment (non-blocking).
Line 242 still says "we cast a to an ideep::tensor", directly above the changed line 244 that now calls memory_from_mkldnn. The ideep::tensor type no longer exists in-tree; it survives only in a "Ported from" comment in detail/Memory.h. The comment should say MkldnnMemory.
|
|
||
| template <typename T> | ||
| mkldnn::MkldnnMemory typed_itensor_view_from_dense( | ||
| mkldnn::MkldnnMemory typed_mkldnn_memory_view_from_dense( |
There was a problem hiding this comment.
⚪ Inconsistent helper name (non-blocking).
The file-local helper is now typed_mkldnn_memory_view_from_dense (:136, :145). Its sibling memory_view_from_dense_impl (:152) and the public memory_view_from_dense (:213) have no mkldnn_ infix, so typed_memory_view_from_dense would match them.
## 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. ghstack-source-id: 85bdaf9 Pull-Request: #206630
|
@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)
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.
Differential Revision: D135688235