feat!: align normal with PyTorch API - #855
Closed
voltjia wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Deferred from the current interface-alignment batch. This change combines Tensor/scalar normal overloads with Generator support; both categories are intentionally postponed for a focused follow-up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normaloverload families with optionalGenerator.Motivation
InfiniOps covered only Tensor mean with Tensor/scalar std and omitted
generator. The public API therefore could not represent half of PyTorch's standard overload set.Depends on #851 and #839.
API Alignment
normal(mean: Tensor, std: double, generator, out)normal(mean: Tensor, std: Tensor, generator, out)normal(mean: double, std: Tensor, generator, out)normal(mean: double, std: double, size, generator, out)The explicit C++ output remains trailing in every overload.
Type of Change
featfixperfrefactortestdocsbuild/cichorePlatforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Test Results on Supported Platforms
Benchmark / Performance Impact
N/A.
Notes for Reviewers
These are exactly the four PyTorch overload families identified in the audit. The former two signatures remain available with
[[deprecated]].