Update the logic of data_type transform for complex #59287
Merged
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.
PR types
Others
PR changes
Others
Description
Pcard-67742
修改复数类型的data transforme逻辑,当kernel key为复数类型时,如果输入Tensor为int32和int64数据类型,默认将不再转换为复数类型。
此处修改主要是考虑到诸如
gather_nd
中index
参数本身只表示索引信息,无需自动提升为复数类型。而复数类型也只有complex和complex两种,从int转到float类型的complex从语义上讲也有一定的问题,所以此PR将关闭默认自动提升int类型为复数类型的data transform。